使用'可可emacs'更改emacs的默认目录 [英] Change the default directory of emacs with 'cocoa emacs'

查看:315
本文介绍了使用'可可emacs'更改emacs的默认目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此处所述,将(setq default-directory〜 / Desktop / mag)在.emacs中应该更改默认目录。 X- 20045454545 X- 20045 X- 20045 X- 20045 X- 20045 X- 200 X- 20045 X- 20045 X- 20045 X- C-x C-f仍然显示〜/ not〜/ Desktop / mag。



(cdUsers / smcho / Desktop / mag)也给了我这个错误 - 错误:没有通过CDPATH环境变量找到这样的目录



他们有什么问题?

解决方案

Cx Cf(' 200新新新新旗新新旗新新旗新新旗新新旗新新旗新新旗新新旗新新旗新新旗新新旗新新旗新新旗新新旗新新旗新新旗新新旗新新旗新新200新新旗新新旗旗新旗新X-45454545 X- 20045 X-454545 X-454545 X-454545 X-454545 X-454545 X-4545 X-该缓冲区的默认目录是从变量command-line-default-directory设置的。



所以,尝试这样:



新新新新旗新新新新旗新新旗新新旗新新旗新新旗旗新新新新旗新新旗新新旗新新旗旗新新新新旗新新旗200新新新新旗新新旗2001-新新新新新新旗新新旗2001-新新新新新旗新新旗2001-新新新新新旗新新旗2001-新新新新旗新新旗新新旗新新旗新新旗新新旗新新旗新新旗新新旗新新旗新旗新新旗新新旗新新旗新新款: b

As explained in here, putting (setq default-directory "~/Desktop/mag" ) in .emacs is supposed to change the default directory.

When I do that with the emacs on my mac, it doesn't work. C-x C-f still shows ~/ not ~/Desktop/mag.

(cd "Users/smcho/Desktop/mag") also gives me this error - Error: No such directory found via CDPATH environment variable

What's wrong with them?

解决方案

The directory that appears in the prompt for C-x C-f ('find-file') comes from the value of default-directory, which is a buffer-local variable. When you first start Emacs, the initial buffer displayed is the GNU Emacs buffer. That buffer's default-directory is set from the variable command-line-default-directory.

So, try this:

(setq command-line-default-directory "~/Desktop/mag")

这篇关于使用'可可emacs'更改emacs的默认目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆