小编I R*_*Rom的帖子

emacs dired和openwith

我想在从dired模式打开图像文件时配置emacs以使用外部应用程序.

另一方面,我也想在emacs缓冲区中使用内联图像.

要在外部应用程序中打开文件,我使用openwith.elhttp://www.emacswiki.org/emacs/OpenWith

openwith minor模式的问题在于它是全局的,并且当它由dired-mode-hook启用时

(add-hook 'dired-mode-hook
          (lambda ()
            (setq truncate-lines t)
            (openwith-mode t)
            ))
Run Code Online (Sandbox Code Playgroud)

它遍布各处,emacs缓冲区中的所有内嵌图像都在外部应用程序中打开.

我试图改变

:global t 
Run Code Online (Sandbox Code Playgroud)

:global nil 
Run Code Online (Sandbox Code Playgroud)

openwith.el中,但它以某种方式完全禁用了openwith模式.

所以,我的问题是:如何告诉emacs只使用带有dired缓冲区的openwith minor模式而不是其他地方?

谢谢.

emacs elisp dired

6
推荐指数
1
解决办法
1378
查看次数

标签 统计

dired ×1

elisp ×1

emacs ×1