GNU bug report logs - #4592
Bug in built-in function substitute-in-file-name

Previous Next

Package: emacs;

Reported by: Mosur Mohan <mognush <at> gmail.com>

Date: Wed, 30 Sep 2009 00:45:04 UTC

Severity: normal

Tags: moreinfo, unreproducible

Done: Glenn Morris <rgm <at> gnu.org>

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 4592 in the body.
You can then email your comments to 4592 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4592; Package emacs. (Wed, 30 Sep 2009 00:45:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mosur Mohan <mognush <at> gmail.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Wed, 30 Sep 2009 00:45:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Mosur Mohan <mognush <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Bug in built-in function substitute-in-file-name
Date: Tue, 29 Sep 2009 17:37:26 -0700
I am running Emacs version 21.3 on a Linux x86_64 machine.

When I start up Emacs, I go to the *scratch* buffer and eval
    (substitute-in-file-name "/~/")
and I get the expected result
    "~/"

After running for a while, I notice that filename completion starts
giving errors.  At this point, I re-try the above experiment:
    (substitute-in-file-name "/~/")
But now, I get:
    "/~/"

I am not able to figure out what happened in between to make it stop
working correctly.  A search for "substitute-in-file-name" in
bug.gnu.emacs didn't turn up anything relevant to this problem.

I narrowed the problem down to substitute-in-file-name after some
debugging.  Here's the sequence:

In the recently launched Emacs session, while editing a file, I type
C-x C-f to open another file.
In the minibuffer, I see the prompt "~/DesignDB/" (my current working directory)
I type "~/Al" so that the minibuffer now reads "~/DesignDB/~/Al"
I hit <TAB> to do completion on ~/Al
The minibuffer changes to "~/Alps/", which is correct.

In the older Emacs session where I see the problem, I carry out the
same sequence.
With the minibuffer reading "~/DesignDB/~/Al", I hit <TAB>
The minibuffer shows this message: "Opening directory: no such file or
directory, /nfs/pdx/home/mmohan/DesignDB/~*/Al"
The *Messages* window contains this message:
read-file-name-internal: Opening directory: no such file or directory,
/nfs/pdx/home/mmohan/DesignDB/~*/

I debugged this difference in complete.el and ffap.el until I reached
the above discrepancy in the behavior of built-in function
substitute-in-file-name.  I was then able to make the 2 sessions
exhibit the difference with the minimal arg "/~/" to the function.

Hope that is sufficient info.  Thanks,
--
Mosur Mohan




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4592; Package emacs. (Wed, 30 Sep 2009 09:15:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Schwab <schwab <at> linux-m68k.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Wed, 30 Sep 2009 09:15:04 GMT) Full text and rfc822 format available.

Message #10 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Mosur Mohan <mognush <at> gmail.com>
Cc: 4592 <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
Subject: Re: bug#4592: Bug in built-in function substitute-in-file-name
Date: Wed, 30 Sep 2009 11:07:05 +0200
Mosur Mohan <mognush <at> gmail.com> writes:

> When I start up Emacs, I go to the *scratch* buffer and eval
>     (substitute-in-file-name "/~/")
> and I get the expected result
>     "~/"
>
> After running for a while, I notice that filename completion starts
> giving errors.  At this point, I re-try the above experiment:
>     (substitute-in-file-name "/~/")
> But now, I get:
>     "/~/"
>
> I am not able to figure out what happened in between to make it stop
> working correctly.

What does
 (find-file-name-handler "/~/" 'substitute-in-file-name)
return?

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4592; Package emacs. (Wed, 30 Sep 2009 09:15:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Schwab <schwab <at> linux-m68k.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Wed, 30 Sep 2009 09:15:06 GMT) 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#4592; Package emacs. (Wed, 30 Sep 2009 15:10:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mosur Mohan <mognush <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Wed, 30 Sep 2009 15:10:05 GMT) Full text and rfc822 format available.

Message #20 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Mosur Mohan <mognush <at> gmail.com>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 4592 <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
Subject: Re: bug#4592: Bug in built-in function substitute-in-file-name
Date: Wed, 30 Sep 2009 08:02:33 -0700
> What does
>  (find-file-name-handler "/~/" 'substitute-in-file-name)
> return?

In both Emacs sessions, it returns nil.
--
Mohan

On Wed, Sep 30, 2009 at 2:07 AM, Andreas Schwab <schwab <at> linux-m68k.org> wrote:
> Mosur Mohan <mognush <at> gmail.com> writes:
>
>> When I start up Emacs, I go to the *scratch* buffer and eval
>>     (substitute-in-file-name "/~/")
>> and I get the expected result
>>     "~/"
>>
>> After running for a while, I notice that filename completion starts
>> giving errors.  At this point, I re-try the above experiment:
>>     (substitute-in-file-name "/~/")
>> But now, I get:
>>     "/~/"
>>
>> I am not able to figure out what happened in between to make it stop
>> working correctly.
>
> What does
>  (find-file-name-handler "/~/" 'substitute-in-file-name)
> return?
>
> Andreas.
>
> --
> Andreas Schwab, schwab <at> linux-m68k.org
> GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
> "And now for something completely different."
>




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4592; Package emacs. (Wed, 30 Sep 2009 15:10:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mosur Mohan <mognush <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Wed, 30 Sep 2009 15:10:07 GMT) 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#4592; Package emacs. (Sat, 03 Oct 2009 00:25:08 GMT) Full text and rfc822 format available.

Message #28 received at 4592 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Mosur Mohan <mognush <at> gmail.com>
Cc: 4592 <at> debbugs.gnu.org
Subject: Re: bug#4592: Bug in built-in function substitute-in-file-name
Date: Fri, 02 Oct 2009 20:15:27 -0400
Mosur Mohan wrote:

> I am running Emacs version 21.3 on a Linux x86_64 machine.
[...]
> After running for a while, I notice that filename completion starts
> giving errors.  At this point, I re-try the above experiment:
>     (substitute-in-file-name "/~/")
> But now, I get:
>     "/~/"

Unfortunately, this seems a rather obscure problem, and Emacs 21 is
quite old, so you are unlikely to get much help unless you can give a
simple recipe showing how to get into this state (starting from emacs
-q --no-site-file). In any case, I would recommend upgrading to Emacs 23.



Added tag(s) unreproducible and moreinfo. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Sat, 03 Oct 2009 00:25:14 GMT) 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#4592; Package emacs. (Sat, 03 Oct 2009 18:45:06 GMT) Full text and rfc822 format available.

Message #33 received at 4592 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Mosur Mohan <mognush <at> gmail.com>
To: Glenn Morris <rgm <at> gnu.org>
Subject: Re: bug#4592: Bug in built-in function substitute-in-file-name
Date: Sat, 3 Oct 2009 00:13:02 -0700
I was afraid you were gonna say that... :-) Unfortunately I haven't
been able to pin down the exact recipe; in the "good" session, I'm
still chugging along and the error hasn't occurred yet.

Thanks for your help anyway!  If I figure out the recipe to trigger
this behavior, I will get in touch with you again.
--
Mohan

On Fri, Oct 2, 2009 at 5:15 PM, Glenn Morris <rgm <at> gnu.org> wrote:
> Mosur Mohan wrote:
>
>> I am running Emacs version 21.3 on a Linux x86_64 machine.
> [...]
>> After running for a while, I notice that filename completion starts
>> giving errors.  At this point, I re-try the above experiment:
>>     (substitute-in-file-name "/~/")
>> But now, I get:
>>     "/~/"
>
> Unfortunately, this seems a rather obscure problem, and Emacs 21 is
> quite old, so you are unlikely to get much help unless you can give a
> simple recipe showing how to get into this state (starting from emacs
> -q --no-site-file). In any case, I would recommend upgrading to Emacs 23.
>



Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4592; Package emacs. (Sat, 03 Oct 2009 19:25:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lennart Borgman <lennart.borgman <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sat, 03 Oct 2009 19:25:07 GMT) Full text and rfc822 format available.

Message #38 received at 4592 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Mosur Mohan <mognush <at> gmail.com>, 4592 <at> debbugs.gnu.org
Cc: Glenn Morris <rgm <at> gnu.org>
Subject: Re: bug#4592: Bug in built-in function substitute-in-file-name
Date: Sat, 3 Oct 2009 21:18:50 +0200
Why do you do that instead of upgrade to Emacs 23?


On Sat, Oct 3, 2009 at 9:13 AM, Mosur Mohan <mognush <at> gmail.com> wrote:
> I was afraid you were gonna say that... :-) Unfortunately I haven't
> been able to pin down the exact recipe; in the "good" session, I'm
> still chugging along and the error hasn't occurred yet.
>
> Thanks for your help anyway!  If I figure out the recipe to trigger
> this behavior, I will get in touch with you again.
> --
> Mohan
>
> On Fri, Oct 2, 2009 at 5:15 PM, Glenn Morris <rgm <at> gnu.org> wrote:
>> Mosur Mohan wrote:
>>
>>> I am running Emacs version 21.3 on a Linux x86_64 machine.
>> [...]
>>> After running for a while, I notice that filename completion starts
>>> giving errors.  At this point, I re-try the above experiment:
>>>     (substitute-in-file-name "/~/")
>>> But now, I get:
>>>     "/~/"
>>
>> Unfortunately, this seems a rather obscure problem, and Emacs 21 is
>> quite old, so you are unlikely to get much help unless you can give a
>> simple recipe showing how to get into this state (starting from emacs
>> -q --no-site-file). In any case, I would recommend upgrading to Emacs 23.
>>
>
>
>
>



Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4592; Package emacs. (Tue, 06 Oct 2009 23:05:14 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mosur Mohan <mognush <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Tue, 06 Oct 2009 23:05:15 GMT) Full text and rfc822 format available.

Message #43 received at 4592 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Mosur Mohan <mognush <at> gmail.com>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: 4592 <at> debbugs.gnu.org, Glenn Morris <rgm <at> gnu.org>
Subject: Re: bug#4592: Bug in built-in function substitute-in-file-name
Date: Tue, 6 Oct 2009 15:58:04 -0700
Sorry, didn't notice your question earlier... yes, I will upgrade at
least to 22.3 (that is the latest version that our IT group has
installed internally). But I have quite a bit of customization, which
takes a while to transition, so it will probably be some time before I
can switch versions.  So, if I notice the bug before that happens,
maybe I can figure out what triggers it -- that's what I meant.

Thanks,
--
Mohan


On Sat, Oct 3, 2009 at 12:18 PM, Lennart Borgman
<lennart.borgman <at> gmail.com> wrote:
> Why do you do that instead of upgrade to Emacs 23?
>
>
> On Sat, Oct 3, 2009 at 9:13 AM, Mosur Mohan <mognush <at> gmail.com> wrote:
>> I was afraid you were gonna say that... :-) Unfortunately I haven't
>> been able to pin down the exact recipe; in the "good" session, I'm
>> still chugging along and the error hasn't occurred yet.
>>
>> Thanks for your help anyway!  If I figure out the recipe to trigger
>> this behavior, I will get in touch with you again.
>> --
>> Mohan
>>
>> On Fri, Oct 2, 2009 at 5:15 PM, Glenn Morris <rgm <at> gnu.org> wrote:
>>> Mosur Mohan wrote:
>>>
>>>> I am running Emacs version 21.3 on a Linux x86_64 machine.
>>> [...]
>>>> After running for a while, I notice that filename completion starts
>>>> giving errors.  At this point, I re-try the above experiment:
>>>>     (substitute-in-file-name "/~/")
>>>> But now, I get:
>>>>     "/~/"
>>>
>>> Unfortunately, this seems a rather obscure problem, and Emacs 21 is
>>> quite old, so you are unlikely to get much help unless you can give a
>>> simple recipe showing how to get into this state (starting from emacs
>>> -q --no-site-file). In any case, I would recommend upgrading to Emacs 23.
>>>
>>
>>
>>
>>
>



Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Thu, 10 Mar 2011 07:01:02 GMT) Full text and rfc822 format available.

Notification sent to Mosur Mohan <mognush <at> gmail.com>:
bug acknowledged by developer. (Thu, 10 Mar 2011 07:01:02 GMT) Full text and rfc822 format available.

Message #48 received at 4592-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 4592-done <at> debbugs.gnu.org
Subject: Re: bug#4592: Bug in built-in function substitute-in-file-name
Date: Thu, 10 Mar 2011 02:00:33 -0500
Thanks for the report. Your report was against an old version of Emacs,
and the issue you describe could not be reproduced. The latest version
is 23.3. Please open new reports for any issues you have with the new
version.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 07 Apr 2011 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 80 days ago.

Previous Next


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