24小时热门版块排行榜    

查看: 948  |  回复: 4
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

martialvv

铁虫 (初入文坛)

[求助] Emacs 设置默认工作路径问题已有1人参与

我是emacs新手,想设置默认工作目录,在~/.emacs中添加了
(setq default-directory "~/myEmacs/" )
但重启emacs之后,c-x c-f ,寻找文件的路径还是在~/,什么问题?

[ Last edited by jjdg on 2014-10-18 at 21:14 ]
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

Boncourage!
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

uranusli

木虫 (小有名气)

我也是在stackoverflow搜出来的。我的emacs只是设置的默认路径。

http://stackoverflow.com/questio ... cs-with-cocoa-emacs

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.


另外,你是在法国做机器人方向的?看你签名是法语
4楼2014-10-19 05:12:30
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 5 个回答

uranusli

木虫 (小有名气)

【答案】应助回帖

★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★
感谢参与,应助指数 +1
martialvv: 金币+10, ★★★★★最佳答案 2014-10-19 02:09:56
ben_ladeng: 金币+1, 谢谢指教 2014-10-20 19:44:40
试试这个命令添加在.emacs里面

(setq command-line-default-directory "/Your/Path/" )
2楼2014-10-18 20:17:13
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

martialvv

铁虫 (初入文坛)

引用回帖:
2楼: Originally posted by uranusli at 2014-10-18 20:17:13
试试这个命令添加在.emacs里面

(setq command-line-default-directory "/Your/Path/" )

非常感谢,完美解决了我的问题。能否解释下这是为什么?我在网上查到所有配置上都是那个命令,为什么偏偏我的不行?我的版本是emacs 24.3.
Boncourage!
3楼2014-10-19 02:11:37
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

martialvv

铁虫 (初入文坛)

引用回帖:
4楼: Originally posted by uranusli at 2014-10-19 05:12:30
我也是在stackoverflow搜出来的。我的emacs只是设置的默认路径。

http://stackoverflow.com/questions/3364221/change-the-default-directory-of-emacs-with-cocoa-emacs

The directory that appears in the  ...

嗯,我是做机器人控制。
Boncourage!
5楼2014-10-20 19:28:35
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
信息提示
请填处理意见