GNU bug report logs - #37527
[PATCH] Install C source code for for debugging help

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Thu, 26 Sep 2019 20:09:01 UTC

Severity: wishlist

Full log


Message #145 received at 37527 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: michael.albinus <at> gmx.de, stefan <at> marxist.se, 37527 <at> debbugs.gnu.org,
 rgm <at> gnu.org
Subject: Re: bug#37527: [PATCH] Install C source code for for debugging help
Date: Sun, 26 Jan 2020 01:00:34 -0800
[Message part 1 (text/plain, inline)]
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.
[0001-Improve-doc-for-emacs-source-directory-Bug-36527.patch (text/x-patch, attachment)]

This bug report was last modified 4 years and 311 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.