English 中文(简体)
如何停止 遵循定制链接时从打开新的缓冲器的标志
原标题:how to stop Emacs from opening new buffers when following a link in customization

问题在于如何在校选择。 每次我点击一个环节,都会建立一个新的缓冲地带。 • 如何迫使信使使用单一缓冲?

最佳回答

为此:

(defadvice custom-buffer-create (before my-advice-custom-buffer-create)
  "Exit the current Customize buffer before creating a new one, unless there are modified widgets."
  (if (eq major-mode  Custom-mode)
      (let ((custom-buffer-done-kill t)
            (custom-buffer-modified nil))
        (mapc (lambda (widget)
                (and (not custom-buffer-modified)
                     (eq (widget-get widget :custom-state)  modified)
                     (setq custom-buffer-modified t)))
              custom-options)
        (if (not custom-buffer-modified)
            (Custom-buffer-done)))))
(ad-activate  custom-buffer-create)
问题回答

作为我的原始答复(我不倾向于使用自己)的替代办法,我认为,如果你完成定制工作,我或许会提出其他办法,使你能够摆脱许多习惯的缓冲。

首先,确实注意到,简单地说,q将“根据`cus-buffer-done-ric'(即掩埋或杀死它)进行目前的习俗缓冲”。

第二,使用M-x: 编码> 技能-配对-buffers > 编码>* 保管 > (然后确认)。

我实际上做的是使用ibuffer

如果您尚未使用,我就建议对C-x C-bibuffer具有约束力,这是对缺省代码<>list-buffers的极大改进的替代办法。 我主要热爱其,过滤和组别能力,但除了此以外,还可以做大量工作。

  (global-set-key (kbd "C-x C-b")  ibuffer)

我也利用目前可找到的以下建议:http://www.emacswiki.org/emacs/IbufferMode#toc10” rel=“nofollow noreferer” ,请见Emacs Wiki,以便Ibuffer总是与我选定的缓冲地带开放。

这样做,并且从一个定制的缓冲地带,C-x C-b* M RET D y 将杀害所有定制缓冲器。 也就是说:

  • C-x C-b Open ibuffer (with point on the current Customize buffer entry)
  • * M Mark buffers by major mode...
  • RET ...select the mode (which defaulted to the major mode of the selected buffer, or otherwise type Custom-mode RET)
  • D y kill all marked buffers

很遗憾,你可能喜欢。 https://stackoverflow.com/search?q=ibuffer> 寻找ibuffer将取代其他手法。

例如,您可使用<代码>/n ^* RET / g tmp RET将所有缓冲器从*分离至“tmp”组,以便它们不会utter上你更感兴趣的缓冲器组。

与任何主要方式一样,将C-h m改为已建文件。





相关问题
suppress additional braces in emacs electric mode

I started using ruby-electric-mode. I like it except that I am used to closing open brackets myself (the other pairing are still useful to me). How can I make emacs suppress additional brackets when ...

Setting up an emacs environment in windows?

I am currently constrained to a windows dev box and I want to migrate my projects from eclipse to emacs. What are some good references on setting up an emacs dev environment for windows? Anything ...

Emacs Setting which-function-mode

I would like to have which-function-mode on by default when I open up Emacs. I ve added the following lines to my .emacs file. (setq which-func-mode t) (setq which-function-mode t) When I open ...

Enabling go mode for emacs

I don t seem to be able to enable a go mode for emacs. C mode doesn t work without semicolons. The best I have found is the JavaScript mode by Karl Landstrom, since JavaScript also doesn t require ...

Custom Emacs key bindings are not working

The key bindings I ve defined in my .emacs file aren t working. Here s the file: ;init modes (menu-bar-mode 0) (tool-bar-mode 0) (cua-mode) (column-number-mode) (fset perl-mode cperl-mode) (cperl-...

eval during emacs lisp macro expansion

How can I fix the simple macro foo in (elisp)Eval During Expansion? None of the followings work: (defmacro foo1 (a) `(setq (eval ,a) t)) (defmacro foo2 (a) `(setq ,(eval a) t)) (defmacro foo3 (...

Get local cvs comment history when committing file/s in emacs

I often commit files with similar cvs comment but not in a single operation. I would like to able to bring up previous comments I ve used in a previous commit when I am in the process of writing a ...

热门标签