[Ubuntu Wiki] Update of "DebuggingEmacs" by era

Ubuntu Wiki noreply at ubuntu.com
Wed Mar 30 19:48:51 UTC 2011


Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Ubuntu Wiki" for change notification.

The following page has been changed by era:
http://wiki.ubuntu.com/DebuggingEmacs

The comment on the change is:
Middle save, not yet finished

New page:
<<Include(Debugging/Header)>>
||<tablestyle="float:right; font-size: 0.9em; width:30%; background:#F1F1ED; background-image: url('https://librarian.launchpad.net/1812570/bugsquad.png'); background-repeat: no-repeat; background-position:  98% 0.5ex; margin: 0 0 1em 1em; padding: 0.5em;">'''Contents'''<<BR>><<TableOfContents>>||

= Introduction =

There are multiple Emacs packages, collectively referred to as "Emacsen".  They all depend on a package called `emacsen-common`, and they are divided into "flavors".  The main flavors are GNU Emacs (AKA FSF Emacs; `emacs23` and `emacs-snapshot`) and `xemacs21`.  These in turn are divided into multiple packages, in order to separate architecture-independent components (for which only one package is needed) from architecture-dependent ones (which need to be built separately for each architecture), and mandatory components from optional ones.

If you only need one Emacs flavor, the stable GNU Emacs (currently `emacs23`) is recommended.  `xemacs21` is rather old and not very actively maintained; `emacs-snapshot` contains a relatively recent non-release version of the developer sources, though you might want to obtain a more recent version from a PPA or other non-Ubuntu source if you want the really latest and greatest.

There is a plethora of Emacs add-on packages.  Most of these are supported on all flavors, but there are notable exceptions.  Some add-ons are not needed on some flavors, and some add-ons provide newer and / or different versions of components which are also included with a base Emacs install (e.g. Gnus).

= How to file =

You can file bugs against Emacs using Apport.

There is also the built-in`M-x emacs-bug-report` but it is not fully customized for sending bug reports to Ubuntu.

= Bug tags =

(Developers: please update this section)

= Debugging procedure =

If Emacs doesn't behave like you expect, try running `emacs -Q` and see if the problem goes away.  This disables the reading of your `.emacs` file and other local modifications.  If the problem goes away, the problem is most likely in a local customization.

If you get an error message from Emacs, you may be able to trigger a backtrace which shows which Lisp functions were being processed when the error hit.  Enable backtraces with `M-: (setq debug-on-error t)` and attach the `*Backtrace*` buffer to your bug report.

== Package Installation Errors ==

Apparent Emacs errors are often caused by an add-on package which contains a bug or incompatibility with the installed Emacs flavor.  

If `dpkg` prints an error message indicating that the package `postinst` failed, the actual error message is probably a few lines before this message in the `dpkg` output.

== Byte Compilation Errors ==

A particular type of installation error is the byte compilation error.
With `emacs22` and `emacs-snapshot` the terminal log will contain a message like this:

`!! Byte-compilation for <<flavor>> failed!`<<BR>>
`!! This indicates a bug in one of the add-on packages`<<BR>>
`!! installed on your system, or a bug in Emacs itself.`<<BR>>
`!! Please file a bug report against <<flavor>>`<<BR>>
`!! and attach the file /tmp/<<flavor>>.<<suffix>>`

The file name will be different each time.  This file is required in order to analyze the problem.

= How to Triage =

Apport bugs are generally triggered by a package failing to install, and usually include DpkgTerminalLog or VarDistUpgradeTermLog as an attachment; this log file is usually the first one to examine.

Typically, it will contain an error message near the end which indicate which package failed installation and why.

If this file is missing, it should be requested.  See a canned reply below for example.

If the message indicates a byte-compilation error in an add-on package (see above), the temporary file in the error message should be attached to the bug report.  If it is not, it should be requested.  See a canned reply below for example.

== Stock Replies ==

'''TODO''' How to produce and attach a backtrace

=== Missing Terminal Log ===

||<tablestyle="background-color: #eee">Thank you for taking the time to report this bug and helping to make Ubuntu better.  In order for us to be able to analyze this problem, we would like you to attach the contents of the file /var/log/apt/term.log to this bug report.  You will need sudo privileges to read or copy this file.<<BR>><<BR>>If you got this error during an upgrade from an earlier version of Ubuntu, the log file's name will instead be /var/log/dist-upgrade.log<<BR>><<BR>>Thanks in advance!||

=== Missing Byte Compilation Log ===

||<tablestyle="background-color: #eee">If you still have this file on your system, please attach it to this bug report.  However, files in the /tmp directory are purged on reboot; if the file has already been removed from your system, you may be able to recreate a similar file by attempting to repeat the operation which failed when you got the error message.  However, the name of the generated temporary file will be slightly different each time; refer to near the end of your /var/log/apt/term.log to see the exact generated file name.  You will need sudo privileges to read the terminal log file.||

'''TODO''' The Bugs/Responses page should include these replies.

== How to Forward ==

The standard upstream for FSF Emacs bugs is http://debbugs.gnu.org/ which is running the same software as the Debian BTS.  The Ubuntu packages are generally merged from Debian, so for packaging bugs, Debian is the upstream.

= Known bugs =

Description of known bug reports that may receive duplicates and how to recognise them.  This information should be obtained by looking for bugs tagged as 'metabug'. 

'''Open'''
||<rowbgcolor="#eeeeee"> '''Bug''' || '''Subject''' || '''Symptom''' ||
|| [[https://launchpad.net/bugs/8896|8896]] || The subject from LP || This bug can be identified by ... ||

'''Closed'''
||<rowbgcolor="#eeeeee"> '''Bug''' || '''Subject''' || '''Symptom''' ||
|| [[https://launchpad.net/bugs/8896|8896]] || The subject from LP || This bug can be identified by ... ||

= Non-bugs =

How to recognise common issues arising from hardware failures, common feature requests and other invalid bugs for this category. Advice how triage them and stock responses.

----
CategoryBugSquad
CategoryDebugging



More information about the Ubuntu-bugsquad mailing list