GNU bug report logs - #3224
23.0.92; vc-dir vs uniquify: wrong directory used

Previous Next

Package: emacs;

Reported by: Magnus Henoch <mange <at> freemail.hu>

Date: Tue, 5 May 2009 15:25:06 UTC

Severity: normal

Merged with 4553, 6672

Found in version 23.1

Done: Juanma Barranquero <lekktu <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 3224 <at> debbugs.gnu.org
Subject: bug#3224: 23.0.92; vc-dir vs uniquify: wrong directory used
Date: Wed, 06 Jan 2010 00:38:07 -0500
> --- 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




This bug report was last modified 15 years ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.