From unknown Fri Jun 20 07:18:28 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#74504 <74504@debbugs.gnu.org> To: bug#74504 <74504@debbugs.gnu.org> Subject: Status: 31.0.50; Wrong source directory in *Help* Reply-To: bug#74504 <74504@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:18:28 +0000 retitle 74504 31.0.50; Wrong source directory in *Help* reassign 74504 emacs submitter 74504 Eshel Yaron severity 74504 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 24 02:12:49 2024 Received: (at submit) by debbugs.gnu.org; 24 Nov 2024 07:12:49 +0000 Received: from localhost ([127.0.0.1]:60510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tF6nY-0002Ml-Mx for submit@debbugs.gnu.org; Sun, 24 Nov 2024 02:12:48 -0500 Received: from lists.gnu.org ([209.51.188.17]:54962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tF6nW-0002Ma-NF for submit@debbugs.gnu.org; Sun, 24 Nov 2024 02:12:47 -0500 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 1tF6nU-0006eo-Pk for bug-gnu-emacs@gnu.org; Sun, 24 Nov 2024 02:12:45 -0500 Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tF6nS-0004hs-LN for bug-gnu-emacs@gnu.org; Sun, 24 Nov 2024 02:12:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1732432361; bh=pPXtgSLk1NtwI9dxniS78cUaNJNgmlFr8AKk86RXBiA=; h=From:To:Subject:Date:From; b=k869zFtnByK8D81+mad/cO0+SWMm4edxDXRvK5zcTNCGh5UeuA1Nh93bDr+wwDuSa xG7he0GlJcUa7/AbIwVZHabPQVFihwEHz+TGYVpK0zHOkRiCK9YbD5eoXQ8sPai1pt OPPkghIdlpsK5T8nDmww2Wo9g1rCjTmZuqMc9acebmiRlfbdjvXN0l9B6+4ygiX2f8 XCQLx1aHBZbw2CxjizCKNpT/WpM8bNzQxn9wbL7DnfWNVH7z/5y7TB214ft6J78gsU hJZ4fE931Cus1LjpaN57Hh0t+nHSzMuVoBH5L9HpOTKr4OFgsVIAN2A1l2/KiBl15E okyPksLuZfLMg== From: Eshel Yaron To: bug-gnu-emacs@gnu.org Subject: 31.0.50; Wrong source directory in *Help* X-Debbugs-Cc: Stefan Monnier Date: Sun, 24 Nov 2024 08:12:39 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@eshelyaron.com; helo=eshelyaron.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Hi, I think that commit e807d62c leads to the following regression: 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 =E2=80=98C source code=E2=80=99= ." 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 =E2=80=98/tmp/src/buffer.c=E2= =80=99." ^^^^^ <-- Wrong! =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20 Note that the reported file name starts with whatever default-directory happens to be in the *Help* buffer, which is incorrect. Before commit e807d62c, we'd get a file name relative to source-directory, so just src/buffer.c in this case. Best, Eshel From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 25 18:26:22 2024 Received: (at 74504) by debbugs.gnu.org; 25 Nov 2024 23:26:22 +0000 Received: from localhost ([127.0.0.1]:42953 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFiTF-0003E7-Ii for submit@debbugs.gnu.org; Mon, 25 Nov 2024 18:26:21 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:30373) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFiTD-0003Dq-GC for 74504@debbugs.gnu.org; Mon, 25 Nov 2024 18:26:20 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id E27478075E; Mon, 25 Nov 2024 18:26:13 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1732577173; bh=gNxvlBBBNZzF1RU7sgcnptBJ7MKyvmAOUkFxj75iiXg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=OOqTzTcCa+qc+MJKURPGFniehvM/aZYZWqTlW5EEv7oQc2utn4hL0fn0dMbJYLuU5 Ai29y2JHCIU8CETvzsxXjOeyy0oXOeVIJn9aytoggQYLZafHjL759QwJhc51uZC/+W evptN0H5DxP/akWrHsHCakvciR2FO8sznz7g2EH4YRx8iPc3iMZOkxIkGq0KxrBEmy lwSy7wmNXoy9KqctuA0xqHJE8bl79vPHwGTNdTNKLu32n1V2TiPduK5Th79tuAnnoL Vj8X6+io7e/qDMHFrK0rsdCUCUhJvM6UOtPBhIUdFxKkmvmwhNK7VJEm1ifLhLP4Kk NanKYgZsRY9sg== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 00B50805C1; Mon, 25 Nov 2024 18:26:13 -0500 (EST) Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E3652120618; Mon, 25 Nov 2024 18:26:12 -0500 (EST) From: Stefan Monnier To: Eshel Yaron Subject: Re: bug#74504: 31.0.50; Wrong source directory in *Help* In-Reply-To: (Eshel Yaron's message of "Sun, 24 Nov 2024 08:12:39 +0100") Message-ID: References: Date: Mon, 25 Nov 2024 18:26:12 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.185 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74504 Cc: 74504@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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 =E2=80=98C source code=E2=80= =99." > 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 =E2=80=98/tmp/src/buffer.c=E2= =80=99." > ^^^^^ <-- 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'.") =20 (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))) =20 (defun help-fns--radix-tree (dirs) From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 07 07:27:09 2024 Received: (at 74504) by debbugs.gnu.org; 7 Dec 2024 12:27:09 +0000 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 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 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==; Date: Sat, 07 Dec 2024 14:26:56 +0200 Message-Id: <86v7vvisq7.fsf@gnu.org> From: Eli Zaretskii To: Stefan Monnier In-Reply-To: (bug-gnu-emacs@gnu.org) Subject: Re: bug#74504: 31.0.50; Wrong source directory in *Help* References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74504 Cc: me@eshelyaron.com, 74504@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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? From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 08 02:35:39 2024 Received: (at 74504) by debbugs.gnu.org; 8 Dec 2024 07:35:39 +0000 Received: from localhost ([127.0.0.1]:49522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tKBpK-000193-Qk for submit@debbugs.gnu.org; Sun, 08 Dec 2024 02:35:39 -0500 Received: from mail.eshelyaron.com ([107.175.124.16]:44704 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tKBpI-00018v-Q7 for 74504@debbugs.gnu.org; Sun, 08 Dec 2024 02:35:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1733643336; bh=hx4gsBGtd4SDifub4iaNoFbpSmfisePLfsWA7GIpzc0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=VJiyFXkCaBCJDXDXfNamCpO3YuWW79D26mDFt3ujO7TEXZSF8CcvN6a1J+AjUHUHB MkYYcbZH+G5XAK5IpmdLHmCM+1JpPAxZVevK9UAHYgPCYOFEpIT7y/12cVuLQqqD/D n9If/oBB84NUNy9FkBC42C1iX/rCv1LnrLQAekxSr6G9M8kslX6honL7A1BF0dhZ4C sqj7e7Z+i4wxHvuMNsrsvXCbmxesfw1kDG1g+1uSxO6bIu6jf6O//VGzrWROb41gX6 +dFCmMbw/lAaGCccPRHtDJYhXA7173AvI5pWj2bKowuc8mE0c0YB+iuIj7oO/2tjjM 0BVcWdXfeqn3Q== From: Eshel Yaron To: Eli Zaretskii Subject: Re: bug#74504: 31.0.50; Wrong source directory in *Help* In-Reply-To: <86v7vvisq7.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 07 Dec 2024 14:26:56 +0200") References: <86v7vvisq7.fsf@gnu.org> Date: Sun, 08 Dec 2024 08:35:34 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74504 Cc: Stefan Monnier , 74504@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> 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" >>=20 >> > 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 =E2=80=98C source code=E2= =80=99." >> > 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 =E2=80=98/tmp/src/buffer.c= =E2=80=99." >> > ^^^^^ <-- Wrong! >>=20 >> Hmm... my code assumed the file was always absolute, but apparently >> that's not always the case. >>=20 >> 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). >>=20 >>=20 >> Stefan >>=20 >>=20 >> 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'.") >>=20=20 >> (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) fil= e)))) >> (if (file-name-case-insensitive-p f) (downcase f) f))) >>=20=20 >> (defun help-fns--radix-tree (dirs) > > Ping! Can we make further progress with this bug? I think that the workaround Stefan suggests makes sense. It doesn't make the code (and the implicit assumptions about when a file name is absolute and when it isn't) any clearer though. Another option may be something like the following, where we explicitly look only for .el files under load-path: diff --git a/lisp/help-fns.el b/lisp/help-fns.el index c87c86bae84..b57201c6100 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -1064,22 +1064,14 @@ help-fns--radix-tree rt))) =20 (defun help-fns-short-filename (filename) - (let* ((short (help-fns--filename filename)) - (prefixes (radix-tree-prefixes (help-fns--radix-tree load-path) - (file-name-directory short)))) - (if (not prefixes) - ;; The file is not inside the `load-path'. - ;; FIXME: Here's the old code (too slow, bug#73766), - ;; which used to try and shorten it with "../" as well. - ;; (dolist (dir load-path) - ;; (let ((rel (file-relative-name filename dir))) - ;; (if (< (length rel) (length short)) - ;; (setq short rel))) - ;; (let ((rel (file-relative-name abbrev dir))) - ;; (if (< (length rel) (length short)) - ;; (setq short rel)))) - short - (file-relative-name short (caar prefixes))))) + (cond + ((eq filename 'C-source) "C source code") + ((equal (file-name-extension filename) "el") + (let* ((short (help-fns--filename filename)) + (prefixes (radix-tree-prefixes (help-fns--radix-tree load-path) + (file-name-directory short)))) + (if prefixes (file-relative-name short (caar prefixes)) short))) + (t filename))) =20 (defun help-fns--analyze-function (function) ;; FIXME: Document/explain the differences between FUNCTION, @@ -1203,10 +1195,7 @@ help-fns-function-description-header (setq help-mode--current-data (list :symbol function))) ;; We used to add .el to the file name, ;; but that's completely wrong when the user used load-file. - (princ (format-message " in `%s'" - (if (eq file-name 'C-source) - "C source code" - (help-fns-short-filename file-name)))) + (princ (format-message " in `%s'" (help-fns-short-filename file-name))) ;; Make a hyperlink to the library. (with-current-buffer standard-output (setq help-mode--current-data (list :symbol function @@ -1399,9 +1388,7 @@ describe-variable (progn (princ (format-message " is a variable defined in `%s'.\n\n" - (if (eq file-name 'C-source) - "C source code" - (help-fns-short-filename file-name)))) + (help-fns-short-filename file-name))) (with-current-buffer standard-output (setq help-mode--current-data (list :symbol variable @@ -2146,9 +2133,7 @@ describe-keymap (princ ".\n\n")) (princ (format-message " defined in `%s'.\n\n" - (if (eq file-name 'C-source) - "C source code" - (help-fns-short-filename file-name)))) + (help-fns-short-filename file-name))) (save-excursion (re-search-backward (substitute-command-keys "`\\([^`']+\\= )'")) (setq help-mode--current-data (list :symbol keymap From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 13 17:51:43 2024 Received: (at 74504) by debbugs.gnu.org; 13 Dec 2024 22:51:43 +0000 Received: from localhost ([127.0.0.1]:44515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tMEVa-0000xr-Td for submit@debbugs.gnu.org; Fri, 13 Dec 2024 17:51:43 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:12722) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tMEVW-0000xP-QQ for 74504@debbugs.gnu.org; Fri, 13 Dec 2024 17:51:40 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 9102910004A; Fri, 13 Dec 2024 17:51:32 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1734130291; bh=jVIny3FeDOw76HHMYNpX+2pXU3GEHWJ7QTbparAuPeg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=L15zGvb3JWLe8kTFvdH83hZJQ9cb/6wAyCu1BEFO4H22/2fDCIxQKaZqLD1JvWGHt R36OoYxXqAURbSPUPp3pR2k4BOdNwKyWQavGnsGXDF5BguaCO+hGU6Q7+1Z7FswO/U vg9LkzxPyq4I8X7a37bNEfCR1GU6WbuaTSee4tWjBeztLjjl5WMFaNYtQumQKUgkoL Cx2Jd2qsppkWvJwgKs5YlR5276/b+N/zxMVjvtvAxb5IxImu9Y6CDUglyG5ex/pfC7 YrHra1CtxawBVJrT+sMkXKiTTUUclkVGR4HIKtKfGE7WgIdI1/o8G/IPdWq/xqa6oi yaQurj/raByuQ== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id E587A100042; Fri, 13 Dec 2024 17:51:31 -0500 (EST) Received: from alfajor (104-195-225-43.cpe.teksavvy.com [104.195.225.43]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B38EF120243; Fri, 13 Dec 2024 17:51:31 -0500 (EST) From: Stefan Monnier To: Eshel Yaron Subject: Re: bug#74504: 31.0.50; Wrong source directory in *Help* In-Reply-To: (Eshel Yaron's message of "Sun, 08 Dec 2024 08:35:34 +0100") Message-ID: References: <86v7vvisq7.fsf@gnu.org> Date: Fri, 13 Dec 2024 17:51:31 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.028 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74504 Cc: Eli Zaretskii , 74504@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > I think that the workaround Stefan suggests makes sense. Pushed a slightly tweaked patch to `master`. > It doesn't make the code (and the implicit assumptions about when > a file name is absolute and when it isn't) any clearer though. > Another option may be something like the following, where we > explicitly look only for .el files under load-path: AFAICT the other parts of the code treat specially the C files rather than the ELisp files. Not sure if it matters (e.g. for `.so` Emacs modules?), but I'd rather try and use the same hack here as elsewhere. FWIW, the other place I find this distinction is `find-function-search-for-symbol` where we do: (if (string-match "\\`src/\\(.*\\.\\(c\\|m\\)\\)\\'" library) (find-function-C-source symbol (match-string 1 library) type) And the `src/*.c` strings come from `help-C-file-name`. We should label those strings better in order to know more reliably whether they're supposed to be searched in `load-path` or in `find-function-S-source-directory` or god knows where else. But in the mean time, this specific bug is fixed. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 14 06:48:48 2024 Received: (at 74504) by debbugs.gnu.org; 14 Dec 2024 11:48:48 +0000 Received: from localhost ([127.0.0.1]:45763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tMQdY-0004kE-7p for submit@debbugs.gnu.org; Sat, 14 Dec 2024 06:48:48 -0500 Received: from mail.eshelyaron.com ([107.175.124.16]:39406 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tMQdV-0004k1-Ba; Sat, 14 Dec 2024 06:48:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1734176920; bh=wsKCsw7mySTxYz1wlov0xZyj3xkYM5Oo5yRisAP4OBM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=M9y5eaUtBoxpdsfQJOx33IeUtQMVVLKQrNOn8OXmKbkVGnU9sdPZfLYVx9Ctm1vlP nBdJynzGEK28gbm8pdeuX7Ivt44YYMayqomasyg9STqjaWrnpkApNtVFEz7QiZySNs 3601v+iBK3Q7yNtMAEvouZNDQzXo/4rkwlRxY1TdkEy5PB8Tz9G7ry6NrpVg9RD/pi F7qMcnE5UpaSC4AySTDd7Qrk/FQwnK3PF034r8eHNZbhl1Loei+nnzxrH39oJQ1gSx 0Wwl2+VAvJHBgDx+on4oq/a4Fe454yWyqUZHnPN5DlAE2Ltpasp9RZJK4HL7UpanBy c/ZP0sTXmo5jw== From: Eshel Yaron To: Stefan Monnier Subject: Re: bug#74504: 31.0.50; Wrong source directory in *Help* In-Reply-To: (Stefan Monnier's message of "Fri, 13 Dec 2024 17:51:31 -0500") References: <86v7vvisq7.fsf@gnu.org> Date: Sat, 14 Dec 2024 12:48:38 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74504 Cc: Eli Zaretskii , 74504@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 74504 31.1 quit Stefan Monnier writes: >> I think that the workaround Stefan suggests makes sense. > > Pushed a slightly tweaked patch to `master`. > >> It doesn't make the code (and the implicit assumptions about when >> a file name is absolute and when it isn't) any clearer though. >> Another option may be something like the following, where we >> explicitly look only for .el files under load-path: > > AFAICT the other parts of the code treat specially the C files rather > than the ELisp files. Not sure if it matters (e.g. for `.so` Emacs > modules?), but I'd rather try and use the same hack here as elsewhere. > > FWIW, the other place I find this distinction is > `find-function-search-for-symbol` where we do: > > (if (string-match "\\`src/\\(.*\\.\\(c\\|m\\)\\)\\'" library) > (find-function-C-source symbol (match-string 1 library) type) > > And the `src/*.c` strings come from `help-C-file-name`. > > We should label those strings better in order to know more reliably > whether they're supposed to be searched in `load-path` or in > `find-function-S-source-directory` or god knows where else. > > But in the mean time, this specific bug is fixed. Confirmed, closing. Thank you! Eshel From unknown Fri Jun 20 07:18:28 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 11 Jan 2025 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator