Searching function like `bury-buffer' that makes buffer next candidate for `other-buffer' to return

Searching function like `bury-buffer' that makes buffer next candidate for `other-buffer' to return

Post by Christoph » Tue, 03 Mar 2009 19:41:52


Hi,

probably i am only stuck, i assume there is an easy solution for this,
but i don't get it.

Is there a function like bury-buffer, so that the "buried" buffer is the
next buffer `other-buffer' will return?

Kind regards,
Christoph
 
 
 

Searching function like `bury-buffer' that makes buffer next candidate for `other-buffer' to return

Post by Katsumi Ya » Thu, 05 Mar 2009 13:42:54


(defun my-bury-buffer (&optional buffer-or-name)
(interactive)
(bury-buffer buffer-or-name)
(dolist (buffer (nbutlast (cdr (buffer-list))))
(save-window-excursion
(switch-to-buffer buffer)
(bury-buffer buffer))))

I'm not sure if it is the best way, though.

 
 
 

Searching function like `bury-buffer' that makes buffer next candidate for `other-buffer' to return

Post by Christoph » Thu, 05 Mar 2009 14:25:12

Hi,




Thank you, Katsumi!

Kind regards,
Christoph