From unknown Sat Aug 16 10:44:16 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#3224 <3224@debbugs.gnu.org> To: bug#3224 <3224@debbugs.gnu.org> Subject: Status: 23.0.92; vc-dir vs uniquify: wrong directory used Reply-To: bug#3224 <3224@debbugs.gnu.org> Date: Sat, 16 Aug 2025 17:44:16 +0000 retitle 3224 23.0.92; vc-dir vs uniquify: wrong directory used reassign 3224 emacs submitter 3224 Magnus Henoch severity 3224 normal thanks From magnus@erlang-consulting.com Tue May 5 08:19:23 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 5 May 2009 15:19:23 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: * X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=1.1 required=4.0 tests=FOURLA,IMPRONONCABLE_2 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n45FJIHS025016 for ; Tue, 5 May 2009 08:19:19 -0700 Received: from mail.gnu.org ([199.232.76.166]:47294 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1M1MQP-0005Zd-0S for emacs-pretest-bug@gnu.org; Tue, 05 May 2009 11:19:17 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1M1MQM-0002bY-EW for emacs-pretest-bug@gnu.org; Tue, 05 May 2009 11:19:16 -0400 Received: from zimbra.erlangsystems.com ([88.208.247.62]:38501) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M1MQL-0002Zy-Qo for emacs-pretest-bug@gnu.org; Tue, 05 May 2009 11:19:14 -0400 Received: from linux-b2a3.site (host213-123-170-251.in-addr.btopenworld.com [213.123.170.251]) by zimbra.erlangsystems.com (Postfix) with ESMTP id DE209135A260 for ; Tue, 5 May 2009 16:16:35 +0100 (BST) From: Magnus Henoch To: emacs-pretest-bug@gnu.org Subject: 23.0.92; vc-dir vs uniquify: wrong directory used X-Hashcash: 1:25:090505:emacs-pretest-bug@gnu.org::C5UHY00Hy1QJred1:000000000000000000000000000000000001Uy7L Date: Tue, 05 May 2009 16:19:07 +0100 Message-ID: <84my9rfuhg.fsf@linux-b2a3.site> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list. Please describe exactly what actions triggered the bug and the precise symptoms of the bug: I have uniquify-buffer-name-style set to post-forward, which means that I expect buffers with the same name to be called BUFFER|DIR. This doesn't quite work with vc-dir: the DIR part corresponds to the setting of `default-directory' in the buffer where I invoke the command, instead of the directory I specify. To reproduce, start "emacs -Q" and evaluate: (progn (require 'uniquify) (setq uniquify-buffer-name-style 'post-forward) (cd "/tmp") (make-directory "foo") (make-directory "bar") (vc-dir "/tmp/foo") (cd "/tmp/foo") (vc-dir "/tmp/bar")) You will get two buffers, "*vc-dir*|foo" displaying /tmp/bar, and "*vc-dir*|/tmp" displaying /tmp/foo. I tried to fix this by binding default-directory around create-file-buffer in vc-dir-prepare-status-buffer, which partly fixed the problem: the buffer for bar had a correct name, but the buffer for foo was still "*vc-dir*|/tmp". If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. If you would like to further debug the crash, please read the file /usr/local/share/emacs/23.0.92/etc/DEBUG for instructions. In GNU Emacs 23.0.92.1 (i686-pc-linux-gnu, GTK+ Version 2.14.4) of 2009-04-28 on linux-b2a3 Windowing system distributor `The X.Org Foundation', version 11.0.10502000 Important settings: value of $LC_ALL: nil value of $LC_COLLATE: C value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=local locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: Diff Minor modes in effect: diff-auto-refine-mode: t shell-dirtrack-mode: t jabber-activity-mode: t jabber-mode-line-mode: t show-paren-mode: t server-mode: t icomplete-mode: t display-time-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: d M-f M-f M-f M-f s-i C-x v d ~ / b l a s v a p C-h f u n i j q r a t b u f C-x b C-h f M-x l o c a t e v c - d i r . e l s-i v i s-i v c - d i r - p r e p C-e ( l e t SPC ( ( d e f a u l t - d i r e c t o r y SPC d i r ) ) C-a C-k C-k C-e ) C-x C-s C-x C-e C-x v d ~ / b l a s v n o C-x v d n o d a d C-x v d a p a d C-x b C-s C-x v = C-h v u n i q u b u M-x r e p o r t - e From dann@godzilla.ics.uci.edu Tue Aug 4 05:30:47 2009 Received: (at 3224) by emacsbugs.donarmstrong.com; 4 Aug 2009 12:30:48 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-7.0 required=4.0 tests=AWL,HAS_BUG_NUMBER, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from barrelv2.ics.uci.edu (barrelv2.ics.uci.edu [128.195.1.114]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n74CUiwP002741 for <3224@emacsbugs.donarmstrong.com>; Tue, 4 Aug 2009 05:30:45 -0700 Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by barrelv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n74CUQYk013490; Tue, 4 Aug 2009 05:30:26 -0700 (PDT) Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n74CUQUd025123; Tue, 4 Aug 2009 05:30:26 -0700 (PDT) Date: Tue, 4 Aug 2009 05:30:26 -0700 (PDT) Message-Id: <200908041230.n74CUQUd025123@godzilla.ics.uci.edu> From: Dan Nicolaescu To: Magnus Henoch Cc: 3224@debbugs.gnu.org Subject: Re: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used References: <84my9rfuhg.fsf@linux-b2a3.site> X-Debbugs-No-Ack: yes In-Reply-To: <84my9rfuhg.fsf@linux-b2a3.site> (Magnus Henoch's message of "Tue, 05 May 2009 16:19:07 +0100") Lines: 55 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n74CUQYk013490 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu Magnus Henoch writes: > Please write in English if possible, because the Emacs maintainers > usually do not have translators to read other languages for them. > > Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list. > > Please describe exactly what actions triggered the bug > and the precise symptoms of the bug: > > I have uniquify-buffer-name-style set to post-forward, which means that > I expect buffers with the same name to be called BUFFER|DIR. This > doesn't quite work with vc-dir: the DIR part corresponds to the setting > of `default-directory' in the buffer where I invoke the command, instead > of the directory I specify. > > To reproduce, start "emacs -Q" and evaluate: > > (progn > (require 'uniquify) > (setq uniquify-buffer-name-style 'post-forward) > (cd "/tmp") > (make-directory "foo") > (make-directory "bar") > (vc-dir "/tmp/foo") > (cd "/tmp/foo") > (vc-dir "/tmp/bar")) > > You will get two buffers, "*vc-dir*|foo" displaying /tmp/bar, and > "*vc-dir*|/tmp" displaying /tmp/foo. > > I tried to fix this by binding default-directory around > create-file-buffer in vc-dir-prepare-status-buffer, which partly fixed > the problem: the buffer for bar had a correct name, but the buffer for > foo was still "*vc-dir*|/tmp". I am not familiar with uniquify, but after binding default-directory in vc-dir-prepare-status-buffer, I get the result above. And it is identical to what happens when doing: (progn (require 'uniquify) (setq uniquify-buffer-name-style 'post-forward) (cd "/tmp") (make-directory "foo") (make-directory "bar") (cd "/tmp/foo") (create-file-buffer "*vc-dir*") (cd "/tmp/bar") (create-file-buffer "*vc-dir*")) so either this is a problem with uniquify, or uniquify it's just working as expected. From dann@godzilla.ics.uci.edu Thu Sep 24 14:33:11 2009 Received: (at control) by emacsbugs.donarmstrong.com; 24 Sep 2009 21:33:11 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-6.5 required=4.0 tests=AWL,HAS_BUG_NUMBER, X_DEBBUGS_NO_ACK autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 Received: from sallyv2.ics.uci.edu (sallyv2.ics.uci.edu [128.195.1.120]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8OLXAma029494; Thu, 24 Sep 2009 14:33:11 -0700 Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by sallyv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n8OLWwFH018819; Thu, 24 Sep 2009 14:32:58 -0700 (PDT) Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n8OLWwML012223; Thu, 24 Sep 2009 14:32:58 -0700 (PDT) Date: Thu, 24 Sep 2009 14:32:58 -0700 (PDT) Message-Id: <200909242132.n8OLWwML012223@godzilla.ics.uci.edu> From: Dan Nicolaescu To: Tom Tromey Cc: 4553@debbugs.gnu.org Subject: Re: bug#4553: 23.1; uniquify gives *vc-dir* buffer the wrong name References: X-Debbugs-No-Ack: yes In-Reply-To: (Tom Tromey's message of "Thu, 24 Sep 2009 14:53:12 -0600") Lines: 30 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n8OLWwFH018819 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu forcemerge 3224 4553 quit Tom Tromey writes: > I have a *vc-dir* buffer opened on a directory: > > VC backend : Git > Working dir: ~/gnu/archer/archer/ > Branch : archer-tromey-python > [...] > > And, I have: > > uniquify-buffer-name-style is a variable defined in `uniquify.el'. > Its value is > post-forward-angle-brackets > > uniquify-strip-common-suffix is a variable defined in `uniquify.el'. > Its value is t > > However, the aforementioned buffer is named *vc-dir*. > This is simply wrong. I think I would expect *vc-dir*. > > I managed to get one named *vc-dir* as well. I don't know how, > but that one was also clearly wrong, as the directory in question was in > /home/tromey, not /tmp. This is the same a Bug#3224. Please comment on the info there. From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 05 23:01:18 2010 Received: (at 3224) by debbugs.gnu.org; 6 Jan 2010 04:01:18 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSN4z-0005Kz-SG for submit@debbugs.gnu.org; Tue, 05 Jan 2010 23:01:18 -0500 Received: from mail-bw0-f216.google.com ([209.85.218.216]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSN4w-0005Kd-DG for 3224@debbugs.gnu.org; Tue, 05 Jan 2010 23:01:04 -0500 Received: by bwz8 with SMTP id 8so10833872bwz.39 for <3224@debbugs.gnu.org>; Tue, 05 Jan 2010 20:00:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=B675Ik/TA6bshtAd09T9PRw1RqXTPOEYsudG60zuyYo=; b=GXRwIDRucheY79ZmJhPZzQ/FLlsEdSZfXB1GumoeMOqm0M7BYUcgtwzmo5LA3V6Key ECs3QbZgSg4uzLGubYUd+SQSWXdimURpCH93/m84ocgf+Gp/Vxj+rFsDYOi4PG4E7BGp SYCCRlkEvRXFFXhvKDJ0ORwH2DnByq8lV9J/c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=NSAr7PpscPfzGwM7mmzKdFlXXt+eAidw3B3F2OzS0PmCVuWlr5cIUuow6djdxP+Jy6 HApa0TB4FYXMjCWmkjmSm1o246eudapNzfPrvpvdgYe7sn1XLYjXG7AxS13SVsBoF0+E odCz1UeP7V/zPx9VtnjIZbOeOH5iN14kRLg6c= MIME-Version: 1.0 Received: by 10.204.4.71 with SMTP id 7mr3138687bkq.87.1262750458397; Tue, 05 Jan 2010 20:00:58 -0800 (PST) In-Reply-To: <200908041230.n74CUQUd025123@godzilla.ics.uci.edu> References: <84my9rfuhg.fsf@linux-b2a3.site> <200908041230.n74CUQUd025123@godzilla.ics.uci.edu> From: Juanma Barranquero Date: Wed, 6 Jan 2010 05:00:38 +0100 Message-ID: Subject: Re: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used To: Dan Nicolaescu Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 3224 Cc: Magnus Henoch , 3224@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Tue, Aug 4, 2009 at 13:30, Dan Nicolaescu wrote: > I am not familiar with uniquify, but after binding default-directory in > vc-dir-prepare-status-buffer, I get the result above. > And it is identical to what happens when doing: > > > (progn > =C2=A0(require 'uniquify) > =C2=A0(setq uniquify-buffer-name-style 'post-forward) > =C2=A0(cd "/tmp") > =C2=A0(make-directory "foo") > =C2=A0(make-directory "bar") > =C2=A0(cd "/tmp/foo") > =C2=A0(create-file-buffer "*vc-dir*") > =C2=A0(cd "/tmp/bar") > =C2=A0(create-file-buffer "*vc-dir*")) In fact, I think the two problems are not exactly the same, though they are related. If my analysis, and the following patch, are correct, Dan's example is caused by a bug in `uniquify-rationalize-file-buffer-names', which sometimes, while trying to refresh the dirname of a candidate, fails to check that it is setting it to nil. Fixing that problem makes Dan's example to work, but Magnus' vc-dir example still fails. The reason of the other bug is twofold: On one hand, vc-dir (specifically `vc-dir-prepare-status-buffer') is calling `create-file-buffer' passing "*vc-dir*" to it; but that function expects to be passed a filename; in this case, the difference is relevant because uniquify tries to use that filename's directory information to decide the dirname for the candidates. On the other hand, `uniquify-buffer-file-name' should return a directory, but fails to deal with the case that the "filename" is already a directory (which can happen, for example, when it is getting this "filename" from `list-buffers-directory'). In this case it should just remove any trailing slash and pass it back unscathed. Please, try the attached patch to see whether it helps. Thanks, Juanma 2010-01-06 Juanma Barranquero Bug#3224 =09 * uniquify.el (uniquify-rationalize-file-buffer-names): Don't set uniquify-item-dirname to nil. (uniquify-buffer-file-name): If the "filename" is already a directory name, do not modify it. * vc-dir.el (vc-dir-prepare-status-buffer): Pass a (fake) filename to `create-file-buffer' as it expects, not just a buffer name. =3D=3D=3D modified file 'lisp/uniquify.el' --- lisp/uniquify.el 2010-01-04 05:35:18 +0000 +++ lisp/uniquify.el 2010-01-06 03:22:51 +0000 @@ -232,9 +232,9 @@ ;; of code like in set-visited-file-name: ;; (or (string=3D new-name (buffer-name)) (rename-buffer new-name t)) ;; So we need to refresh the dirname of the uniquify-item. - (setf (uniquify-item-dirname (car items)) - (uniquify-buffer-file-name - (uniquify-item-buffer (car items)))) + (let ((bfn (uniquify-buffer-file-name (uniquify-item-buffer (car items))))) + (when bfn + (setf (uniquify-item-dirname (car items)) bfn))) ;; This shouldn't happen, but maybe there's no dirname any more. (unless (uniquify-item-dirname (car items)) (with-current-buffer (uniquify-item-buffer (car items)) @@ -265,9 +265,11 @@ list-buffers-directory)))) (when filename (directory-file-name - (file-name-directory - (expand-file-name - (directory-file-name filename)))))))) + (if (file-directory-p filename) + (file-name-as-directory filename) + (file-name-directory + (expand-file-name + (directory-file-name filename))))))))) (defun uniquify-rerationalize-w/o-cb (fix-list) "Re-rationalize the buffers in FIX-LIST, but ignoring `current-buffer'." =3D=3D=3D modified file 'lisp/vc-dir.el' --- lisp/vc-dir.el 2009-12-05 00:24:03 +0000 +++ lisp/vc-dir.el 2010-01-06 03:26:33 +0000 @@ -101,7 +101,7 @@ (return buffer)))))))) (or buf ;; Create a new buffer named BNAME. - (with-current-buffer (create-file-buffer bname) + (with-current-buffer (create-file-buffer (expand-file-name bname d= ir)) (cd dir) (vc-setup-buffer (current-buffer)) ;; Reset the vc-parent-buffer-name so that it does not appear From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 05 23:55:40 2010 Received: (at 3224) by debbugs.gnu.org; 6 Jan 2010 04:55:40 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSNvo-0005kB-BT for submit@debbugs.gnu.org; Tue, 05 Jan 2010 23:55:40 -0500 Received: from paul-mcgann-v0.ics.uci.edu ([128.195.1.147]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSNvl-0005k4-RP for 3224@debbugs.gnu.org; Tue, 05 Jan 2010 23:55:38 -0500 Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by paul-mcgann-v0.ics.uci.edu (8.13.8/8.13.8) with ESMTP id o064tSXO021119 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 5 Jan 2010 20:55:28 -0800 Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id o064tSs9002351; Tue, 5 Jan 2010 20:55:28 -0800 (PST) Date: Tue, 5 Jan 2010 20:55:28 -0800 (PST) Message-Id: <201001060455.o064tSs9002351@godzilla.ics.uci.edu> From: Dan Nicolaescu To: Juanma Barranquero Subject: Re: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used References: <84my9rfuhg.fsf@linux-b2a3.site> <200908041230.n74CUQUd025123@godzilla.ics.uci.edu> X-Debbugs-No-Ack: yes In-Reply-To: (Juanma Barranquero's message of "Wed, 6 Jan 2010 05:00:38 +0100") Lines: 14 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please send mail to helpdesk@ics.uci.edu or more information X-ICS-MailScanner-ID: o064tSXO021119 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-Spam-Status: No X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 3224 Cc: 3224@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) Juanma Barranquero writes: > === modified file 'lisp/vc-dir.el' > --- lisp/vc-dir.el 2009-12-05 00:24:03 +0000 > +++ lisp/vc-dir.el 2010-01-06 03:26:33 +0000 > @@ -101,7 +101,7 @@ > (return buffer)))))))) > (or buf > ;; Create a new buffer named BNAME. > - (with-current-buffer (create-file-buffer bname) > + (with-current-buffer (create-file-buffer (expand-file-name bname dir)) Please also add a comment explaining why that is done. From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 06 00:38:12 2010 Received: (at 3224) by debbugs.gnu.org; 6 Jan 2010 05:38:13 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSOay-00063F-Hu for submit@debbugs.gnu.org; Wed, 06 Jan 2010 00:38:12 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSOax-000639-CP for 3224@debbugs.gnu.org; Wed, 06 Jan 2010 00:38:11 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlQGAEuwQ0vO+KPG/2dsb2JhbACBRdIUhDAEiik X-IronPort-AV: E=Sophos;i="4.49,226,1262581200"; d="scan'208";a="53114296" Received: from 206-248-163-198.dsl.teksavvy.com (HELO ceviche.home) ([206.248.163.198]) by ironport2-out.pppoe.ca with ESMTP; 06 Jan 2010 00:38:07 -0500 Received: by ceviche.home (Postfix, from userid 20848) id 6B97DB4077; Wed, 6 Jan 2010 00:38:07 -0500 (EST) From: Stefan Monnier To: Juanma Barranquero Subject: Re: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used Message-ID: References: <84my9rfuhg.fsf@linux-b2a3.site> <200908041230.n74CUQUd025123@godzilla.ics.uci.edu> Date: Wed, 06 Jan 2010 00:38:07 -0500 In-Reply-To: (Juanma Barranquero's message of "Wed, 6 Jan 2010 05:00:38 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 3224 Cc: 3224@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) > --- lisp/uniquify.el 2010-01-04 05:35:18 +0000 > +++ lisp/uniquify.el 2010-01-06 03:22:51 +0000 > @@ -232,9 +232,9 @@ > ;; of code like in set-visited-file-name: > ;; (or (string= new-name (buffer-name)) (rename-buffer new-name t)) > ;; So we need to refresh the dirname of the uniquify-item. > - (setf (uniquify-item-dirname (car items)) > - (uniquify-buffer-file-name > - (uniquify-item-buffer (car items)))) > + (let ((bfn (uniquify-buffer-file-name (uniquify-item-buffer (car > items))))) > + (when bfn > + (setf (uniquify-item-dirname (car items)) bfn))) That doesn't sound right. Why is bfn nil in your case, and why should we not update uniquify-item-dirname correspondingly? > @@ -265,9 +265,11 @@ > list-buffers-directory)))) > (when filename > (directory-file-name > - (file-name-directory > - (expand-file-name > - (directory-file-name filename)))))))) > + (if (file-directory-p filename) > + (file-name-as-directory filename) > + (file-name-directory > + (expand-file-name > + (directory-file-name filename))))))))) I don't thing that's right. Instead, you probably want to set list-buffers-directory to something like (expand-file-name "*vc-dir*"), as is done in PCL-CVS. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 06 05:17:53 2010 Received: (at 3224) by debbugs.gnu.org; 6 Jan 2010 10:17:54 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSSxd-00081a-M6 for submit@debbugs.gnu.org; Wed, 06 Jan 2010 05:17:53 -0500 Received: from mail-bw0-f216.google.com ([209.85.218.216]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSSxc-00081V-FO for 3224@debbugs.gnu.org; Wed, 06 Jan 2010 05:17:52 -0500 Received: by bwz8 with SMTP id 8so10938552bwz.39 for <3224@debbugs.gnu.org>; Wed, 06 Jan 2010 02:17:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=XLaUux+HU8ekDWNfLaXDxWd+BggtloHBTknhjeboAe4=; b=eUrNRYjQCZIFDngLLHUEHr/QgWhdidouLD0aS37AqLvTVNXzB/Nie1SoCDns0bV95J AX/LCU3owjv5SKlvZvNHmyKAXHdvyBBxSuXWU6oPg2h5oDwv0K6l2Xj9Fge6XhGTGoBn JvIVUbJneX8clkYUuixAW2f1JvxxNBcR8dTDU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=mT5EKIXKfo5aUSQJQYKYmaInSstrgseh3gcmnmPRGn7y0TLSYsfAJPFq/lK8vcs17L cG/xqdF7vM2AZtwEgAJ0uTNTDQXGCHZnZ7/01ECrDfsT6Ou4NVMUoYFQ2gut0+kBqpxG h1p9KLlI5PrrSEnzdUKUlaets0kxr1ecFfllI= MIME-Version: 1.0 Received: by 10.204.156.195 with SMTP id y3mr366309bkw.46.1262773069145; Wed, 06 Jan 2010 02:17:49 -0800 (PST) In-Reply-To: References: <84my9rfuhg.fsf@linux-b2a3.site> <200908041230.n74CUQUd025123@godzilla.ics.uci.edu> From: Juanma Barranquero Date: Wed, 6 Jan 2010 11:17:29 +0100 Message-ID: Subject: Re: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 3224 Cc: 3224@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Wed, Jan 6, 2010 at 06:38, Stefan Monnier wro= te: > That doesn't sound right. > Why is bfn nil in your case, and why should we not update > uniquify-item-dirname correspondingly? Sorry, you're right. It failed because of the problem with `unquify-buffer-file-name'. This part of the patch isn't really needed anymore. > I don't thing that's right. =C2=A0Instead, you probably want to set > list-buffers-directory to something like (expand-file-name "*vc-dir*"), > as is done in PCL-CVS. OK, that's the other alternative, although that function should get the right thing when it happens to receive a directory name. I'll test it and send a new patch. Juanma From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 06 09:29:00 2010 Received: (at 3224) by debbugs.gnu.org; 6 Jan 2010 14:29:00 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSWse-0001sd-KK for submit@debbugs.gnu.org; Wed, 06 Jan 2010 09:29:00 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSWsb-0001sY-Ki for 3224@debbugs.gnu.org; Wed, 06 Jan 2010 09:28:59 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtIFAIIsREvO+KPG/2dsb2JhbACBRdEahDAEiig X-IronPort-AV: E=Sophos;i="4.49,229,1262581200"; d="scan'208";a="53143215" Received: from 206-248-163-198.dsl.teksavvy.com (HELO ceviche.home) ([206.248.163.198]) by ironport2-out.pppoe.ca with ESMTP; 06 Jan 2010 09:28:52 -0500 Received: by ceviche.home (Postfix, from userid 20848) id 591DFB4077; Wed, 6 Jan 2010 09:28:52 -0500 (EST) From: Stefan Monnier To: Juanma Barranquero Subject: Re: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used Message-ID: References: <84my9rfuhg.fsf@linux-b2a3.site> <200908041230.n74CUQUd025123@godzilla.ics.uci.edu> Date: Wed, 06 Jan 2010 09:28:52 -0500 In-Reply-To: (Juanma Barranquero's message of "Wed, 6 Jan 2010 11:17:29 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 3224 Cc: 3224@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.2 (--) > OK, that's the other alternative, although that function should get > the right thing when it happens to receive a directory name. AFAIK it already *does* the right thing (try it with Dired buffers, since these are the (only?) ones that should have a directory name), unless maybe we don't agree on what is the right thing in that case. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 07 06:14:28 2010 Received: (at 3224) by debbugs.gnu.org; 7 Jan 2010 11:14:28 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSqJw-00059W-94 for submit@debbugs.gnu.org; Thu, 07 Jan 2010 06:14:28 -0500 Received: from mail-bw0-f216.google.com ([209.85.218.216]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSqJu-00059R-Im for 3224@debbugs.gnu.org; Thu, 07 Jan 2010 06:14:27 -0500 Received: by bwz8 with SMTP id 8so11684302bwz.39 for <3224@debbugs.gnu.org>; Thu, 07 Jan 2010 03:14:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=gwZBrlEARBEDdxdt1JteQGfHfeZpdJ5oca+Dgd210I0=; b=wS7O315/ZPLxzUlGnwX2MmC1Jt9NRNm3dZpztPgeVzYgJCGJUZGN+qM95KPh0Bl0Pm h2y3BGYuLT9iGH6n/1ggVy32Ftl49mVsnpsXh+JeNswg9QPIQlZegHOEtWP8DiHV76Pr f/ok/vwAcLa3gtgqebKsygvyg+3iSs9IC2+0s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=vi9wpL74DOL2fVKN95Ry1gZRC4GupTLHqW2SxqZici5EnqIpnOQqqwh+ZM2bOeM7fb rWJGsirs/sKi/1zofnZieNTE0+I7wyaKvZZirBgwdjfx6snZ57UFwjAvbLz72o3IFyuC 9b8ScajgbrKfxeldATJPYZ9Hol5KQvAI8PgSw= MIME-Version: 1.0 Received: by 10.204.156.3 with SMTP id u3mr410520bkw.179.1262862862918; Thu, 07 Jan 2010 03:14:22 -0800 (PST) In-Reply-To: References: <84my9rfuhg.fsf@linux-b2a3.site> <200908041230.n74CUQUd025123@godzilla.ics.uci.edu> From: Juanma Barranquero Date: Thu, 7 Jan 2010 12:14:01 +0100 Message-ID: Subject: Re: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 3224 Cc: 3224@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Wed, Jan 6, 2010 at 15:28, Stefan Monnier wrote: > AFAIK it already *does* the right thing (try it with Dired buffers, > since these are the (only?) ones that should have a directory name), > unless maybe we don't agree on what is the right thing in that case. The dired and vc-dired cases are not exactly equivalent. In the dired case, uniquify-buffer-file-name is called when there's a conflict like (dired "/my/dir-1/A") (dired "/my/dir-2/A") (because /my/dir/A vs my/dir/B obviously does not produce any conflict). In this case, u-b-f-n gets, via `list-buffers-directory', the full path including the A: /my/dir1/A, and strips the last element and returns /my/dir1. That works for uniquify, because it will be getting path elements from /my/dir1 vs. /my/dir2, just as it needs. The resulting buffers (with forward syntax) will be "A|dir-1" and "A|dir-2". In the OP's vc-dir case, the conflicts happens in this: (vc-dir "/my/dir/A") (vc-dir "/my/dir/B") because the conflict uniquify tries to solve is at the buffer-name level, which is always *vc-dir*. /my/dir/A and /my/dir/B are directories, and so elements for uniquifying; the expected result is "*vc-dir*|A" and "*vc-dir*|B". However, u-b-f-n gets "/my/dir/B" (via list-buffers-directory), which is correct, and again strips the last element and returns "/my/dir". So uniquify ends producting "*vc-dir*|A" and "*vc-dir*|dir", which is incorrect. Now, if you consider than always removing an element from BUFFER is the right thing to do for u-b-f-n, we'll have to agree to disagree; IMHO, that's not what its docstring says. From it, I would expect u-b-f-n to return a directory unchanged. That said, my "fix" to u-b-f-n would break uniquifying of dired buffers (thanks for pointing that out), so perhaps we'll have to live with such behavior. In that case, I'd suggest reworking the docstring of u-b-f-n. Going with your proposed fix via `list-buffers-directory', the following patch works. I have not added a comment to the change to `list-buffers-directory' because I don't really know how to explain it; it seems a hack to me to force a variable named `list-buffers-directory' to contain a bogus name part just to help uniquify. Comments? Dan, what do you think? Juanma === modified file 'lisp/vc-dir.el' --- lisp/vc-dir.el 2009-12-05 00:24:03 +0000 +++ lisp/vc-dir.el 2010-01-07 11:09:16 +0000 @@ -101,7 +101,9 @@ (return buffer)))))))) (or buf ;; Create a new buffer named BNAME. - (with-current-buffer (create-file-buffer bname) + ;; We pass a filename to create-file-buffer because it is what + ;; the function expects, and also what uniquify needs (if active) + (with-current-buffer (create-file-buffer (expand-file-name bname dir)) (cd dir) (vc-setup-buffer (current-buffer)) ;; Reset the vc-parent-buffer-name so that it does not appear @@ -928,7 +930,7 @@ (set (make-local-variable 'vc-ewoc) (ewoc-create #'vc-dir-printer)) (set (make-local-variable 'revert-buffer-function) 'vc-dir-revert-buffer-function) - (setq list-buffers-directory default-directory) + (setq list-buffers-directory (expand-file-name "*vc-dir*" default-directory)) (add-to-list 'vc-dir-buffers (current-buffer)) ;; Make sure that if the directory buffer is killed, the update ;; process running in the background is also killed. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 07 09:55:18 2010 Received: (at 3224) by debbugs.gnu.org; 7 Jan 2010 14:55:18 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NStle-0007E9-Iu for submit@debbugs.gnu.org; Thu, 07 Jan 2010 09:55:18 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NStlc-0007E3-4H for 3224@debbugs.gnu.org; Thu, 07 Jan 2010 09:55:16 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsgEABiFRUvO+KPG/2dsb2JhbACBRNF8hDAEiik X-IronPort-AV: E=Sophos;i="4.49,235,1262581200"; d="scan'208";a="53274788" Received: from 206-248-163-198.dsl.teksavvy.com (HELO pastel.home) ([206.248.163.198]) by ironport2-out.pppoe.ca with ESMTP; 07 Jan 2010 09:54:57 -0500 Received: by pastel.home (Postfix, from userid 20848) id 602867FF3; Thu, 7 Jan 2010 09:54:57 -0500 (EST) From: Stefan Monnier To: Juanma Barranquero Subject: Re: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used Message-ID: References: <84my9rfuhg.fsf@linux-b2a3.site> <200908041230.n74CUQUd025123@godzilla.ics.uci.edu> Date: Thu, 07 Jan 2010 09:54:57 -0500 In-Reply-To: (Juanma Barranquero's message of "Thu, 7 Jan 2010 12:14:01 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 3224 Cc: 3224@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > The dired and vc-dired cases are not exactly equivalent. I know. The right way to think about it is in terms of file names. If you want uniquify to show you "dir-1|A" and "dir-2|A", then the file names should be "/foo/dir-1/A" and "/foo/dir-2/A". So for vc-dir, you want "*vc-dir*" instead of A, right? So you want file names of the form "/foo/dir-1/*vc-dir*" and "/foo/dir-2/*vc-dir*". > Now, if you consider than always removing an element from BUFFER is > the right thing to do for u-b-f-n, we'll have to agree to disagree; > IMHO, that's not what its docstring says. Yes, the docstring has been wrong since day one and I'm guilty of never fixing it. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 07 10:10:20 2010 Received: (at 3224) by debbugs.gnu.org; 7 Jan 2010 15:10:20 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSu0C-0007KM-Fg for submit@debbugs.gnu.org; Thu, 07 Jan 2010 10:10:20 -0500 Received: from mail-bw0-f216.google.com ([209.85.218.216]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSu06-0007Jz-0d for 3224@debbugs.gnu.org; Thu, 07 Jan 2010 10:10:14 -0500 Received: by bwz8 with SMTP id 8so11833050bwz.39 for <3224@debbugs.gnu.org>; Thu, 07 Jan 2010 07:10:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=eK2L19hsSc38hCIXf9zLqoxPfWtOTG8IkHWIuEMAnio=; b=XTxYGj/2v9XDKR4c/f4DEoM16X/waJo7OTLTU2LuR1tDjF4C7ZBVzIW5WtfK7OwVZx e4RVzUSKkAAQbnC9UE1YSzYWt0GZBQTNi+03X3PvlK2Qdy94mD55OFe16VRRagMDae5K W19FVrgyIjuNtDXEovnfqyBm5KsidCWebv9Qw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=k30WLK37fZM3HBs//44zAOcBhTbxqPp6iANrGDFki8IVXHaSsPHecTKODvkhFP8pZm ZxTPBnLLmf7QNJMKxpBaql+kwPxMQWsveIQyieb8Ll9pMkkdpg3eUW0ALYcoJwpvlyNP uoNAwd6uThMzvf5xFXRx3vA1JzT1ssUXFCB8M= MIME-Version: 1.0 Received: by 10.204.156.195 with SMTP id y3mr1541404bkw.46.1262877008184; Thu, 07 Jan 2010 07:10:08 -0800 (PST) In-Reply-To: References: <84my9rfuhg.fsf@linux-b2a3.site> <200908041230.n74CUQUd025123@godzilla.ics.uci.edu> From: Juanma Barranquero Date: Thu, 7 Jan 2010 16:09:48 +0100 Message-ID: Subject: Re: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 3224 Cc: 3224@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Thu, Jan 7, 2010 at 15:54, Stefan Monnier wrote: > So for vc-dir, you want "*vc-dir*" instead of A, right? So you want > file names of the form "/foo/dir-1/*vc-dir*" and "/foo/dir-2/*vc-dir*". For such dired-style buffers, uniquify uses list-buffers-directory, so the only way is as I did in the patch I just sent. Do you want that patch installed, assuming Dan does not oppose it? > Yes, the docstring has been wrong since day one Well, I'm glad we agree on this, then. (As an aside: the previous time we discussed this, you suggested that `list-buffers-directory' has the wrong name, and also that perhaps it would be safer/wiser to create another variable for uses like the one in uniquify. I think we should revisit this issue after the release.) Juanma From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 07 10:10:29 2010 Received: (at 3224) by debbugs.gnu.org; 7 Jan 2010 15:10:30 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSu0L-0007KZ-LQ for submit@debbugs.gnu.org; Thu, 07 Jan 2010 10:10:29 -0500 Received: from paul-mcgann-v0.ics.uci.edu ([128.195.1.147]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSu0K-0007KT-0I for 3224@debbugs.gnu.org; Thu, 07 Jan 2010 10:10:28 -0500 Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by paul-mcgann-v0.ics.uci.edu (8.13.8/8.13.8) with ESMTP id o07FAFhf005243 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 7 Jan 2010 07:10:15 -0800 Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id o07FAFip016867; Thu, 7 Jan 2010 07:10:15 -0800 (PST) Date: Thu, 7 Jan 2010 07:10:15 -0800 (PST) Message-Id: <201001071510.o07FAFip016867@godzilla.ics.uci.edu> From: Dan Nicolaescu To: Juanma Barranquero Subject: Re: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used References: <84my9rfuhg.fsf@linux-b2a3.site> <200908041230.n74CUQUd025123@godzilla.ics.uci.edu> X-Debbugs-No-Ack: yes In-Reply-To: (Juanma Barranquero's message of "Thu, 7 Jan 2010 12:14:01 +0100") Lines: 67 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please send mail to helpdesk@ics.uci.edu or more information X-ICS-MailScanner-ID: o07FAFhf005243 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-1.363, required 5, autolearn=disabled, ALL_TRUSTED -1.44, TW_BZ 0.08) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-Spam-Status: No X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 3224 Cc: 3224@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) Juanma Barranquero writes: > On Wed, Jan 6, 2010 at 15:28, Stefan Monnier wrote: > > > AFAIK it already *does* the right thing (try it with Dired buffers, > > since these are the (only?) ones that should have a directory name), > > unless maybe we don't agree on what is the right thing in that case. > > The dired and vc-dired cases are not exactly equivalent. In the dired > case, uniquify-buffer-file-name is called when there's a conflict like > > (dired "/my/dir-1/A") > (dired "/my/dir-2/A") > > (because /my/dir/A vs my/dir/B obviously does not produce any conflict). > > In this case, u-b-f-n gets, via `list-buffers-directory', the full > path including the A: /my/dir1/A, and strips the last element and > returns /my/dir1. That works for uniquify, because it will be getting > path elements from /my/dir1 vs. /my/dir2, just as it needs. The > resulting buffers (with forward syntax) will be "A|dir-1" and > "A|dir-2". > > In the OP's vc-dir case, the conflicts happens in this: > > (vc-dir "/my/dir/A") > (vc-dir "/my/dir/B") > > because the conflict uniquify tries to solve is at the buffer-name > level, which is always *vc-dir*. /my/dir/A and /my/dir/B are > directories, and so elements for uniquifying; the expected result is > "*vc-dir*|A" and "*vc-dir*|B". However, u-b-f-n gets "/my/dir/B" (via > list-buffers-directory), which is correct, and again strips the last > element and returns "/my/dir". So uniquify ends producting > "*vc-dir*|A" and "*vc-dir*|dir", which is incorrect. > > Now, if you consider than always removing an element from BUFFER is > the right thing to do for u-b-f-n, we'll have to agree to disagree; > IMHO, that's not what its docstring says. From it, I would expect > u-b-f-n to return a directory unchanged. That said, my "fix" to > u-b-f-n would break uniquifying of dired buffers (thanks for pointing > that out), so perhaps we'll have to live with such behavior. In that > case, I'd suggest reworking the docstring of u-b-f-n. > > Going with your proposed fix via `list-buffers-directory', the > following patch works. I have not added a comment to the change to > `list-buffers-directory' because I don't really know how to explain > it; it seems a hack to me to force a variable named > `list-buffers-directory' to contain a bogus name part just to help > uniquify. > > Comments? Dan, what do you think? Does it work if you have multiple *vc-dir* buffers for the same directory? Do something like: mkdir /tmp/test cd /tmp/test git init bzr init C-u C-x v d /tmp/test RET Bzr RET C-u C-x v d /tmp/test RET Git RET I'm fine with it if you convince Stefan this is TRTD. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 07 10:19:42 2010 Received: (at 3224) by debbugs.gnu.org; 7 Jan 2010 15:19:42 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSu9F-0007Pf-Ta for submit@debbugs.gnu.org; Thu, 07 Jan 2010 10:19:42 -0500 Received: from mail-bw0-f216.google.com ([209.85.218.216]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSu92-0007PT-M6 for 3224@debbugs.gnu.org; Thu, 07 Jan 2010 10:19:40 -0500 Received: by bwz8 with SMTP id 8so11842713bwz.39 for <3224@debbugs.gnu.org>; Thu, 07 Jan 2010 07:19:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=Yz3HvnIv3xjucavHQT3uRl4093TcEW2+HRhSfFolTBk=; b=WDh8DaaQ1pIfZCwa4emZRDoV9YFHkc0Lx1PhjdfNMnPJDOp3RELAErlt/XpkEX2HcQ TnO4kcQ81pJ2GkGxcGA2epGStaHhJHVabhU6bZZdL/T6hSh/ep/pI1vhmtYNGwuRfU/M OA4vNOzErON55pDRtN6oIVDYlpupz8VDusofg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=rjzo4sV4IIOawbft++Wtac/V8ywK5l4eaG11TWTqi9vpwVgLeP66yTiwUQERLvWa+k Gy6VsHwRgfgPEXdtrAQ+mOYxUQOy+MKxiHszDiXYbHtiKO+tpb3xIRgrUPqMCVbTTV7C JTgc2xKb783H4BaJVQaTZZ5aLJbIukHHcHymA= MIME-Version: 1.0 Received: by 10.204.15.24 with SMTP id i24mr528834bka.2.1262877563247; Thu, 07 Jan 2010 07:19:23 -0800 (PST) In-Reply-To: <201001071510.o07FAFip016867@godzilla.ics.uci.edu> References: <84my9rfuhg.fsf@linux-b2a3.site> <200908041230.n74CUQUd025123@godzilla.ics.uci.edu> <201001071510.o07FAFip016867@godzilla.ics.uci.edu> From: Juanma Barranquero Date: Thu, 7 Jan 2010 16:19:03 +0100 Message-ID: Subject: Re: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used To: Dan Nicolaescu Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 3224 Cc: 3224@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Thu, Jan 7, 2010 at 16:10, Dan Nicolaescu wrote: > Does it work if you have multiple *vc-dir* buffers for the same > directory? > > C-u C-x v d /tmp/test RET Bzr RET > C-u C-x v d /tmp/test RET Git RET In this case, uniquify is unable to "fix" the names (because they are identical), and reverts to using "*vc-dir*" and "*vc-dir*<2>". We could work around it, by using the backend name as part of the path, but it's quite hackish and horrible (there's nothing precluding a directory being named "git" or "bzr"). If such double-VCS directories are common, I'd suggest using it as part of the buffer name: "*vc-dir* [Bazaar]", "*vc-dir* [Git]", etc. But that's unrelated to #3224. > I'm fine with it if you convince Stefan this is TRTD. OK, thanks. Juanma From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 07 14:53:51 2010 Received: (at 3224) by debbugs.gnu.org; 7 Jan 2010 19:53:51 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSyQZ-0001IX-7S for submit@debbugs.gnu.org; Thu, 07 Jan 2010 14:53:51 -0500 Received: from pruche.dit.umontreal.ca ([132.204.246.22]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSyQX-0001IQ-OJ for 3224@debbugs.gnu.org; Thu, 07 Jan 2010 14:53:49 -0500 Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id o07JriwR007967; Thu, 7 Jan 2010 14:53:44 -0500 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 6BB3D3A105; Thu, 7 Jan 2010 14:53:44 -0500 (EST) From: Stefan Monnier To: Juanma Barranquero Subject: Re: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used Message-ID: References: <84my9rfuhg.fsf@linux-b2a3.site> <200908041230.n74CUQUd025123@godzilla.ics.uci.edu> Date: Thu, 07 Jan 2010 14:53:44 -0500 In-Reply-To: (Juanma Barranquero's message of "Thu, 7 Jan 2010 16:09:48 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3443=0 X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: 3224 Cc: 3224@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.5 (-) >> So for vc-dir, you want "*vc-dir*" instead of A, right? So you want >> file names of the form "/foo/dir-1/*vc-dir*" and "/foo/dir-2/*vc-dir*". > For such dired-style buffers, uniquify uses list-buffers-directory, so > the only way is as I did in the patch I just sent. > Do you want that patch installed, assuming Dan does not oppose it? Yes, it looks OK. >> Yes, the docstring has been wrong since day one > Well, I'm glad we agree on this, then. Feel free to rename it to uniquify-buffer-dir-name and adjust the docstring. > (As an aside: the previous time we discussed this, you suggested that > `list-buffers-directory' has the wrong name, and also that perhaps it > would be safer/wiser to create another variable for uses like the one > in uniquify. I think we should revisit this issue after the release.) Agreed, Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 07 14:57:16 2010 Received: (at 3224) by debbugs.gnu.org; 7 Jan 2010 19:57:16 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSyTs-0001KQ-JJ for submit@debbugs.gnu.org; Thu, 07 Jan 2010 14:57:16 -0500 Received: from pruche.dit.umontreal.ca ([132.204.246.22]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSyTq-0001KL-S2 for 3224@debbugs.gnu.org; Thu, 07 Jan 2010 14:57:15 -0500 Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id o07Jv9UM008140; Thu, 7 Jan 2010 14:57:09 -0500 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id B7AE53A105; Thu, 7 Jan 2010 14:57:09 -0500 (EST) From: Stefan Monnier To: Dan Nicolaescu Subject: Re: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used Message-ID: References: <84my9rfuhg.fsf@linux-b2a3.site> <200908041230.n74CUQUd025123@godzilla.ics.uci.edu> <201001071510.o07FAFip016867@godzilla.ics.uci.edu> Date: Thu, 07 Jan 2010 14:57:09 -0500 In-Reply-To: <201001071510.o07FAFip016867@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Thu, 7 Jan 2010 07:10:15 -0800 (PST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3443=0 X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: 3224 Cc: 3224@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.5 (-) > Does it work if you have multiple *vc-dir* buffers for the same > directory? > Do something like: > mkdir /tmp/test > cd /tmp/test > git init > bzr init > C-u C-x v d /tmp/test RET Bzr RET > C-u C-x v d /tmp/test RET Git RET Depending on what you mean by "work", I think it does work, but probably not ideally. To make it work better, maybe the backend name should appear in the list-buffers-directory. E.g. /foo/bar/*vc-dir-BACKEND* or /foo/bar/BACKEND/*vc-dir*. OTOH it should not be a common case, so maybe it's not that important to make it work well. > I'm fine with it if you convince Stefan this is TRTD. It's what I use in PCL-CVS. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 07 18:06:19 2010 Received: (at 3224) by debbugs.gnu.org; 7 Jan 2010 23:06:19 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NT1Qp-0003TT-DW for submit@debbugs.gnu.org; Thu, 07 Jan 2010 18:06:19 -0500 Received: from mail-bw0-f216.google.com ([209.85.218.216]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NT1Qn-0003TO-38 for 3224@debbugs.gnu.org; Thu, 07 Jan 2010 18:06:17 -0500 Received: by bwz8 with SMTP id 8so12205533bwz.39 for <3224@debbugs.gnu.org>; Thu, 07 Jan 2010 15:06:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=MJNwzhAf717f2isab9dbnJEELkNvg5QrZfxRE3bB5HE=; b=kSPQvl1uDmR1YebAqcjYlsu9Q44jsbK5aaYCy/Nu4/VRbYJHxHnBdKgMsQK30OnUkU 5XiTol4CYCF1i5tKY38+FDK7YtjHzznl1qGHwIgxIpJ3Vr3NDMIm8T+ugETsQ60NQbT+ YBoIYaNSxRj1+514zQIAPDdEr+7BtCyEnwRdo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=dLzLn2A3J9xhZ6dqA25RXQhh0bSij0mE6rhmLoVm0Kw1rurz0XJdcbsMoFvAdjaESU aeqse76epcxHNariPpFxLsQRfe8XsohkXMUF1rmigkauQzRybdenAm6cmicUcoLpTDbD gwJijKzD6g/OS0PXenWFEnNZ3+R8U1nU3X2JA= MIME-Version: 1.0 Received: by 10.204.18.18 with SMTP id u18mr7355421bka.107.1262905571223; Thu, 07 Jan 2010 15:06:11 -0800 (PST) In-Reply-To: References: <84my9rfuhg.fsf@linux-b2a3.site> <200908041230.n74CUQUd025123@godzilla.ics.uci.edu> From: Juanma Barranquero Date: Fri, 8 Jan 2010 00:05:51 +0100 Message-ID: Subject: Re: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 3224 Cc: 3224@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Thu, Jan 7, 2010 at 20:53, Stefan Monnier wrote: > Feel free to rename it to uniquify-buffer-dir-name and adjust the docstring. I'm not sure how to describe what it does. It returns the name of the parent directory of the buffer; something like that. BTW, in that function, this bit (if (memq major-mode uniquify-list-buffers-directory-modes) list-buffers-directory)))) and the whole `uniquify-list-buffers-directory-modes' seem a bit redundant; adding a mode to the variable won't work unless the mode function defines `list-buffers-directory', and even so, if the buffer has a `buffer-file-name', `list-buffers-directory' won't be used. So it would be easier to remove the variable and do the check so: (let ((filename (or buffer-file-name - (if (memq major-mode uniquify-list-buffers-directory-modes) - list-buffers-directory)))) + (bound-and-true-p list-buffers-directory)))) (when filename (directory-file-name It is even more general, because any mode for buffers that do not have a buffer-file-name but do define list-buffers-directory will automatically work with uniquify. Juanma From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 07 22:22:26 2010 Received: (at 3224) by debbugs.gnu.org; 8 Jan 2010 03:22:26 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NT5Qf-0005Yy-RR for submit@debbugs.gnu.org; Thu, 07 Jan 2010 22:22:25 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NT5Qd-0005Yt-IS for 3224@debbugs.gnu.org; Thu, 07 Jan 2010 22:22:24 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArsEAKczRkvO+KPG/2dsb2JhbACBRNJyhC8Eiik X-IronPort-AV: E=Sophos;i="4.49,239,1262581200"; d="scan'208";a="53339726" Received: from 206-248-163-198.dsl.teksavvy.com (HELO ceviche.home) ([206.248.163.198]) by ironport2-out.pppoe.ca with ESMTP; 07 Jan 2010 22:22:19 -0500 Received: by ceviche.home (Postfix, from userid 20848) id 53925B4270; Thu, 7 Jan 2010 22:22:19 -0500 (EST) From: Stefan Monnier To: Juanma Barranquero Subject: Re: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used Message-ID: References: <84my9rfuhg.fsf@linux-b2a3.site> <200908041230.n74CUQUd025123@godzilla.ics.uci.edu> Date: Thu, 07 Jan 2010 22:22:19 -0500 In-Reply-To: (Juanma Barranquero's message of "Fri, 8 Jan 2010 00:05:51 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 3224 Cc: 3224@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > - (if (memq major-mode uniquify-list-buffers-directory-modes) > - list-buffers-directory)))) > + (bound-and-true-p list-buffers-directory)))) Problem is that some modes use list-buffers-directory for incompatible purposes. E.g. shell-mode uses it to display the CWD of the shell in the buffer-menu. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 07 22:41:00 2010 Received: (at 3224-done) by debbugs.gnu.org; 8 Jan 2010 03:41:00 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NT5ie-0005hu-0q for submit@debbugs.gnu.org; Thu, 07 Jan 2010 22:41:00 -0500 Received: from mail-fx0-f226.google.com ([209.85.220.226]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NT5ib-0005hp-Hx for 3224-done@debbugs.gnu.org; Thu, 07 Jan 2010 22:40:58 -0500 Received: by fxm26 with SMTP id 26so16800242fxm.39 for <3224-done@debbugs.gnu.org>; Thu, 07 Jan 2010 19:40:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=yy8/NwBvtofjIyOQXMNhY3abp/tA3KZyItw2/BQaBWU=; b=oMzDylWwr6V6TZ/DifP+fuunqis2h4VH/1LL/E+A2865KDGE1YuMSzwTCtbKDnrSTl ddDNu9IdrG4RHaAkdfXM7xweVnI5u1Peh5beaYcqtLea1IzYfuooXNqXUnDvtpUyq/Xt ZmZE3Fu1k90gQiUMKuVnpF8qIwLXeEl1ZugXM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=JfhhCezOExCGyfdbPQ2oLTAeEDXi5oS6mxDDrxsk//qgQAV62rESFQNTYuYxa+Bqwj vq46fQG5ggd170W7qm19Bhg4q55SbtO7Fc6wgbg2GXYmfusewvRA8DEKAJBow0m4HVh5 qdA11uAYKzn31nxKlIyJ4ea2F8kN9O02CpxO8= MIME-Version: 1.0 Received: by 10.239.136.18 with SMTP id f18mr1351335hbf.64.1262922053122; Thu, 07 Jan 2010 19:40:53 -0800 (PST) In-Reply-To: References: <84my9rfuhg.fsf@linux-b2a3.site> From: Juanma Barranquero Date: Fri, 8 Jan 2010 04:40:33 +0100 Message-ID: Subject: Re: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 3224-done Cc: 3224-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Fri, Jan 8, 2010 at 04:22, Stefan Monnier wro= te: > Problem is that some modes use list-buffers-directory for incompatible > purposes. =C2=A0E.g. shell-mode uses it to display the CWD of the shell i= n > the buffer-menu. In the particular case of shell that would not cause trouble anyway; shell for the same buffer name just pops to that buffer, and C-u M-x shell calls `generate-new-buffer-name' and bypasses uniquify. AFAICS, eshell does the same thing (C-u M-x eshell brings a "*eshell*<2>" buffer). But this is all best left post-release, for the introduction of a new varia= ble. I'm closing this bug now, as the patch is already installed. Juanma From unknown Sat Aug 16 10:44:16 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 05 Feb 2010 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A long time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 21 07:52:33 2010 Received: (at control) by debbugs.gnu.org; 21 Jul 2010 11:52:33 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObXqi-0003Zf-Sm for submit@debbugs.gnu.org; Wed, 21 Jul 2010 07:52:33 -0400 Received: from mail-bw0-f44.google.com ([209.85.214.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObXqh-0003Za-1y for control@debbugs.gnu.org; Wed, 21 Jul 2010 07:52:31 -0400 Received: by bwz7 with SMTP id 7so111035bwz.3 for ; Wed, 21 Jul 2010 04:52:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=A+uCP5XRFz87BV2VZc0XzWQNG5vP+JTIXar+8JhUvZI=; b=qyUoyvw5EmTGoF89TLccAQ9AgNg1qEHZ17JjA4HVlPzyQ7FUK+GA9McQzgwCHryklS 3qxx6lUuhmOrdcAtsq46ku/hTTDnQWh+V0udutlv/7cv6y/WvhfD/NXapvpJXkzkqkE+ LNlIeEi9Vj56d6NK0FE9zrimAQUf7QqcD7xX8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=DuR6/7y23cN51znibATb+tYXP6htrn6oQfrEIUdOpYqdwGpU1nRDai/n7DZouboncZ EduVxUzFQ5rbfZXrjvkZAUCFQmUZIE7T/50HGon2+Dxaxrp7szFLWoHttX7lKekjXYec T9ghCZreSTzpr9pzscgMHZHHK4nR+CZES23ow= Received: by 10.204.162.204 with SMTP id w12mr25881bkx.135.1279713176583; Wed, 21 Jul 2010 04:52:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.180.136 with HTTP; Wed, 21 Jul 2010 04:52:33 -0700 (PDT) In-Reply-To: References: <20100720004014.D0F2F11E286@eromajin.arikm.com> From: Juanma Barranquero Date: Wed, 21 Jul 2010 13:52:33 +0200 Message-ID: Subject: Re: bug#6672: 23.1; uniquify in vc-dir-mode inaccurate To: Arik Mitschang Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: control Cc: control@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) unarchive 3224 merge 3224 6672 close 6672 quit > and it comes up with a buffer named *vc-dir*|arikm and renames > the other buffer *vc-dir*|vm-dev Aha. This is bug#3224, already fixed from Emacs 23.2 on. See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D3224 I suggest you upgrade to 23.2. Thanks, =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 21 08:02:35 2010 Received: (at control) by debbugs.gnu.org; 21 Jul 2010 12:02:35 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObY0Q-0004HW-VJ for submit@debbugs.gnu.org; Wed, 21 Jul 2010 08:02:35 -0400 Received: from mail-bw0-f44.google.com ([209.85.214.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObY0P-0004HR-5h for control@debbugs.gnu.org; Wed, 21 Jul 2010 08:02:33 -0400 Received: by bwz7 with SMTP id 7so116569bwz.3 for ; Wed, 21 Jul 2010 05:02:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type; bh=7isMvksavtYjc6+Ck3vbYdk0+xwRYvbSL21jtiSRwec=; b=WO2/fJVy/A9cZuDXSWYO3UlPYeH3qOTuKWGRa1YHgI9y9McZl8d4y7W3SUYnGq90Rg uKqh8nulnFPeanVPsDum05Y6GOS3tIK6s40eWuMLj7aztqeYqQqVonhz2rl6HtvZj3tF XVPjagK5iUKq4n5u82Jb1ZBySHF6onEJDZ7+w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=l41ua2lxQWM1n2ABDw3a4h0MWUmleKx/hGoK0imBByU/euLHjTsvTWMG3NZIetZoDd DqtZ/SjfT3yQbKn4S25Gz6q/y54OdovtsjwW27TCz6CayzGKCkxNp7mopkqsnyB7pTG2 YvIBkBAaLA/xNrIHckMYcFE/NRZHrZvkYQD0Q= Received: by 10.204.162.204 with SMTP id w12mr35429bkx.135.1279713778800; Wed, 21 Jul 2010 05:02:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.180.136 with HTTP; Wed, 21 Jul 2010 05:02:38 -0700 (PDT) From: Juanma Barranquero Date: Wed, 21 Jul 2010 14:02:38 +0200 Message-ID: Subject: To: control@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) forcemerge 3224 6672 quit From unknown Sat Aug 16 10:44:16 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 19 Aug 2010 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator