Subject: Re: bug#37527: [PATCH] Install C source code for for debugging help

From: Michael Albinus <[email-masked]>
Date: Fri, 27 Sep 2019 21:59:17 +0200

Eli Zaretskii <[email-masked]> writes:

>> > I thought major distros offered a source archive as well, as an
>> > optional download, don't they?
>>
>> They do. But we must document at least, how to make the source tree
>> visible for debug.
>
> I don't mind adding documentation, if it's missing, but what does it
> mean "visible for debug"?  What kind of debugging did you have in
> mind?

"Visible for debug" is misleading, because the source packages don't
seem to provide symbol tables etc pp. I've just realized.

But something like the following, which is very rough written, could be
added:

diff --git a/INSTALL b/INSTALL
index 86f9e0080c..595f711ffc 100644
--- a/INSTALL
+++ b/INSTALL
@@ -214,6 +214,24 @@ like 'apt-get build-dep emacs' (on older systems, replace 'emacs' with
 eg 'emacs25').  On Red Hat-based systems, the corresponding command is
 'dnf builddep emacs' (on older systems, use 'yum-builddep' instead).

+* GNU/Linux source packages
+
+Many GNU/Linux systems provide separate packages containing the
+sources of Emacs.  They are useful if you want to check the source
+code of Emacs primitive functions, and alike.
+
+The names of the packages that you need varies according to the
+GNU/Linux distribution that you use.  On Debian-based systems, you can
+install all the packages needed to build the installed version of
+Emacs with a command like 'apt-get source' (on older systems, replace
+'emacs' with eg 'emacs25').  On Red Hat-based systems, the
+corresponding command is <tbd>.
+
+Once you have installed the source package, for example at
+/path/to/emacs-26.1+1, add the following line to your startup file:
+
+     (setq source-directory "/path/to/emacs-26.1+1")
+

 DETAILED BUILDING AND INSTALLATION:

Best regards, Michael.