0

我在 emacs 中使用 IDO 有一段时间了,但它开始在 /usr/bin 文件夹中打开,而不是通常的主文件夹。我该如何改回来?

初始化文件的内容(如果有帮助的话):

(add-to-list 'load-path "~/.emacs.d/")
(defun toggle-fullscreen ()
  (interactive)
  (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
       '(2 "_NET_WM_STATE_MAXIMIZED_VERT" 0))
  (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
       '(2 "_NET_WM_STATE_MAXIMIZED_HORZ" 0))
)
(toggle-fullscreen)
(global-linum-mode 1)
(ido-mode 1)
(setq ido-enable-flex-matching t)
(setq ido-everywhere t)
(setq inhibit-startup-message t
inhibit-startup-echo-area-message t)
(require 'recentf)
(recentf-mode 1)
(setq recentf-max-menu-items 25)
(global-set-key "\C-x\ \C-r" 'recentf-open-files)

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(default ((t (:inherit nil :stipple nil :background "#000000" :foreground "#ffffff" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 110 :width normal :foundry "unknown" :family "Monospace"))))
 '(highlight ((((class color) (min-colors 88) (background dark)) (:background "#2f4f4f"))))
 '(hl-line ((t (:background "gray10")))))

(delete-selection-mode 1) 
(global-hl-line-mode 1) 
(setq make-backup-files nil) 
(setq auto-save-default nil) 
(global-visual-line-mode 1) 
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)
(load "tabbar")
(tabbar-mode 1)
(load "bar-cursor")
(bar-cursor-mode 1)
(setq deft-directory "~/Dropbox/")
(setq deft-extension "org") (setq deft-text-mode 'org-mode)
(global-set-key [f8] 'deft)
(setq deft-use-filename-as-title t)
(require 'screenwriter)
(global-set-key (kbd "<f7>") 'screenwriter-mode)
(setq auto-mode-alist (cons '("\\.scp" . screenwriter-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.screenplay" . screenwriter-mode) auto-mode-alist))
(load "prelude-packages")
4

2 回答 2

1

使用M-x cd. 它改变了default-directory, 是本地缓冲区(每个缓冲区可以有不同的值),对于有文件的缓冲区,它默认为缓冲区文件的目录。我想您可以遍历所有缓冲区以设置所有缓冲区default-directory,但这听起来像是倒退了一步。

于 2012-12-10T17:16:00.867 回答
0

在我看来,当打开一个新文件(Cx Cf)时,它将从当前缓冲区的目录开始。

当然,由于更改的自定义设置,您可能会有一些默认设置。由于您没有发布任何与您的配置相关的内容,我建议您执行以下操作:

  1. 检查您的 .emacs / .emacs.d/init.el 文件以自定义默认目录位置
  2. 检查custom.el
  3. 使用 Mx customize-group 完成 ido 自定义

如果一切都失败了,也许您可​​以发布一些您最近的配置更改?

希望能帮助到你,

阿尔让

于 2012-12-09T08:46:33.263 回答