unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Dan Nicolaescu <dann@ics.uci.edu>
Cc: Tim Van Holder <tim.vanholder@gmail.com>,
	4599@emacsbugs.donarmstrong.com
Subject: bug#4599: 23.1.50; VC (CVS) fails to show directory status
Date: Wed, 30 Sep 2009 22:19:03 -0400	[thread overview]
Message-ID: <jwvfxa33liy.fsf-monnier+emacsbugreports@gnu.org> (raw)
In-Reply-To: <jwvljjw2oju.fsf-monnier+emacsbugreports@gnu.org> (Stefan Monnier's message of "Wed, 30 Sep 2009 15:59:18 -0400")

>> 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)






  reply	other threads:[~2009-10-01  2:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-30 12:55 bug#4599: 23.1.50; VC (CVS) fails to show directory status Tim Van Holder
2009-09-30 16:53 ` Dan Nicolaescu
2009-09-30 19:59   ` Stefan Monnier
2009-10-01  2:19     ` Stefan Monnier [this message]
2009-10-01  8:38       ` Tim Van Holder
2009-10-01 14:11         ` Stefan Monnier
2009-10-01 16:22           ` Dan Nicolaescu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvfxa33liy.fsf-monnier+emacsbugreports@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=4599@emacsbugs.donarmstrong.com \
    --cc=dann@ics.uci.edu \
    --cc=tim.vanholder@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).