unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: me@eshelyaron.com, 74504@debbugs.gnu.org
Subject: bug#74504: 31.0.50; Wrong source directory in *Help*
Date: Sat, 07 Dec 2024 14:26:56 +0200	[thread overview]
Message-ID: <86v7vvisq7.fsf@gnu.org> (raw)
In-Reply-To: <jwv34jec2z7.fsf-monnier+emacs@gnu.org> (bug-gnu-emacs@gnu.org)

> Cc: 74504@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@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?





  reply	other threads:[~2024-12-07 12:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-24  7:12 bug#74504: 31.0.50; Wrong source directory in *Help* Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-25 23:26 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-07 12:26   ` Eli Zaretskii [this message]
2024-12-08  7:35     ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-13 22:51       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=86v7vvisq7.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=74504@debbugs.gnu.org \
    --cc=me@eshelyaron.com \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).