From unknown Sat Aug 16 10:45:37 2025 X-Loop: don@donarmstrong.com Subject: bug#672: 23.0.60; To source or not to source (from help) Reply-To: "Lennart Borgman (gmail)" , 672@debbugs.gnu.org Resent-From: "Lennart Borgman (gmail)" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 08 Aug 2008 11:15:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 672 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.121819377021645 (code B ref -1); Fri, 08 Aug 2008 11:15: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.7 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 11:09:30 +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 m78B9Qv4021639 for ; Fri, 8 Aug 2008 04:09:27 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KRPqY-0003Fn-0T for bug-gnu-emacs@gnu.org; Fri, 08 Aug 2008 07:09:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KRPqV-0003Dk-H2 for bug-gnu-emacs@gnu.org; Fri, 08 Aug 2008 07:09:24 -0400 Received: from [199.232.76.173] (port=42818 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KRPqV-0003DK-8Y for bug-gnu-emacs@gnu.org; Fri, 08 Aug 2008 07:09:23 -0400 Received: from ch-smtp01.sth.basefarm.net ([80.76.149.212]:48485) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KRPqU-0006su-Sw for bug-gnu-emacs@gnu.org; Fri, 08 Aug 2008 07:09:23 -0400 Received: from c83-254-151-176.bredband.comhem.se ([83.254.151.176]:59643 helo=[127.0.0.1]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1KRPqS-0006fJ-42; Fri, 08 Aug 2008 13:09:20 +0200 Message-ID: <489C2956.1030202@gmail.com> Date: Fri, 08 Aug 2008 13:09:10 +0200 From: "Lennart Borgman (gmail)" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: martin rudalics CC: 587@debbugs.gnu.org, Bug-Gnu-Emacs References: <489C1757.3060504@gmx.at> In-Reply-To: <489C1757.3060504@gmx.at> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 080807-0, 2008-08-07), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.151.176 X-Scan-Result: No virus found in message 1KRPqS-0006fJ-42. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1KRPqS-0006fJ-42 6ef29a824504b1ac356340fa18d10ab5 X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) X-CrossAssassin-Score: 2 martin rudalics wrote: > > 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. I use the normal make install INSTALL_DIR=... > 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. Yes, I guess that is correct. > 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))) Thanks martin. I think a variable (or an option) for which elisp to go to would be the best. Is there any reason not to have that?