aboutsummaryrefslogtreecommitdiffstats
path: root/etc/PROBLEMS
diff options
context:
space:
mode:
authorPaul Eggert2020-01-27 23:04:20 -0800
committerPaul Eggert2020-01-27 23:17:10 -0800
commita02b179242a55aba20158aa245e5643a04d07576 (patch)
tree60ea8c8bbba239d0c92d459d47b588b1b2a53571 /etc/PROBLEMS
parent688e92426bfa2c5f21bd2ab7a1361c8febf2ca90 (diff)
downloademacs-a02b179242a55aba20158aa245e5643a04d07576.tar.gz
emacs-a02b179242a55aba20158aa245e5643a04d07576.zip
Revert the --with-install-srcdir patch
Also, update description of debuginfo and sources to match Debian and Red Hat more accurately, and move this sad tale from INSTALL to etc/PROBLEMS which is a better home for it. * Makefile.in (emacs_srcdir, install-c-src): * configure.ac (emacs_srcdir, --with-install-srcdir): * src/epaths.in (PATH_EMACS_SOURCE): * src/lread.c (emacs-source-directory): Remove. All uses removed. * lisp/emacs-lisp/find-func.el (find-function-C-source): Do not worry about compressed C sources. * src/lread.c: Do not include <dosname.h>.
Diffstat (limited to 'etc/PROBLEMS')
-rw-r--r--etc/PROBLEMS77
1 files changed, 77 insertions, 0 deletions
diff --git a/etc/PROBLEMS b/etc/PROBLEMS
index 9e4a631c729..4ce738d9a54 100644
--- a/etc/PROBLEMS
+++ b/etc/PROBLEMS
@@ -318,6 +318,83 @@ element from LD_LIBRARY_PATH before starting emacs proper.
318Or you could recompile Emacs with an -Wl,-rpath option that 318Or you could recompile Emacs with an -Wl,-rpath option that
319gives the location of the correct libotf. 319gives the location of the correct libotf.
320 320
321* Problems when reading or debugging Emacs C code
322
323Because Emacs does not install a copy of its C source code, users
324normally cannot easily read that code via commands like 'M-x
325describe-function' (C-h f) that display the definition of a function.
326However, some GNU/Linux systems provide separate packages containing
327this source code which can get C-h f to work if you are willing to do
328some tinkering, and some systems also provide packages containing
329debug info, which when combined with the source can be used to debug
330Emacs at the C level.
331
332** Debian-based source and debuginfo
333
334On recent Debian-based systems, you can obtain and use a source
335package of Emacs as follows.
336
337*** Add the appropriate URI to /etc/apt/sources.list.
338
339To do this, become superuser and uncomment or add the appropriate
340'deb-src' line. Details depend on the distribution.
341
342*** Execute a command like 'apt-get source emacs'.
343
344On older systems, append the top-level version number, e.g., 'apt-get
345source emacs25'. The target directory for unpacking the source tree
346is the current directory.
347
348*** Set find-function-C-source-directory accordingly.
349
350Once you have installed the source package, for example at
351/home/myself/deb-src/emacs-26.3, add the following line to your
352startup file:
353
354 (setq find-function-C-source-directory
355 "/home/myself/deb-src/emacs-26.3/src/")
356
357The installation directory of the Emacs source package will contain
358the exact package name and version number of Emacs that is installed
359on your system. If a new Emacs package is installed, the source
360package must be reinstalled as well, and the setting in your startup
361file must be updated.
362
363*** Debian-based debuginfo
364
365You can also install a debug package of Emacs with a command like
366'apt-get install emacs-dbg' (on older systems, 'apt-get install
367emacs25-dbg'). You need to arrange for GDB to find where you
368installed the source code, e.g., by using GDB's 'directory' command.
369
370** Red Hat-based source and debuginfo
371
372On recent Red Hat-based systems, you can install source and debug info
373via superuser commands like the following:
374
375 # Add the *-debuginfo repositories (exact command depends on system).
376 dnf config-manager --set-enabled fedora-debuginfo updates-debuginfo'
377
378 # Install Emacs source and debug info.
379 dnf install emacs-debugsource
380
381To get describe-function and similar commands to work, you can then
382add something like the following to your startup file:
383
384 (setq find-function-C-source-directory
385 "/usr/src/debug/emacs-26.3-1.fc31.x86_64/src/")
386
387However, the exact directory name will depend on the system, and you
388will need to both upgrade source and debug info when your system
389upgrades or patches Emacs, and change your startup file accordingly.
390
391** Source and debuginfo for other systems
392
393If your system follows neither the Debian nor the Red Hat patterns,
394you can obtain the source and debuginfo by obtaining the source code
395of Emacs, building Emacs with the appropriate debug flags enabled, and
396running the just-built Emacs.
397
321* General runtime problems 398* General runtime problems
322 399
323** Lisp problems 400** Lisp problems