emacs ido问题解决
时间:2010-03-26 来源:senser
1. 安装template.el 后 每次退出emacs 最后 都会提示: update header in .ido.last
而且都要你回答y/n 烦。
查看ido.el 搜索.ido.last 出现在
(defcustom ido-save-directory-list-file (convert-standard-filename "~/.ido.last")
接着就查ido-savw-directory-list-file:
应该就是这个函数了
(defun ido-save-history ()
"Save ido history and cache information between sessions."
(interactive)
(when (and ido-last-directory-list ido-save-directory-list-file)
(let ((buf (get-buffer-create " *ido session*"))
(version-control 'never))
(unwind-protect
(with-current-buffer buf
(erase-buffer)
(insert ";;; -*- coding: utf-8 -*-\n")
(setq buffer-file-coding-system 'utf-8)
(ido-pp 'ido-last-directory-list)
(ido-pp 'ido-work-directory-list)
(ido-pp 'ido-work-file-list)
(ido-pp 'ido-dir-file-cache "\n\n ")
(if (listp ido-unc-hosts-cache)
(ido-pp 'ido-unc-hosts-cache)
(insert "\n;; ----- ido-unc-hosts-cache -----\nt\n"))
(write-file ido-save-directory-list-file nil))
(kill-buffer buf)))))
猜一下应该要(and ido-last-directory-list ido-save-directory-list-file)
两个同时成立才会执行这个函数的
ido-save-directory-list-file 这个肯定不为空了
所以就把ido-last-directory-list 设置为空吧
在~/_emacs 中加上(setq ido-last-directory-list nil)
OK! :-) template的功能也正常使用
而且都要你回答y/n 烦。
查看ido.el 搜索.ido.last 出现在
(defcustom ido-save-directory-list-file (convert-standard-filename "~/.ido.last")
接着就查ido-savw-directory-list-file:
应该就是这个函数了
(defun ido-save-history ()
"Save ido history and cache information between sessions."
(interactive)
(when (and ido-last-directory-list ido-save-directory-list-file)
(let ((buf (get-buffer-create " *ido session*"))
(version-control 'never))
(unwind-protect
(with-current-buffer buf
(erase-buffer)
(insert ";;; -*- coding: utf-8 -*-\n")
(setq buffer-file-coding-system 'utf-8)
(ido-pp 'ido-last-directory-list)
(ido-pp 'ido-work-directory-list)
(ido-pp 'ido-work-file-list)
(ido-pp 'ido-dir-file-cache "\n\n ")
(if (listp ido-unc-hosts-cache)
(ido-pp 'ido-unc-hosts-cache)
(insert "\n;; ----- ido-unc-hosts-cache -----\nt\n"))
(write-file ido-save-directory-list-file nil))
(kill-buffer buf)))))
猜一下应该要(and ido-last-directory-list ido-save-directory-list-file)
两个同时成立才会执行这个函数的
ido-save-directory-list-file 这个肯定不为空了
所以就把ido-last-directory-list 设置为空吧
在~/_emacs 中加上(setq ido-last-directory-list nil)
OK! :-) template的功能也正常使用
相关阅读 更多 +