GNU bug report logs -
#3224
23.0.92; vc-dir vs uniquify: wrong directory used
Previous Next
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
Message #49 received at 3224 <at> debbugs.gnu.org (full text, mbox):
On Thu, Jan 7, 2010 at 20:53, Stefan Monnier <monnier <at> iro.umontreal.ca> 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
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.