From: Richard Stallman <rms@gnu.org>
To: Dave Goel <deego3@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: find-file.el bug; checked in a fix.
Date: Fri, 07 Dec 2007 12:18:37 -0500 [thread overview]
Message-ID: <E1J0gqT-0000ju-5K@fencepost.gnu.org> (raw)
In-Reply-To: <874pewdc8c.fsf@marie.gnufans.net> (message from Dave Goel on Wed, 05 Dec 2007 17:10:27 -0500)
If a function f is autoloaded from a file a.el in a directory d, and
if there also exists an executable file called a in a directory d1,
then calling find-function on f shows the file a instead of
a.el.
Does it actually matter that the file `a' is executable?
The problem seems to appear when d1 precedes d in your extended load-path.
Why is the file `a' present in a directory in the `load-path'?
Usually the directories in `load-path' just contain Lisp files.
Was the file `a' put in those directories for a good reason
or was it there by mistake?
The problem is that symbol-function definition for loaded functions
does not store the .el suffix.
This is done for a good reason -- so if the function was defined in
foo.elc.gz, you can find foo.el, foo.el.gz, or whatever is there.
I believe that an appropriate solution is to simply make
`find-library-name' search for the (".el" ".el.gz") files first in the
load-path. Only if it does not succeed look for the other suffixes.
That might be a good solution. I do not feel sure of it, though.
Another solution that might be more thoroughly correct is to retain
some of the info about the suffix that was actually loaded;
specifically, to figure out what suffix the source file _should_ have
had, and then load only that. This might be more thoroughly correct,
but it is also more risky. So maybe your fix is the better choice.
Does anyone else have an opinion about this?
Meanwhile, I would like to know the specifics of the real test case
you encountered. What were the REAL names, and why was the executable
file in a directory in load-path?
next prev parent reply other threads:[~2007-12-07 17:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-05 22:10 find-file.el bug; checked in a fix Dave Goel
2007-12-07 17:18 ` Richard Stallman [this message]
2007-12-07 18:50 ` Dave Goel
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=E1J0gqT-0000ju-5K@fencepost.gnu.org \
--to=rms@gnu.org \
--cc=deego3@gmail.com \
--cc=emacs-devel@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.