GNU bug report logs -
#74504
31.0.50; Wrong source directory in *Help*
Previous Next
Reported by: Eshel Yaron <me <at> eshelyaron.com>
Date: Sun, 24 Nov 2024 07:13:02 UTC
Severity: normal
Found in version 31.0.50
Fixed in version 31.1
Done: Eshel Yaron <me <at> eshelyaron.com>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 74504 <at> debbugs.gnu.org (full text, mbox):
> Cc: 74504 <at> debbugs.gnu.org
> Date: Mon, 25 Nov 2024 18:26:12 -0500
> From: Stefan Monnier via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> > 1. Build Emacs
> > 2. Run src/emacs -Q
> > 3. In the *scratch* buffer say M-x cd /tmp
> > (/tmp here is just an arbitrary directory that is not the Emacs
> > sources directory)
> > 4. C-h f make-overlay
> > Now the first line in the *Help* buffer says:
> > "make-overlay is a primitive-function in ‘C source code’."
> > So far so good.
> > 5. Switch to the *Help* buffer and type s, this finds buffer.c
> > 6. Switch back to the *Help* buffer and type g
> > The first line in *Help* now says:
> > "make-overlay is a primitive-function in ‘/tmp/src/buffer.c’."
> > ^^^^^ <-- Wrong!
>
> Hmm... my code assumed the file was always absolute, but apparently
> that's not always the case.
>
> The patch below seems to give us back the previous behavior, but maybe
> we should change some other part of the code so
> `help-fns-short-filename` is not used at all for the C sources (since
> it's specifically trying to give a name relative to `load-path`, which
> is nonsensical for our C files).
>
>
> Stefan
>
>
> diff --git a/lisp/help-fns.el b/lisp/help-fns.el
> index c87c86bae84..266cf8eb4a9 100644
> --- a/lisp/help-fns.el
> +++ b/lisp/help-fns.el
> @@ -1052,7 +1052,8 @@ help-fns--radix-trees
> "Cache of radix-tree representation of `load-path'.")
>
> (defun help-fns--filename (file)
> - (let ((f (abbreviate-file-name (expand-file-name file))))
> + (let ((f (abbreviate-file-name
> + (if (file-name-absolute-p file) (expand-file-name file) file))))
> (if (file-name-case-insensitive-p f) (downcase f) f)))
>
> (defun help-fns--radix-tree (dirs)
Ping! Can we make further progress with this bug?
This bug report was last modified 159 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.