From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#37527: [PATCH] Install C source code for for debugging help Date: Sun, 26 Jan 2020 01:00:34 -0800 Organization: UCLA Computer Science Department Message-ID: <862c4cca-3a79-f3a7-e88a-0f478c454cde@cs.ucla.edu> References: <20190926200752.12563-1-eggert@cs.ucla.edu> <877e5uglp8.fsf@gmx.de> <83lfuaj7ix.fsf@gnu.org> <878sq9a4tm.fsf@gmx.de> <83lfu9hscn.fsf@gnu.org> <87y2y8944m.fsf@gmx.de> <837e5siwmz.fsf@gnu.org> <87pnje6jaf.fsf@gmx.de> <87imp46f5n.fsf@gmx.de> <3c936479-9341-caf1-2d08-7c236a660061@cs.ucla.edu> <87lftwbn4t.fsf@gmx.de> <733562c8-8676-4c73-34ff-a3f6659e5b70@cs.ucla.edu> <838spvznjz.fsf@gnu.org> <875zkzpnpf.fsf@gmx.de> <83ftk3xxd2.fsf@gnu.org> <87lfq2rlh0.fsf@marxist.se> <89b5298c-bc22-06ae-635a-0bf6b9dccb56@cs.ucla.edu> <8336c8wxmn.fsf@gnu.org> <83sgk8vg6y.fsf@gnu.org> <0f25beb7-19f6-cd78-e355-bc9af1f8384d@cs.ucla.edu> <83h80oupya.fsf@gnu.org> <83k15itfoa.fsf@gnu.org> <162efbd0-5d99-4074-4a4c-e186b0765f70@cs.ucla.edu> <83y2tyrpxx.fsf@gnu.org> <835zh0q85p.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------36E96BF6BDF5B6D6AE5DB03C" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="117554"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 Cc: stefan@marxist.se, michael.albinus@gmx.de, 37527@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 26 10:01:12 2020 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 1ivdn6-000UYX-OD for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 Jan 2020 10:01:12 +0100 Original-Received: from localhost ([::1]:60556 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ivdn5-0002t9-Sq for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 Jan 2020 04:01:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56048) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ivdmx-0002t1-NB for bug-gnu-emacs@gnu.org; Sun, 26 Jan 2020 04:01:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ivdmw-0005Bu-GE for bug-gnu-emacs@gnu.org; Sun, 26 Jan 2020 04:01:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50530) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ivdmv-0005Ba-S2 for bug-gnu-emacs@gnu.org; Sun, 26 Jan 2020 04:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ivdmv-0005b2-Pu for bug-gnu-emacs@gnu.org; Sun, 26 Jan 2020 04:01:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Jan 2020 09:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37527 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 37527-submit@debbugs.gnu.org id=B37527.158002924421482 (code B ref 37527); Sun, 26 Jan 2020 09:01:01 +0000 Original-Received: (at 37527) by debbugs.gnu.org; 26 Jan 2020 09:00:44 +0000 Original-Received: from localhost ([127.0.0.1]:56503 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivdmd-0005aQ-Kr for submit@debbugs.gnu.org; Sun, 26 Jan 2020 04:00:43 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:41830) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivdmb-0005aA-JL for 37527@debbugs.gnu.org; Sun, 26 Jan 2020 04:00:42 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 085B416007A; Sun, 26 Jan 2020 01:00:36 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id yxcgoS_VDWm9; Sun, 26 Jan 2020 01:00:35 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 07B7B16007F; Sun, 26 Jan 2020 01:00:35 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id IQl_iXUwu_V7; Sun, 26 Jan 2020 01:00:34 -0800 (PST) Original-Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id A471D16007A; Sun, 26 Jan 2020 01:00:34 -0800 (PST) In-Reply-To: <835zh0q85p.fsf@gnu.org> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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" Xref: news.gmane.io gmane.emacs.bugs:175292 Archived-At: This is a multi-part message in MIME format. --------------36E96BF6BDF5B6D6AE5DB03C Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 1/24/20 11:58 PM, Eli Zaretskii wrote: > Thanks, but the name of this variable gives no clue about the sources > being installed as part of "make install", and neither does its > documentation. How about emacs-installed-source-directory? We don't use 'installed-' in other names that have similar roles, e.g., 'data-directory'. These variables and their uses don't care how the files got there, and their names and documentation should focus on what the variables are used for, not on the build process that set them up. >> +Emacs installs a compressed copy of much of its source code, to make > > "optionally installs", right? This is an opt-in feature, right? It's optional, but it's opt-out. I installed the attached patch, which changes the wording to "typically installs". I thought it pretty clear during the discussion that it would be opt-out; that's what my original patch proposed, anyway. I don't see why we'd want it to be opt-in. >> +** The new variable 'emacs-source-directory' gives the Emacs source >> +code location. > > This should explain that this is a copy of the sources, different > from the original source tree where Emacs was built. Also done in the attached patch. >> (defvar find-function-C-source-directory >> - (let ((dir (expand-file-name "src" source-directory))) >> - (if (file-accessible-directory-p dir) dir)) >> + (let ((dir (expand-file-name "src" emacs-source-directory))) >> + (if (file-accessible-directory-p dir) dir >> + (setq dir (expand-file-name "src" source-directory)) >> + (if (file-accessible-directory-p dir) dir))) > > This is backwards, IMO: it should first try the original source tree, > and only next the installed sources. The original source tree location is unreliable and is documented to be unreliable, whereas the installed sources are supposed to match the Emacs you're running and that is more useful for C-h f and friends. I'd rather try the reliable copy first. --------------36E96BF6BDF5B6D6AE5DB03C Content-Type: text/x-patch; charset=UTF-8; name="0001-Improve-doc-for-emacs-source-directory-Bug-36527.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Improve-doc-for-emacs-source-directory-Bug-36527.patch" >From d438f86698b69bd4a245724f7efcfa708d4b336f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 26 Jan 2020 00:58:57 -0800 Subject: [PATCH] Improve doc for emacs-source-directory (Bug#36527). --- INSTALL | 4 ++-- etc/NEWS | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/INSTALL b/INSTALL index cb12e4a17a..7a1b46872d 100644 --- a/INSTALL +++ b/INSTALL @@ -219,8 +219,8 @@ DEBUGGING AN INSTALLED EMACS * Installed Emacs source code -Emacs installs a compressed copy of much of its source code, to make -it easy for users to read the source code of Emacs via commands like +Emacs typically installs a compressed copy of much of its source code, +to make it easy for users to read Emacs source code via commands like M-x describe-function (C-h f) to display the definition of a function. This compressed copy ordinarily includes both the Elisp source code that Emacs is mostly written in, as well as the C source code for the diff --git a/etc/NEWS b/etc/NEWS index c3a71ade8a..276b8f46e8 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -148,8 +148,9 @@ called when the function object is garbage-collected. Use ** 'parse-time-string' can now parse ISO 8601 format strings, such as "2020-01-15T16:12:21-08:00". -** The new variable 'emacs-source-directory' gives the Emacs source -code location. +** The new variable 'emacs-source-directory' gives the location of +a copy of the Emacs source code, which is now typically installed as a +set of compressed source-code files. * Changes in Emacs 28.1 on Non-Free Operating Systems -- 2.17.1 --------------36E96BF6BDF5B6D6AE5DB03C--