New answers tagged

-1

C-u M-x multi-occur-in-matching-buffers RET . RET blah RET


1

You can use the function kill-current-buffer from simple.el. The docstring says: kill-current-buffer is an interactive compiled Lisp function in ‘simple.el’. (kill-current-buffer) Kill the current buffer. When called in the minibuffer, get out of the minibuffer using ‘abort-recursive-edit’. This is like ‘kill-this-buffer’, but it ...


-2

The fastest way is by a keyboard shortcut, which is C-x k.


1

Short answer: (kill-buffer (current-buffer)) works fine. Longer answer: My init.el has ;; kill the current buffer instead of choosing ;; http://pragmaticemacs.com/emacs/dont-kill-buffer-kill-this-buffer-instead/ ;; except that kill-this-buffer may break if menus are not available: ;; https://www.reddit.com/r/emacs/comments/64xb3q/...


2

The following code renames the buffer to the value of #+TITLE: when you open the Org file. This is the most simple version. It does not update the buffer name when you add or change the title. But in that case you can call org+-buffer-name-to-title directly if you really need it. (defun org+-buffer-name-to-title () "Rename buffer to value of #+TITLE:." (...


1

The customization I want is: (custom-set-variables '(one-buffer-one-frame-mode nil nil (aquamacs-frame-setup))) Instead of: (one-buffer-one-frame-mode t nil (aquamacs-frame-setup)))


3

"Newly opened" can only mean relative to a state when the buffer didn't exist. Every time prior to when it came into being it didn't exist. So yes, you need to take a snapshot of the list of existing buffers at some point prior to creating the new buffer, in order to later check whether the buffer is "new" - compared to that prior snapshot moment. Save the ...


6

The question is not too clear. But I think maybe what you're saying is that you want to: Show message one. Let the user start doing some arbitrary editing, in any buffer. No limits on what she can do. Let the user indicate when she's done. Show message two. If that, or similar, is the case, then one way to realizes steps 2 and 3 is to use a recursive edit. ...


Top 50 recent answers are included