我已经在emacs中使用了IDO一段时间了,但它开始在/ usr / bin文件夹而不是通常的主文件夹中打开。我该如何改回来?
init文件的内容(如果有帮助):
(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")
答案 0 :(得分:1)
使用M-x cd
。它更改default-directory
,它是缓冲区本地(它可以为每个缓冲区提供不同的值),默认为缓冲区文件的目录,用于包含文件的缓冲区。我想你可以遍历所有缓冲区来为所有缓冲区设置default-directory
,但这听起来像是倒退了一步。
答案 1 :(得分:0)
在我看来,当打开一个新文件(C-x C-f)时,它将从当前缓冲区的目录开始。
当然,由于更改了自定义设置,您可能会遇到一些默认设置。由于您没有发布与您的配置相关的任何内容,我建议您执行以下操作:
如果其他所有方法都失败了,您可以发布一些最近的配置更改吗?
希望它有所帮助,
罗