GNU bug report logs -
#508
emacs 22.2.1 becomes confused
Previous Next
Reported by: "Bruce Korb" <bruce.korb <at> gmail.com>
Date: Mon, 30 Jun 2008 15:10:04 UTC
Severity: normal
Done: Chong Yidong <cyd <at> stupidchicken.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 508 in the body.
You can then email your comments to 508 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#508
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
"Bruce Korb" <bruce.korb <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
Hi,
I recently re-installed my system. For various reasons not worth
going into here,
I renamed my home directory from /home/foo to /home/Foo and re-created my
"foo" user name. It is not possible to edit anything in the /home/Foo hierarchy
with emacs. At all. I can cd to the correct directory and invoke "emacs file"
and it will try to open the equivalently named file under /home/foo. Somebody
somewhere fiddled some code such that tab-completion works correctly, but
when it comes to actually "visiting" the file, the blasted thing substitutes
"$HOME" for "/home/Foo". Someone please be kind enough to find that
"strncasecmp" and replace it with "strncmp" and put out an emergency fix.
Thank you. Regards, Bruce
$ /usr/bin/emacs --version
GNU Emacs 22.2.1
Copyright (C) 2008 Free Software Foundation, Inc.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#508
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Sven Joachim <svenjoac <at> gmx.de>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #10 received at 508 <at> emacsbugs.donarmstrong.com (full text, mbox):
On 2008-06-30 17:03 +0200, Bruce Korb wrote:
> I recently re-installed my system. For various reasons not worth
> going into here,
> I renamed my home directory from /home/foo to /home/Foo and re-created my
> "foo" user name. It is not possible to edit anything in the /home/Foo hierarchy
> with emacs. At all. I can cd to the correct directory and invoke "emacs file"
> and it will try to open the equivalently named file under /home/foo. Somebody
> somewhere fiddled some code such that tab-completion works correctly, but
> when it comes to actually "visiting" the file, the blasted thing substitutes
> "$HOME" for "/home/Foo".
This is with HOME=/home/foo, I suppose? Because when I tried to
reproduce it, I set $HOME to /home/Foo and files beneath /home/foo
became inaccessible.
> Someone please be kind enough to find that
> "strncasecmp" and replace it with "strncmp" and put out an emergency fix.
Actually, this is not a problem in the C code, but rather in Lisp, in
the function abbreviate-file-name.
The following patch tries to take care of this by matching the home
directory case-sensitively on systems which usually have such
filesystems, could you please test it?
--8<---------------cut here---------------start------------->8---
--- files.el.~1.985.~ 2008-06-11 07:54:21.000000000 +0200
+++ files.el 2008-06-30 19:37:37.000000000 +0200
@@ -1412,7 +1412,10 @@
(file-exists-p (file-name-directory
(substring filename (1- (match-end 0))))))
(setq filename (substring filename (1- (match-end 0)))))
- (let ((tail directory-abbrev-alist))
+ (let ((tail directory-abbrev-alist)
+ (case-fold-search
+ (if (memq system-type '(ms-dos windows-nt darwin macos vax-vms axp-vms))
+ t nil)))
;; If any elt of directory-abbrev-alist matches this name,
;; abbreviate accordingly.
(while tail
--8<---------------cut here---------------end--------------->8---
Changelog entry:
2008-06-30 Sven Joachim <svenjoac <at> gmx.de>
* files.el (abbreviate-file-name): Match the home directory
case-sensitively on systems that have case-sensitive filesystems.
Regards,
Sven
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#508
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
"Bruce Korb" <bruce.korb <at> gmail.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #15 received at 508 <at> emacsbugs.donarmstrong.com (full text, mbox):
On Mon, Jun 30, 2008 at 10:53 AM, Sven Joachim <svenjoac <at> gmx.de> wrote:
> The following patch tries to take care of this by matching the home
> directory case-sensitively on systems which usually have such
> filesystems, could you please test it?
Sure, but given you reproduced the problem and that this fixed it
for you, I'm guessing it will work. Now, where does this file live?
I know I can find it if I look hard enough, but the easy search
only yielded /usr/share/emacs/22.2/lisp/files.elc
Thanks - Bruce
> --8<---------------cut here---------------start------------->8---
> --- files.el.~1.985.~ 2008-06-11 07:54:21.000000000 +0200
> +++ files.el 2008-06-30 19:37:37.000000000 +0200
> @@ -1412,7 +1412,10 @@
> (file-exists-p (file-name-directory
> (substring filename (1- (match-end 0))))))
> (setq filename (substring filename (1- (match-end 0)))))
> - (let ((tail directory-abbrev-alist))
> + (let ((tail directory-abbrev-alist)
> + (case-fold-search
> + (if (memq system-type '(ms-dos windows-nt darwin macos vax-vms axp-vms))
> + t nil)))
> ;; If any elt of directory-abbrev-alist matches this name,
> ;; abbreviate accordingly.
> (while tail
> --8<---------------cut here---------------end--------------->8---
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#508
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Eli Zaretskii <eliz <at> gnu.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #20 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
> From: Sven Joachim <svenjoac <at> gmx.de>
> Date: Mon, 30 Jun 2008 19:53:51 +0200
> Cc: 508 <at> emacsbugs.donarmstrong.com
>
> + (case-fold-search
> + (if (memq system-type '(ms-dos windows-nt darwin macos vax-vms axp-vms))
You forgot cygwin in this list.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#508
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Eli Zaretskii <eliz <at> gnu.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#508
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Eli Zaretskii <eliz <at> gnu.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #30 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
> Date: Mon, 30 Jun 2008 11:12:57 -0700
> From: "Bruce Korb" <bruce.korb <at> gmail.com>
> Cc: 508 <at> emacsbugs.donarmstrong.com
>
> On Mon, Jun 30, 2008 at 10:53 AM, Sven Joachim <svenjoac <at> gmx.de> wrote:
> > The following patch tries to take care of this by matching the home
> > directory case-sensitively on systems which usually have such
> > filesystems, could you please test it?
>
> Sure, but given you reproduced the problem and that this fixed it
> for you, I'm guessing it will work. Now, where does this file live?
> I know I can find it if I look hard enough, but the easy search
> only yielded /usr/share/emacs/22.2/lisp/files.elc
You probably didn't installed the Lisp sources. But don't hurry to do
that yet: files.el is preloaded into Emacs, so to make that change you
will have to rebuild Emacs, not just patch files.el.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#508
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Eli Zaretskii <eliz <at> gnu.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#508
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Sven Joachim <svenjoac <at> gmx.de>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #40 received at 508 <at> emacsbugs.donarmstrong.com (full text, mbox):
On 2008-06-30 21:57 +0200, Eli Zaretskii wrote:
>> From: Sven Joachim <svenjoac <at> gmx.de>
>> Date: Mon, 30 Jun 2008 19:53:51 +0200
>> Cc: 508 <at> emacsbugs.donarmstrong.com
>>
>> + (case-fold-search
>> + (if (memq system-type '(ms-dos windows-nt darwin macos vax-vms axp-vms))
>
> You forgot cygwin in this list.
I just pasted the list from the read-file-name-completion-ignore-case
defcustom in minibuffer.el. Should that list include cygwin as well?
Sven
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#508
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
"Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #45 received at 508 <at> emacsbugs.donarmstrong.com (full text, mbox):
Sven Joachim wrote:
> On 2008-06-30 21:57 +0200, Eli Zaretskii wrote:
>
>>> From: Sven Joachim <svenjoac <at> gmx.de>
>>> Date: Mon, 30 Jun 2008 19:53:51 +0200
>>> Cc: 508 <at> emacsbugs.donarmstrong.com
>>>
>>> + (case-fold-search
>>> + (if (memq system-type '(ms-dos windows-nt darwin macos vax-vms axp-vms))
>> You forgot cygwin in this list.
>
> I just pasted the list from the read-file-name-completion-ignore-case
> defcustom in minibuffer.el. Should that list include cygwin as well?
Shouldn't these things be defsubt so that it easier to change and maintain?
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#508
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Eli Zaretskii <eliz <at> gnu.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #50 received at 508 <at> emacsbugs.donarmstrong.com (full text, mbox):
> From: Sven Joachim <svenjoac <at> gmx.de>
> Cc: 508 <at> emacsbugs.donarmstrong.com, bruce.korb <at> gmail.com
> Date: Mon, 30 Jun 2008 22:14:02 +0200
>
> On 2008-06-30 21:57 +0200, Eli Zaretskii wrote:
>
> >> From: Sven Joachim <svenjoac <at> gmx.de>
> >> Date: Mon, 30 Jun 2008 19:53:51 +0200
> >> Cc: 508 <at> emacsbugs.donarmstrong.com
> >>
> >> + (case-fold-search
> >> + (if (memq system-type '(ms-dos windows-nt darwin macos vax-vms axp-vms))
> >
> > You forgot cygwin in this list.
>
> I just pasted the list from the read-file-name-completion-ignore-case
> defcustom in minibuffer.el. Should that list include cygwin as well?
Yes, I think so.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#508
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Eli Zaretskii <eliz <at> gnu.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #55 received at 508 <at> emacsbugs.donarmstrong.com (full text, mbox):
> Date: Mon, 30 Jun 2008 22:30:03 +0200
> From: "Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>
> CC: Eli Zaretskii <eliz <at> gnu.org>, bruce.korb <at> gmail.com
>
> Sven Joachim wrote:
> > On 2008-06-30 21:57 +0200, Eli Zaretskii wrote:
> >
> >>> From: Sven Joachim <svenjoac <at> gmx.de>
> >>> Date: Mon, 30 Jun 2008 19:53:51 +0200
> >>> Cc: 508 <at> emacsbugs.donarmstrong.com
> >>>
> >>> + (case-fold-search
> >>> + (if (memq system-type '(ms-dos windows-nt darwin macos vax-vms axp-vms))
> >> You forgot cygwin in this list.
> >
> > I just pasted the list from the read-file-name-completion-ignore-case
> > defcustom in minibuffer.el. Should that list include cygwin as well?
>
>
> Shouldn't these things be defsubt so that it easier to change and maintain?
I'm not sure I understand what you are suggesting. Please explain.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#508
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Kevin Rodgers <kevin.d.rodgers <at> gmail.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #60 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
Sven Joachim wrote:
> On 2008-06-30 21:57 +0200, Eli Zaretskii wrote:
>
>>> From: Sven Joachim <svenjoac <at> gmx.de>
>>> Date: Mon, 30 Jun 2008 19:53:51 +0200
>>> Cc: 508 <at> emacsbugs.donarmstrong.com
>>>
>>> + (case-fold-search
>>> + (if (memq system-type '(ms-dos windows-nt darwin macos vax-vms axp-vms))
>> You forgot cygwin in this list.
>
> I just pasted the list from the read-file-name-completion-ignore-case
> defcustom in minibuffer.el.
Why not bind case-fold-search to the value of
read-file-name-completion-ignore-case there?
> Should that list include cygwin as well?
--
Kevin Rodgers
Denver, Colorado, USA
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#508
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Sven Joachim <svenjoac <at> gmx.de>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #65 received at 508 <at> emacsbugs.donarmstrong.com (full text, mbox):
On 2008-07-01 05:56 +0200, Kevin Rodgers wrote:
> Sven Joachim wrote:
>> On 2008-06-30 21:57 +0200, Eli Zaretskii wrote:
>>
>>>> From: Sven Joachim <svenjoac <at> gmx.de>
>>>> Date: Mon, 30 Jun 2008 19:53:51 +0200
>>>> Cc: 508 <at> emacsbugs.donarmstrong.com
>>>>
>>>> + (case-fold-search
>>>> + (if (memq system-type '(ms-dos windows-nt darwin macos vax-vms axp-vms))
>>> You forgot cygwin in this list.
>>
>> I just pasted the list from the read-file-name-completion-ignore-case
>> defcustom in minibuffer.el.
>
> Why not bind case-fold-search to the value of
> read-file-name-completion-ignore-case there?
That would be wrong, IMO. Users may or may not prefer filename
completion to be case sensitive regardless of their filesystems, but the
code in question really depends on the actual feature of the filesystem.
There could be a new defvar (or defconst), like this:
(defvar case-insensitive-systems-alist
'(ms-dos windows-nt cygwin darwin macos vax-vms axp-vms)
"List of systems who have case insensitive filesystems.")
which could then be used in code that depends on the filesystem being
case sensitive or not, and in the read-file-name-completion-ignore-case
defcustom as well.
Sven
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#508
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #70 received at 508 <at> emacsbugs.donarmstrong.com (full text, mbox):
> There could be a new defvar (or defconst), like this:
> (defvar case-insensitive-systems-alist
> '(ms-dos windows-nt cygwin darwin macos vax-vms axp-vms)
> "List of systems who have case insensitive filesystems.")
Actually, it should not be a variable but a function (and even
a file-name operation, obeying file-name-handlers):
(directory-case-sensitive-p FILE)
-- Stefan
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#508
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Eli Zaretskii <eliz <at> gnu.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #75 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
> Resent-From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Resent-To: bug-submit-list <at> donarmstrong.com
> Resent-CC: Emacs Bugs <bug-gnu-emacs <at> gnu.org>
> Resent-Sender: don <at> donarmstrong.com
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Date: Thu, 03 Jul 2008 00:54:57 -0400
> Cc: Kevin Rodgers <kevin.d.rodgers <at> gmail.com>, 508 <at> emacsbugs.donarmstrong.com
>
> > There could be a new defvar (or defconst), like this:
>
> > (defvar case-insensitive-systems-alist
> > '(ms-dos windows-nt cygwin darwin macos vax-vms axp-vms)
> > "List of systems who have case insensitive filesystems.")
>
> Actually, it should not be a variable but a function (and even
> a file-name operation, obeying file-name-handlers):
>
> (directory-case-sensitive-p FILE)
100% agreement: with the proliferation of network-mounted filesystems,
there's no longer a deterministic way to infer whether a filesystem is
case-sensitive or not from the OS brand. Instead, we should query the
filesystem about that, and the function suggested by Stefan should do
that (when there're no file-name-handlers for the filesystem).
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#508
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Eli Zaretskii <eliz <at> gnu.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Reply sent to
Chong Yidong <cyd <at> stupidchicken.com>
:
You have taken responsibility.
Full text and
rfc822 format available.
Notification sent to
"Bruce Korb" <bruce.korb <at> gmail.com>
:
bug acknowledged by developer.
Full text and
rfc822 format available.
Message #85 received at 508-done <at> emacsbugs.donarmstrong.com (full text, mbox):
Since no one has offered to write a directory-case-sensitive-p function,
I've checked in Sven's first, simpler patch. Even if it doesn't do the
completely right thing in the failure case (e.g., a vfat home directory
on GNU/Linux), all that does is fail to replace $HOME with ~, which is
hardly fatal.
After the release, if someone wants to write directory-case-sensitive-p,
we can switch to that.
bug archived.
Request was from
Debbugs Internal Request <don <at> donarmstrong.com>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Fri, 29 Aug 2008 14:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 16 years and 299 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.