From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#37527: [PATCH] Install C source code for for debugging help Date: Sun, 26 Jan 2020 18:13:27 +0200 Message-ID: <837e1ep55k.fsf@gnu.org> 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> <862c4cca-3a79-f3a7-e88a-0f478c454cde@cs.ucla.edu> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="75571"; mail-complaints-to="usenet@ciao.gmane.io" Cc: stefan@marxist.se, michael.albinus@gmx.de, 37527@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 26 17:14: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 1ivkY8-000JcS-FW for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 Jan 2020 17:14:12 +0100 Original-Received: from localhost ([::1]:34914 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ivkY7-0004fI-KW for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 Jan 2020 11:14:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58360) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ivkXz-0004f8-Nf for bug-gnu-emacs@gnu.org; Sun, 26 Jan 2020 11:14:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ivkXy-00036B-9U for bug-gnu-emacs@gnu.org; Sun, 26 Jan 2020 11:14:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51350) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ivkXy-000365-6R for bug-gnu-emacs@gnu.org; Sun, 26 Jan 2020 11:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ivkXy-0005jX-1Q for bug-gnu-emacs@gnu.org; Sun, 26 Jan 2020 11:14: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: Sun, 26 Jan 2020 16:14: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.158005522722010 (code B ref 37527); Sun, 26 Jan 2020 16:14:01 +0000 Original-Received: (at 37527) by debbugs.gnu.org; 26 Jan 2020 16:13:47 +0000 Original-Received: from localhost ([127.0.0.1]:57322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivkXj-0005iv-5O for submit@debbugs.gnu.org; Sun, 26 Jan 2020 11:13:47 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49216) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivkXg-0005ih-OJ for 37527@debbugs.gnu.org; Sun, 26 Jan 2020 11:13:45 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:47290) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ivkXb-0002en-3X; Sun, 26 Jan 2020 11:13:39 -0500 Original-Received: from [176.228.60.248] (port=3548 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ivkXZ-0005bD-Qb; Sun, 26 Jan 2020 11:13:38 -0500 In-reply-to: <862c4cca-3a79-f3a7-e88a-0f478c454cde@cs.ucla.edu> (message from Paul Eggert on Sun, 26 Jan 2020 01:00:34 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:175306 Archived-At: > Cc: stefan@marxist.se, michael.albinus@gmx.de, rgm@gnu.org, > 37527@debbugs.gnu.org > From: Paul Eggert > Date: Sun, 26 Jan 2020 01:00:34 -0800 > > 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. The files in those directories are always installed, and we never reference them in the original source tree, so this is different. > 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 discussion back then indicates that this wasn't clear at all. I suggested this to be off by default right at the beginning of the discussion, and proposed to wait to hear user feedback first, see https://lists.gnu.org/archive/html/emacs-devel/2019-09/msg00581.html Andreas said we should instead teach Emacs to look for the sources in the debug source directory, see https://lists.gnu.org/archive/html/emacs-devel/2019-09/msg00584.html Several other people opined that installing sources shouldn't be the default, and some said right away that they will disable this if installed. Also, there was some kind of consensus that providing sources to be installed by end-users is something the distros should do, and distros don't need this turned on by default. By contrast, users who build their own Emacs are not very likely to want the sources installed the second time. Therefore, it sounds like making this the default is premature, and we should change it to be an opt-in feature. > (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. Which one is the reliable one depends on whether this option was specified at configure time, and for users who install precompiled distributions, also on whether they decide to install the sources. So they are both unreliable, but Emacs developers are much more likely to have source-directory populated, so we should start with that.