GNU bug report logs -
#6943
23.2; [PATCH] * lisp/ido.el (ido-kill-buffer-at-head): support killing virtual buffers.
Previous Next
Reported by: Leo <sdl.web <at> gmail.com>
Date: Mon, 30 Aug 2010 03:22:02 UTC
Severity: wishlist
Tags: patch
Found in version 23.2
Fixed in version 24.1
Done: Leo <sdl.web <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Mon, 11 Apr 2011 11:54:56 +0800
with message-id <m1tye58msv.fsf <at> th041087.ip.tsinghua.edu.cn>
and subject line Re: bug#6943: 23.2; [PATCH] * lisp/ido.el (ido-kill-buffer-at-head): support killing virtual buffers.
has caused the GNU bug report #6943,
regarding 23.2; [PATCH] * lisp/ido.el (ido-kill-buffer-at-head): support killing virtual buffers.
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
6943: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6943
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
The attached patch makes C-k in ido kills virtual buffers too.
[Message part 4 (text/x-diff, inline)]
From fb3cb0a3c3c6ab82a3ec7c8061478b59366ae77a Mon Sep 17 00:00:00 2001
From: Leo sdl.web <at> gmail.com
Date: Mon, 30 Aug 2010 04:17:03 +0100
Subject: [PATCH] * lisp/ido.el (ido-kill-buffer-at-head): support killing virtual buffers.
---
lisp/ido.el | 43 +++++++++++++++++++++++++------------------
1 files changed, 25 insertions(+), 18 deletions(-)
diff --git a/lisp/ido.el b/lisp/ido.el
index 858ee3e..944499e 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -3920,24 +3920,31 @@ If cursor is not at the end of the user input, delete to end of input."
(let ((enable-recursive-minibuffers t)
(buf (ido-name (car ido-matches)))
(nextbuf (cadr ido-matches)))
- (when (get-buffer buf)
- ;; If next match names a buffer use the buffer object; buffer
- ;; name may be changed by packages such as uniquify; mindful
- ;; of virtual buffers.
- (when (and nextbuf (get-buffer nextbuf))
- (setq nextbuf (get-buffer nextbuf)))
- (if (null (kill-buffer buf))
- ;; Buffer couldn't be killed.
- (setq ido-rescan t)
- ;; Else `kill-buffer' succeeds so re-make the buffer list
- ;; taking into account packages like uniquify may rename
- ;; buffers.
- (if (bufferp nextbuf)
- (setq nextbuf (buffer-name nextbuf)))
- (setq ido-default-item nextbuf
- ido-text-init ido-text
- ido-exit 'refresh)
- (exit-minibuffer))))))
+ (if (get-buffer buf)
+ (progn
+ ;; If next match names a buffer use the buffer object; buffer
+ ;; name may be changed by packages such as uniquify; mindful
+ ;; of virtual buffers.
+ (when (and nextbuf (get-buffer nextbuf))
+ (setq nextbuf (get-buffer nextbuf)))
+ (if (null (kill-buffer buf))
+ ;; Buffer couldn't be killed.
+ (setq ido-rescan t)
+ ;; Else `kill-buffer' succeeds so re-make the buffer list
+ ;; taking into account packages like uniquify may rename
+ ;; buffers.
+ (if (bufferp nextbuf)
+ (setq nextbuf (buffer-name nextbuf)))
+ (setq ido-default-item nextbuf
+ ido-text-init ido-text
+ ido-exit 'refresh)
+ (exit-minibuffer)))
+ ;; Handle virtual buffers
+ (when recentf-list
+ (setq recentf-list
+ (delete (cdr (assoc buf ido-virtual-buffers)) recentf-list))
+ (setq ido-cur-list (delete buf ido-cur-list))
+ (setq ido-rescan t))))))
;;; DELETE CURRENT FILE
(defun ido-delete-file-at-head ()
--
1.7.1
[Message part 5 (message/rfc822, inline)]
Version: 24.1
This bug report was last modified 14 years and 123 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.