help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

switch-to-messages-buffer


From: Emanuel Berg
Subject: switch-to-messages-buffer
Date: Thu, 22 Mar 2018 01:20:57 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

I have based access to the most common buffers
on the Buffer Menu, which I bring up with one
stroke on the Caps key - i.e., moving my left
little finger horizontally one step, from
A to Caps.

(defun buffer-menu-files-only ()
  (interactive)
  (switch-to-buffer
   (list-buffers-noselect (not Buffer-menu-files-only)) )
  )

I can hit it (Caps) again to get non-file
buffers listed, and then toggle back and forth
using the same key.

But the best thing is I have separate keys to
go to the most common buffers from the Buffer
Menu, e.g. so that m -> the message buffer,
s -> Gnus summary, and so on, and this is all
set up with individual functions, so one can
fine tune every single access. For example,
again the message buffer:

(defun switch-to-messages-buffer ()
  (interactive)
  (let ((buffer (messages-buffer)))
    (when buffer
      (set-buffer buffer)
      (goto-char (point-max))
      (recenter -2)
      (switch-to-buffer buffer) )))

Very fast and robust.

-- 
underground experts united
http://user.it.uu.se/~embe8573


reply via email to

[Prev in Thread] Current Thread [Next in Thread]