From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Newsgroups: gmane.emacs.devel Subject: Re: PATCH: Fix IDO interaction with uniquify.el Date: Wed, 05 May 2010 09:27:14 +0100 Message-ID: References: <87k4vf1zdh.fsf@telefonica.net> <87d4171oy1.fsf@telefonica.net> <87636z1nm7.fsf@telefonica.net> <87d417h0z6.fsf@stupidchicken.com> <87tyujz57h.fsf@telefonica.net> <87ockrz4eu.fsf@telefonica.net> <87pr57uw25.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1273078682 23661 80.91.229.12 (5 May 2010 16:58:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 5 May 2010 16:58:02 +0000 (UTC) Cc: =?iso-8859-1?Q?=D3scar?= Fuentes , Chong Yidong , emacs-devel@gnu.org To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 05 18:57:57 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O9hv2-0002vW-VO for ged-emacs-devel@m.gmane.org; Wed, 05 May 2010 18:57:57 +0200 Original-Received: from localhost ([127.0.0.1]:44442 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9hv2-0005BV-Hx for ged-emacs-devel@m.gmane.org; Wed, 05 May 2010 12:57:56 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O9Zww-0004t6-1s for emacs-devel@gnu.org; Wed, 05 May 2010 04:27:22 -0400 Original-Received: from [140.186.70.92] (port=58675 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9Zwt-0004rP-Up for emacs-devel@gnu.org; Wed, 05 May 2010 04:27:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O9Zwr-000365-S7 for emacs-devel@gnu.org; Wed, 05 May 2010 04:27:19 -0400 Original-Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]:56598) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O9Zwr-00035r-Ku for emacs-devel@gnu.org; Wed, 05 May 2010 04:27:17 -0400 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: not scanned X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Original-Received: from smaug.linux.pwf.cam.ac.uk ([193.60.95.72]:44441) by ppsw-52.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.157]:587) with esmtpsa (LOGIN:sl392) (TLSv1:DHE-RSA-AES128-SHA:128) id 1O9Zwp-00037e-GJ (Exim 4.70) (return-path ); Wed, 05 May 2010 09:27:15 +0100 In-Reply-To: (Juanma Barranquero's message of "Mon, 18 Jan 2010 20:17:32 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:124536 Archived-At: On 2010-01-18 19:17 +0000, Juanma Barranquero wrote: > On Mon, Jan 18, 2010 at 19:06, Chong Yidong wrote: > >> Looks OK to me. =A0I don't use ido, however, so could someone who does >> (and has commit access) check that it behaves correctly, and if so >> commit it? > > I use ido. In my not-that-extensive testing, it works as expected and > fixes the bug. I'll commit it. > > Juanma I confirm the original bug report. I propose here a different fix for both ido and iswitch. It is much simpler and more efficient. (buffer-list) can be a large list given the new feature virtual buffers in both iswitch and ido modes. Leo >From 4faddfd77236de485d77eece0eb7b655e85d9cdf Mon Sep 17 00:00:00 2001 From: Leo Date: Wed, 5 May 2010 09:19:59 +0100 Subject: [PATCH] Stop uniquify from interfering with iswitch and ido when k= illing buffers --- lisp/ido.el | 3 ++- lisp/iswitchb.el | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/ido.el b/lisp/ido.el index 7cdeb70..9d0cb40 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -3965,7 +3965,8 @@ 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)))) (when buf - (kill-buffer buf) + ;; stop uniquify from renaming buffers + (let (uniquify-buffer-name-style) (kill-buffer buf)) ;; Check if buffer still exists. (if (get-buffer buf) ;; buffer couldn't be killed. diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el index ea4b00d..333eeee 100644 --- a/lisp/iswitchb.el +++ b/lisp/iswitchb.el @@ -1034,7 +1034,8 @@ Return the modified list with the last element prepen= ded to it." ;; check to see if buf is non-nil. (if buf (progn - (kill-buffer buf) + ;; stop uniquify from renaming buffers + (let (uniquify-buffer-name-style) (kill-buffer buf)) =20 ;; Check if buffer exists. XEmacs gnuserv.el makes alias ;; for kill-buffer which does not return t if buffer is --=20 1.7.0.4