From unknown Sat Aug 16 16:12:10 2025 X-Loop: don@donarmstrong.com Subject: bug#671: 23.0.60; To source or not to source (from help) Reply-To: martin rudalics , 671@debbugs.gnu.org Resent-From: martin rudalics Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 08 Aug 2008 10:00:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 671 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.121818908130552 (code B ref -1); Fri, 08 Aug 2008 10:00:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.6 required=4.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 8 Aug 2008 09:51:21 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m789pHEF030483 for ; Fri, 8 Aug 2008 02:51:18 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KROcv-0001AD-2c for bug-gnu-emacs@gnu.org; Fri, 08 Aug 2008 05:51:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KROcu-00019H-5A for bug-gnu-emacs@gnu.org; Fri, 08 Aug 2008 05:51:16 -0400 Received: from [199.232.76.173] (port=58437 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KROct-00018w-OW for bug-gnu-emacs@gnu.org; Fri, 08 Aug 2008 05:51:15 -0400 Received: from mail.gmx.net ([213.165.64.20]:39736) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KROct-0002DO-QE for bug-gnu-emacs@gnu.org; Fri, 08 Aug 2008 05:51:16 -0400 Received: (qmail invoked by alias); 08 Aug 2008 09:51:12 -0000 Received: from 62-47-56-100.adsl.highway.telekom.at (EHLO [62.47.56.100]) [62.47.56.100] by mail.gmx.net (mp044) with SMTP; 08 Aug 2008 11:51:12 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18ghcd9LzYg4VqUFhmUvnFnm7DczFhN2zXf6U1kvt tm8Q0hF09vIfrQ Message-ID: <489C1757.3060504@gmx.at> Date: Fri, 08 Aug 2008 11:52:23 +0200 From: martin rudalics User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en MIME-Version: 1.0 To: 587@debbugs.gnu.org CC: Bug-Gnu-Emacs , "Lennart Borgman (gmail)" Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.6899999999999999 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) > If you do C-h v and look at a variable and click on the library link in > the help buffer you will go to the file in your current Emacs tree. If > you do C-h f to look at a function and do the same you will be taken to > the cvs checkout file instead. I suspect you compiled Emacs in the checkout directory and then copied the Emacs tree to another directory. In this case the following might happen: As for C-h f `describe-function-1' will execute ;; See if lisp files are present where they where installed from. (if (not (eq file-name 'C-source)) (setq file-name (find-source-lisp-file file-name))) which sets `file-name' to the ".el" file from the checkout directory (because you did compile it there) and installs the corresponding reference in the hyperlink. As for C-h v `describe-variable' does _not_ care whether you compiled in another directory and simply goes to the file supplied by `symbol-file'. You could try inserting the snipped above in `describe-variable' immediately before the line (if file-name and see whether it now jumps to the checkout directory instead. Personally, I'd prefer something like the following in both cases: (unless (or (eq file-name 'C-source) (file-exists-p file-name)) (setq file-name (find-source-lisp-file file-name))) martin From unknown Sat Aug 16 16:12:10 2025 X-Loop: don@donarmstrong.com Subject: bug#671: 23.0.60; To source or not to source (from help) Reply-To: Stefan Monnier , 671@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 11 Aug 2008 23:10:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 671 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12184957049497 (code B ref -1); Mon, 11 Aug 2008 23:10:04 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 11 Aug 2008 23:01:44 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7BN1e3m009474 for ; Mon, 11 Aug 2008 16:01:41 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KSgOS-0002bQ-02 for bug-gnu-emacs@gnu.org; Mon, 11 Aug 2008 19:01:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KSgOQ-0002aQ-7m for bug-gnu-emacs@gnu.org; Mon, 11 Aug 2008 19:01:39 -0400 Received: from [199.232.76.173] (port=47741 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KSgOP-0002aG-UK for bug-gnu-emacs@gnu.org; Mon, 11 Aug 2008 19:01:37 -0400 Received: from smtp-01.arnet.com.ar ([200.45.191.24]:45839) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KSgOO-00041P-RL for bug-gnu-emacs@gnu.org; Mon, 11 Aug 2008 19:01:37 -0400 Received: (qmail 23581 invoked from network); 11 Aug 2008 22:59:46 -0000 Received: from unknown (HELO ceviche.home) (190.30.131.157) by 0 with SMTP; 11 Aug 2008 22:59:46 -0000 Received: by ceviche.home (Postfix, from userid 20848) id 34F5EB406B; Fri, 8 Aug 2008 14:43:03 -0400 (EDT) From: Stefan Monnier To: martin rudalics Cc: 671@debbugs.gnu.org, 587@debbugs.gnu.org, Bug-Gnu-Emacs Message-ID: References: <489C1757.3060504@gmx.at> Date: Fri, 08 Aug 2008 14:43:03 -0400 In-Reply-To: <489C1757.3060504@gmx.at> (martin rudalics's message of "Fri, 08 Aug 2008 11:52:23 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) > Personally, I'd prefer something like the following in both cases: > (unless (or (eq file-name 'C-source) > (file-exists-p file-name)) > (setq file-name (find-source-lisp-file file-name))) I'd use file-readable-p, but otherwise, it sounds fine, Stefan