From unknown Sat Aug 16 16:05:58 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used Reply-To: Magnus Henoch , 3224@debbugs.gnu.org Resent-From: Magnus Henoch Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 05 May 2009 15:25:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 3224 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.124153676325022 (code B ref -1); Tue, 05 May 2009 15:25:06 +0000 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 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 unknown Sat Aug 16 16:05:58 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used Reply-To: Dan Nicolaescu , 3224@debbugs.gnu.org Resent-From: Dan Nicolaescu Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 04 Aug 2009 12:35:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3224 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3224-submit@emacsbugs.donarmstrong.com id=B3224.12493890482750 (code B ref 3224); Tue, 04 Aug 2009 12:35:05 +0000 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 References: <84my9rfuhg.fsf@linux-b2a3.site> 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 unknown Sat Aug 16 16:05:58 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used Reply-To: Juanma Barranquero , 3224@debbugs.gnu.org Mail-Followup-To: Juanma Barranquero , 3224@debbugs.gnu.org Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Jan 2010 04:02:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 3224 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3224-submit@debbugs.gnu.org id=B3224.126275047820524 (code B ref 3224); Wed, 06 Jan 2010 04:02:02 +0000 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: To: Dan Nicolaescu Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) 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 unknown Sat Aug 16 16:05:58 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used Reply-To: Dan Nicolaescu , 3224@debbugs.gnu.org Mail-Followup-To: Dan Nicolaescu , 3224@debbugs.gnu.org Resent-From: Dan Nicolaescu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Jan 2010 04:56:01 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 3224 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3224-submit@debbugs.gnu.org id=B3224.126275374022086 (code B ref 3224); Wed, 06 Jan 2010 04:56:01 +0000 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 References: <84my9rfuhg.fsf@linux-b2a3.site> <200908041230.n74CUQUd025123@godzilla.ics.uci.edu> 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 (--) 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 unknown Sat Aug 16 16:05:58 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used Reply-To: Stefan Monnier , 3224@debbugs.gnu.org Mail-Followup-To: Stefan Monnier , 3224@debbugs.gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Jan 2010 05:39:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 3224 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3224-submit@debbugs.gnu.org id=B3224.126275629323268 (code B ref 3224); Wed, 06 Jan 2010 05:39:02 +0000 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 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 (--) 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 unknown Sat Aug 16 16:05:58 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used Reply-To: Juanma Barranquero , 3224@debbugs.gnu.org Mail-Followup-To: Juanma Barranquero , 3224@debbugs.gnu.org Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Jan 2010 10:18:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 3224 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3224-submit@debbugs.gnu.org id=B3224.126277307430853 (code B ref 3224); Wed, 06 Jan 2010 10:18:02 +0000 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: To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) 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 unknown Sat Aug 16 16:05:58 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used Reply-To: Stefan Monnier , 3224@debbugs.gnu.org Mail-Followup-To: Stefan Monnier , 3224@debbugs.gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Jan 2010 14:29:01 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 3224 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3224-submit@debbugs.gnu.org id=B3224.12627881407234 (code B ref 3224); Wed, 06 Jan 2010 14:29:01 +0000 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 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 (--) 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 unknown Sat Aug 16 16:05:58 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used Reply-To: Juanma Barranquero , 3224@debbugs.gnu.org Mail-Followup-To: Juanma Barranquero , 3224@debbugs.gnu.org Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Jan 2010 11:15:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 3224 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3224-submit@debbugs.gnu.org id=B3224.126286286819813 (code B ref 3224); Thu, 07 Jan 2010 11:15:02 +0000 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: To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.6 (--) 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 unknown Sat Aug 16 16:05:58 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used Reply-To: Stefan Monnier , 3224@debbugs.gnu.org Mail-Followup-To: Stefan Monnier , 3224@debbugs.gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Jan 2010 14:56:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 3224 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3224-submit@debbugs.gnu.org id=B3224.126287611827788 (code B ref 3224); Thu, 07 Jan 2010 14:56:02 +0000 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 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 (--) 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 unknown Sat Aug 16 16:05:58 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used Reply-To: Juanma Barranquero , 3224@debbugs.gnu.org Mail-Followup-To: Juanma Barranquero , 3224@debbugs.gnu.org Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Jan 2010 15:11:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 3224 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3224-submit@debbugs.gnu.org id=B3224.126287702028173 (code B ref 3224); Thu, 07 Jan 2010 15:11:02 +0000 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: To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.6 (--) 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 unknown Sat Aug 16 16:05:58 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used Reply-To: Dan Nicolaescu , 3224@debbugs.gnu.org Mail-Followup-To: Dan Nicolaescu , 3224@debbugs.gnu.org Resent-From: Dan Nicolaescu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Jan 2010 15:11:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 3224 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3224-submit@debbugs.gnu.org id=B3224.126287703028186 (code B ref 3224); Thu, 07 Jan 2010 15:11:02 +0000 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 References: <84my9rfuhg.fsf@linux-b2a3.site> <200908041230.n74CUQUd025123@godzilla.ics.uci.edu> 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 (--) 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 unknown Sat Aug 16 16:05:58 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used Reply-To: Juanma Barranquero , 3224@debbugs.gnu.org Mail-Followup-To: Juanma Barranquero , 3224@debbugs.gnu.org Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Jan 2010 15:20:04 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 3224 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3224-submit@debbugs.gnu.org id=B3224.126287758228503 (code B ref 3224); Thu, 07 Jan 2010 15:20:04 +0000 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: To: Dan Nicolaescu Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.6 (--) 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 unknown Sat Aug 16 16:05:58 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used Reply-To: Stefan Monnier , 3224@debbugs.gnu.org Mail-Followup-To: Stefan Monnier , 3224@debbugs.gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Jan 2010 19:54:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 3224 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3224-submit@debbugs.gnu.org id=B3224.12628940314996 (code B ref 3224); Thu, 07 Jan 2010 19:54:02 +0000 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 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 (-) 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 unknown Sat Aug 16 16:05:58 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used Reply-To: Stefan Monnier , 3224@debbugs.gnu.org Mail-Followup-To: Stefan Monnier , 3224@debbugs.gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Jan 2010 19:58:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 3224 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3224-submit@debbugs.gnu.org id=B3224.12628942365113 (code B ref 3224); Thu, 07 Jan 2010 19:58:02 +0000 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 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 (-) 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 unknown Sat Aug 16 16:05:58 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used Reply-To: Juanma Barranquero , 3224@debbugs.gnu.org Mail-Followup-To: Juanma Barranquero , 3224@debbugs.gnu.org Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Jan 2010 23:07:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 3224 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3224-submit@debbugs.gnu.org id=B3224.126290557913362 (code B ref 3224); Thu, 07 Jan 2010 23:07:02 +0000 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: To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.6 (--) 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 unknown Sat Aug 16 16:05:58 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used Reply-To: Stefan Monnier , 3224@debbugs.gnu.org Mail-Followup-To: Stefan Monnier , 3224@debbugs.gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Jan 2010 03:23:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 3224 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3224-submit@debbugs.gnu.org id=B3224.126292094621391 (code B ref 3224); Fri, 08 Jan 2010 03:23:02 +0000 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 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 (--) 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 unknown Sat Aug 16 16:05:58 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: bug-gnu-emacs@gnu.org From: bug-gnu-emacs@gnu.org (Emacs bug Tracking System) To: Magnus Henoch Subject: bug#3224 closed by Juanma Barranquero (Re: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used) Message-ID: References: <84my9rfuhg.fsf@linux-b2a3.site> X-Emacs-PR-Message: they-closed 3224 X-Emacs-PR-Package: emacs Reply-To: 3224@debbugs.gnu.org Date: Fri, 08 Jan 2010 03:41:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1262922062-21953-1" This is a multi-part message in MIME format... ------------=_1262922062-21953-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #3224: 23.0.92; vc-dir vs uniquify: wrong directory used It has been closed by Juanma Barranquero . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Juanma Barranquero by replying to this email. --=20 3224: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D3224 Emacs Bug Tracking System Contact bug-gnu-emacs@gnu.org with problems ------------=_1262922062-21953-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit 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 ------------=_1262922062-21953-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit 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 ------------=_1262922062-21953-1-- From unknown Sat Aug 16 16:05:58 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: bug-gnu-emacs@gnu.org From: bug-gnu-emacs@gnu.org (Emacs bug Tracking System) To: Tom Tromey Subject: bug#4553 closed by Juanma Barranquero (Re: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used) Message-ID: References: X-Emacs-PR-Message: they-closed 4553 X-Emacs-PR-Package: emacs Reply-To: 4553@debbugs.gnu.org Date: Fri, 08 Jan 2010 03:41:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1262922062-21953-3" This is a multi-part message in MIME format... ------------=_1262922062-21953-3 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #3224: 23.1; uniquify gives *vc-dir* buffer the wrong name It has been closed by Juanma Barranquero . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Juanma Barranquero by replying to this email. --=20 3224: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D3224 Emacs Bug Tracking System Contact bug-gnu-emacs@gnu.org with problems ------------=_1262922062-21953-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit 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 ------------=_1262922062-21953-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 24 Sep 2009 20:53: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=-0.5 required=4.0 tests=AWL,FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8OKrLie023235 for ; Thu, 24 Sep 2009 13:53:22 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MqvJY-0001lM-Rn for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2009 16:53:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MqvJV-0001jO-05 for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2009 16:53:20 -0400 Received: from [199.232.76.173] (port=40522 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqvJU-0001jI-Dy for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2009 16:53:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1446) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MqvJT-00020A-SJ for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2009 16:53:16 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8OKrFKL026144 for ; Thu, 24 Sep 2009 16:53:15 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n8OKrE8p032436; Thu, 24 Sep 2009 16:53:14 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n8OKrDdq010102; Thu, 24 Sep 2009 16:53:13 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id D5D1D378188; Thu, 24 Sep 2009 14:53:12 -0600 (MDT) From: Tom Tromey To: bug-gnu-emacs@gnu.org Subject: 23.1; uniquify gives *vc-dir* buffer the wrong name Reply-To: Tom Tromey X-Attribution: Tom Date: Thu, 24 Sep 2009 14:53:12 -0600 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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 bug-gnu-emacs@gnu.org mailing list, and to the gnu.emacs.bug news group. Please describe exactly what actions triggered the bug and the precise symptoms of the bug: 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. 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/share/emacs/23.1/etc/DEBUG for instructions. In GNU Emacs 23.1.1 (i386-redhat-linux-gnu, GTK+ Version 2.16.5) of 2009-08-26 on x86-2.fedora.phx.redhat.com Windowing system distributor `The X.Org Foundation', version 11.0.10601901 configured using `configure '--build=i386-redhat-linux-gnu' '--host=i386-redhat-linux-gnu' '--target=i586-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-dbus' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xft' '--with-xpm' '--with-x-toolkit=gtk' 'build_alias=i386-redhat-linux-gnu' 'host_alias=i386-redhat-linux-gnu' 'target_alias=i586-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i586 -mtune=generic -fasynchronous-unwind-tables'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil 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: nil locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: Group Minor modes in effect: gnus-agent-mode: t shell-dirtrack-mode: t erc-list-mode: t erc-menu-mode: t erc-autojoin-mode: t erc-ring-mode: t erc-pcomplete-mode: t erc-track-mode: t erc-track-minor-mode: t erc-match-mode: t erc-button-mode: t erc-fill-mode: t erc-stamp-mode: t erc-netsplit-mode: t erc-spelling-mode: t erc-truncate-mode: t diff-auto-refine-mode: t gnus-undo-mode: t erc-status-mode: t erc-services-mode: t erc-networks-mode: t erc-irccontrols-mode: t erc-noncommands-mode: t erc-move-to-prompt-mode: t erc-readonly-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-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: n SPC 5 0 M-> q C-v C-u C-u C-n C-u C-n C-u C-n n n SPC 5 0 M-> C-p C-p C-p SPC E SPC E S-SPC E SPC q s M-v M-v M-v C-z o C-x b # g d b d j C-a C-k I SPC r e b u i l t SPC a n d SPC t h e SPC t e s t SPC s t i l l SPC p a s s C-a M-f SPC u p d a t e d , SPC & S-SPC M-SPC C-e s e s SPC f o r SPC m e C-z o C-l n n n M-g M-g M-g p SPC c SPC s C-u C-n = 9 7 M-> Q y C-z o C-z o C-z o C-z o C-s r f r y C-a SPC 5 0 C-u C-n n SPC C-z o C-z o M SPC SPC = Q y s C-z o C-x b * v c - d i r < a r / t C-x k C-x b * v c - d r C-x k C-x b * v c - d i r g d C-x v * C-g C-x v d a r a r C-x 1 C-z o M-x r e p o r t - e m b Recent messages: Generating summary...done Discard changes to this group and exit? (y or n) (No changes need to be saved) Saving /home/tromey/.newsrc.eld... Saving file /home/tromey/.newsrc.eld... Wrote /home/tromey/.newsrc.eld Saving /home/tromey/.newsrc.eld...done Making completion list... [4 times] Quit Making completion list... Tom ------------=_1262922062-21953-3-- 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