all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mosur Mohan <mognush@gmail.com>
To: bug-gnu-emacs@gnu.org
Subject: bug#4592: Bug in built-in function substitute-in-file-name
Date: Tue, 29 Sep 2009 17:37:26 -0700	[thread overview]
Message-ID: <7f5ab920909291737r4b739331v40b9d9ea703ef440@mail.gmail.com> (raw)

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






             reply	other threads:[~2009-09-30  0:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-30  0:37 Mosur Mohan [this message]
2009-09-30  9:07 ` bug#4592: Bug in built-in function substitute-in-file-name Andreas Schwab
2009-09-30 15:02   ` Mosur Mohan
2009-10-03  0:15 ` Glenn Morris
2009-10-03  7:13   ` Mosur Mohan
2009-10-03 19:18     ` Lennart Borgman
2009-10-06 22:58       ` Mosur Mohan
2011-03-10  7:00         ` Glenn Morris

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

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

  git send-email \
    --in-reply-to=7f5ab920909291737r4b739331v40b9d9ea703ef440@mail.gmail.com \
    --to=mognush@gmail.com \
    --cc=4592@emacsbugs.donarmstrong.com \
    --cc=bug-gnu-emacs@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.