From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: Re: PATCH: Fix IDO interaction with uniquify.el Date: Wed, 05 May 2010 21:09:13 +0200 Message-ID: <878w7y6u92.fsf@telefonica.net> 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=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1273099302 9868 80.91.229.12 (5 May 2010 22:41:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 5 May 2010 22:41:42 +0000 (UTC) Cc: Juanma Barranquero , Chong Yidong , Leo , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 06 00:41:40 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 1O9nHg-0008Jb-DK for ged-emacs-devel@m.gmane.org; Thu, 06 May 2010 00:41:40 +0200 Original-Received: from localhost ([127.0.0.1]:52132 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9nHf-0002RE-H5 for ged-emacs-devel@m.gmane.org; Wed, 05 May 2010 18:41:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O9jyF-0003V8-Cj for emacs-devel@gnu.org; Wed, 05 May 2010 15:09:23 -0400 Original-Received: from [140.186.70.92] (port=32943 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9jyD-0003Th-Rb for emacs-devel@gnu.org; Wed, 05 May 2010 15:09:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O9jyB-0002Br-Ul for emacs-devel@gnu.org; Wed, 05 May 2010 15:09:21 -0400 Original-Received: from impaqm5.telefonica.net ([213.4.138.5]:38416) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O9jyB-0002An-In for emacs-devel@gnu.org; Wed, 05 May 2010 15:09:19 -0400 Original-Received: from IMPmailhost6.adm.correo ([10.20.102.127]) by IMPaqm5.telefonica.net with bizsmtp id DncN1e00T2kvMAa3Rv9FJM; Wed, 05 May 2010 21:09:15 +0200 Original-Received: from qcore ([83.32.114.29]) by IMPmailhost6.adm.correo with BIZ IMP id Dv9D1e00a0e77Q31mv9E9x; Wed, 05 May 2010 21:09:15 +0200 X-TE-authinfo: authemail="981711563$telefonica.net" |auth_email="981711563@telefonica.net" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" In-Reply-To: (Stefan Monnier's message of "Wed, 05 May 2010 14:14:17 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:124560 Archived-At: Stefan Monnier writes: >>> I confirm the original bug report. I propose here a different fix for >>> both ido and iswitch. It is much simpler and more efficient. >> On the minus side, your patch: >> - is less generic; =C3=93scar's will work for other packages that do >> dynamic renaming of buffers (yes, there are none on the Emacs >> distribution, but there's a lot of elisp code out there). >> - makes ido depend on a feature of uniquify, which it didn't before. > > Even more problematic: it changes the behavior of uniquify. > Can someone install Oscar's patch? It was installed long time ago. > BTW, I don't understand why his patch changes (defvar ido-cur-list) > and (defvar ido-choice-list) into (defvar ido-cur-list nil) > and (defvar ido-choice-list nil). These changes aren't necessarily bad, > but I suspect the change is either unneeded or hiding a bug. I was unable to obtain a solid insight on how ido managed the list of buffers. It looked quite complicated and dispersed to me. So tried some code, tested (with Juanma's help) and submitted the patch. The last patch posted by Leo looks great because it is so simple, but IIRC I considered some simple ways of fixing the bug and they introduced strange bugs and annoyances(*), so maybe my fix doesn't contain so much gratuitous code at it seems, or maybe Leo is right and I was unlucky with my attempts at fixing the bug with a simple change. * One of those annoyances was changing the "next" item on the list of buffers once you kill the first one, something that I find confusing. Right now ido may change the order of the buffers after a kill, but the previous second item appears as the first item on the new list.