From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#74504: 31.0.50; Wrong source directory in *Help* Date: Sat, 07 Dec 2024 14:26:56 +0200 Message-ID: <86v7vvisq7.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35966"; mail-complaints-to="usenet@ciao.gmane.io" Cc: me@eshelyaron.com, 74504@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 07 13:28:14 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tJtuv-0009C1-7G for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Dec 2024 13:28:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tJtun-0004zk-Iu; Sat, 07 Dec 2024 07:28:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tJtul-0004zc-7v for bug-gnu-emacs@gnu.org; Sat, 07 Dec 2024 07:28:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tJtuk-0002Lv-Oo for bug-gnu-emacs@gnu.org; Sat, 07 Dec 2024 07:28:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=0Wv+a6ZRuVe6m8Vhl3FJjfiwugCV+N/OCtp7PonZigM=; b=iRW+wz4G4+3nGABc49o2Z3vpqGvCOtE3kx14ExJ1jwKrz2JBo0pA16Xpdb3u7Nyrv6GYhL5Y8b4eUE6eszGjQxrQvLlNfvR5J/61YW1I4PUeT3BgRGZbq7hPGVB7xd02ubfNehcdB0HVxQsJJFqEYl0l/qPx1vAd5bVvsy+YvWx/JnkfocENkr2sG2kvGzHVgUhWhDi2O9NExoY9UpG/Sj1+ldF0E7WssOetrEbJlruKE+HFu/dNr96ffHFplxm+MkPrri5sMAhPHT9rX1iHe6FEMIEguy1QnaJnOSZa9gAW0rXswR/mZaTAtav230d36HtFVVMETRHM3x77wb/Wvw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tJtuk-00022X-G9 for bug-gnu-emacs@gnu.org; Sat, 07 Dec 2024 07:28:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Dec 2024 12:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74504 X-GNU-PR-Package: emacs Original-Received: via spool by 74504-submit@debbugs.gnu.org id=B74504.17335744297737 (code B ref 74504); Sat, 07 Dec 2024 12:28:02 +0000 Original-Received: (at 74504) by debbugs.gnu.org; 7 Dec 2024 12:27:09 +0000 Original-Received: from localhost ([127.0.0.1]:45805 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJttt-00020j-7C for submit@debbugs.gnu.org; Sat, 07 Dec 2024 07:27:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37902) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJttr-00020V-Ds for 74504@debbugs.gnu.org; Sat, 07 Dec 2024 07:27:07 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tJttk-00028T-ML; Sat, 07 Dec 2024 07:27:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=0Wv+a6ZRuVe6m8Vhl3FJjfiwugCV+N/OCtp7PonZigM=; b=NjDs9Ct/Q3Z9ZnvHNyZp oR1LNYmtuROZsT9ieHHLIruPo23pjAD99XESmT2s9KRKsJACCZ9BR4yXjEgE8e+NAb6IB3DDrFywX xj7h4scICiSs7o/gYvE4ZeMjJGv9NefW1pcOHiCetBvIb0CJLzFwHNSwZgsywAJFU8iHlJ/N3gFi7 wnvwG0CYpWa2UnMEqg1fHslpkRGEO1TeG+caUBaeSfCLGukEXSuqReonQZLnuw78gJ3KwzibvB8J/ fF7vJTspFjIuNCUKRG1lViPUS4EWD58lE/GwPIQX88ofwkc5Du+wmYYJtXivJHNzfO+PF/gOYQ28T f83+Dn8ogMqS2g==; In-Reply-To: (bug-gnu-emacs@gnu.org) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296551 Archived-At: > 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" > > > 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?