all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#7231: 23.3; Don't rebuild buffer list in iswitchb-visit-buffer
@ 2010-10-17 17:59 Leo
  2010-10-17 18:22 ` Óscar Fuentes
  2010-10-17 18:48 ` Stefan Monnier
  0 siblings, 2 replies; 12+ messages in thread
From: Leo @ 2010-10-17 17:59 UTC (permalink / raw)
  To: 7231

The original change was to address buffer name changes due to packages
such as uniquify.el. But it causes another annoying bug: changing the
order of matches seen by users.

This reverts it.

If people are annoyed (which I doubt) by outdated buffer names due to
uniquify.el, one solution is to map the buffer-names to buffer objects
before killing and map them back to names after killing.

From 7e6597c54a7764688855c3ab2efa6cfa1cffbea6 Mon Sep 17 00:00:00 2001
Date: Mon, 18 Oct 2010 01:44:24 +0800
Subject: [PATCH] Don't rebuild buffer list in iswitchb-visit-buffer

Rebuilding buffer list will lose the order of matches seen by users
and thus cause surprises.
---
 lisp/iswitchb.el |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el
index 081897a..b7baa03 100644
--- a/lisp/iswitchb.el
+++ b/lisp/iswitchb.el
@@ -1042,10 +1042,8 @@ Return the modified list with the last element prepended to it."
 	  (if (get-buffer buf)
 	      ;; buffer couldn't be killed.
 	      (setq iswitchb-rescan t)
-	    ;; Else `kill-buffer' succeeds so re-make the buffer list
-	    ;; taking into account packages like uniquify may rename
-	    ;; buffers
-	    (iswitchb-make-buflist iswitchb-default))))))
+	    ;; else buffer was killed so remove name from list.
+	    (setq iswitchb-buflist  (delq buf iswitchb-buflist)))))))
 
 ;;; VISIT CHOSEN BUFFER
 (defun iswitchb-visit-buffer (buffer)
-- 
1.7.3






^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-10-28  1:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-17 17:59 bug#7231: 23.3; Don't rebuild buffer list in iswitchb-visit-buffer Leo
2010-10-17 18:22 ` Óscar Fuentes
2010-10-17 19:16   ` Leo
2010-10-18 14:54     ` Stefan Monnier
2010-10-20  3:00       ` Leo
2010-10-20  4:53         ` Leo
2010-10-20  9:19           ` Óscar Fuentes
2010-10-21  7:19           ` Leo
2010-10-20 16:13         ` Stefan Monnier
2010-10-23  5:36           ` Leo
2010-10-28  1:31     ` Stefan Monnier
2010-10-17 18:48 ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.