我正在尝试调整emacs中Windows XP的dired-find-file
函数,以便在从dired打开(例如)pdf文件时,启动Acrobat Reader并用其打开该文件,而不是在emacs内部打开。 但我无法确定要使用哪个shell-command/call-process
变体。以下是我目前拥有的:
(defadvice dired-find-file (around dired-find-file-external (filename &optional wildcards))
"Open non-text files with an appropriate external program."
(if (string= ".pdf" (substring filename (- (length filename) 4))) ; obviously I'll replace this with something more general/robust
(shell-command filename) ;; what should go here?
(ad-do-it)))
(ad-activate 'dired-find-file)
我知道我可以通过指定Acrobat Reader的.exe文件位置来硬编码启动它。但我更倾向于使用一些需要我进行更少搜索并且不会在默认应用程序移动/更改时中断的东西。我应该使用什么?
F3
键时,为什么会出现定义kbd宏...
的提示? - ZhaoGang