[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#4599: 23.1.50; VC (CVS) fails to show directory status
From: |
Stefan Monnier |
Subject: |
bug#4599: 23.1.50; VC (CVS) fails to show directory status |
Date: |
Wed, 30 Sep 2009 22:19:03 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
>> in particular the removal or the expand-file-name calls is incorrect.
>> At least ~ needs to be expanded, otherwise things just do not work.
> While it might be the immediate cause of the problem, I think the
> removal of expand-file-name calls might still be right: the code that
> sets default-directory to a value starting with "~/" might be the one
> that should be changed.
The patch below indeed seems to fix the problem.
Stefan
=== modified file 'lisp/files.el'
--- lisp/files.el 2009-09-30 14:51:08 +0000
+++ lisp/files.el 2009-10-01 02:15:33 +0000
@@ -648,7 +648,12 @@
;; Put the name into directory syntax now,
;; because otherwise expand-file-name may give some bad results.
(setq dir (file-name-as-directory dir))
- (setq dir (abbreviate-file-name (expand-file-name dir)))
+ ;; We used to additionally call abbreviate-file-name here, for an
+ ;; unknown reason. Problem is that most buffers are setup
+ ;; without going through cd-absolute and don't call
+ ;; abbreviate-file-name on their default-directory, so the few that
+ ;; do end up using a superficially different directory.
+ (setq dir (expand-file-name dir))
(if (not (file-directory-p dir))
(if (file-exists-p dir)
(error "%s is not a directory" dir)