help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Please help me debug my Emacs instillation


From: tpeplt
Subject: Re: Please help me debug my Emacs instillation
Date: Fri, 01 Mar 2024 13:48:32 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

Davin Pearson <davin.pearson@gmail.com> writes:

> Here is the file runmacs.bat that I use for loading emacs
>
> date
> cd LOCATION
> ./src/emacs -q --load ~/dmp-emacs--yes-init-file.el  --eval "(setq
> debug-on-error t)" --debug-init &
>
> where LOCATION is the location of your emacs executable file.  On my
> computer it is: ~/Downloads/emacs-29.1/
>
> Please copy the attached files dmp-emacs--yes-file.el and includer.el
> to your HOME folder.
>
> The following commands all give an error message like this:
>
> byte-code: Recursive ‘require’ for feature ‘semantic’
>
> Here is a list of the commands that generate the above-mentioned error:
>
> M-%
> M-/
> M-.
> C-h a
> C-s
> C-r
> M-C-s
> M-C-r
>
> Why doesn't it show a backtrace since I have --debug-init on the command
> line?
>

Having tried those steps, I did not get the resulting error that you are
seeing.  Instead, there was a different error.

I am running Emacs 29.2 on GNU/Linux.  Part of the difference in our
results could be related to a difference is Emacs versions or operating
systems.

Some steps for you to try:

1. Start Emacs with $ emacs -q

2. Read the file ~/dmp-emacs--yes-init-file.el:

   C-x f ~/dmp-emacs--yes-init-file.el RET

3. Note that the major mode for this file Elisp.  There will be an entry
added to the menu bar for ‘Emacs-Lisp’.  Click on that entry and find
the sub-entry ‘Byte-compile This File’.  Click on that entry to
compile your file’s Emacs Lisp code.  This will result in a
*Compile-Log* buffer that contains a series of warning and/or error
messages.  What those messages will be depends on the version of Emacs
you are running.  You should read through that buffer and resolve all
error messages.  You might also want to resolve the warning messages so
that when you compile this file in the future you will not need to scan
through warning messages in order to find compilation errors.  Note that
when you switch your focus to the *Compile-Log* buffer, the menu line
will change from displaying an Emacs-Lisp menu entry to a Compile menu
entry.  You can use this to navigate through the *Compile-Log* message,
but a simple practice is to type ‘n’ (for next message) or ‘p’ (for
previous message).  Unfortunately, these keys are not listed in the
‘Compile’ menu.

4. Once you have resolved the compiler errors, you should consider
running the Emacs linter on the file.  This is also available from the
‘Emacs-Lisp’ menu: Emacs-Lisp -> Linting -> Lint Buffer
This will produce both warning and error messages.  Some of the warning
messages might be safely ignored.

5. After steps 3 and 4, you should be able to "walk through" your file’s
Elisp buffer (C-M-f) and evaluate each one (C-x C-e) and check to see
that the expressions give expected results.  What order you do this in
depends on how you have organized your file.  You should start with the
least dependent expressions and work up to the more dependent
expressions.

6. Add docstrings to your definitions.  This will help you in the future
when you want to look up what a given definition is expected to do, and
if you need to ask for help from others, it will help them to understand
what the definitions are intended for.

7. If you have not read the introduction to Emacs Lisp, it is available
in the ‘Help’ entry of the menu line under ‘More Manuals’ ->
‘Introduction to Emacs Lisp’.

--



reply via email to

[Prev in Thread] Current Thread [Next in Thread]