unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: goncholden via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 54550@debbugs.gnu.org
Subject: bug#54550: Debugging elisp files
Date: Thu, 24 Mar 2022 18:19:13 +0000	[thread overview]
Message-ID: <VG7aO5_2-TO69B-qYQhxhekjca-cJdzue-PHds_vI8C8G2Wn3JEwKQRyZI7bx0nHmy4rAUeGrRibjsXOiaCmlg3uY5UXwLkhmQz6AzFCaao=@protonmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1734 bytes --]

I am debugging a large file because of the following error,

Warning (initialization): An error occurred while loading ‘/home/goncho/.emacs’:
Invalid read syntax: )

This means that I have a trailing parenthesis. To ensure normal operation, I have to investigate and remove the cause of the error in my initialization file. But I am finding
the task problematic, because using the `--debug-init` option to view a complete error backtrace, has not properly located the problem. It is unfortunate that with just one mark makes the file impossible to parse from start to end. Can emacs be made to handle these things better rather than reject all the file?

The best way to find the problem is to use a binary space partitioning scheme. This means to divide the file in half (comment out one part) or put half in another file. Then check if the error occurs in the code that has not been commented out or resides in the other file. If it does, one has to divide again that part in half and repeat the process until one narrows down to the source of the problem. The process is very tedious.

In texinfo, there exists the "@ignore" and "@end ignore" tags that comment out sections of texinfo code. This makes it much easier to debug texinfo files, because one does not have to constantly comment every line, and with the advantage that one can leave the file almost intact.

I would be grateful if emacs could improve on the user debugging part, so debugging can be made more convenient for users in order to reduce downtime. Am not sure if the manual can describe the procedures to debug in a quicker and easier manner, both for new users of elisp programming and experienced ones who would benefit from fixing problem quite rapidly.

[-- Attachment #2: Type: text/html, Size: 2919 bytes --]

             reply	other threads:[~2022-03-24 18:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-24 18:19 goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-03-25  8:30 ` bug#54550: Debugging elisp files Robert Pluim
2022-03-25  8:38   ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-25  8:51     ` Robert Pluim
2022-03-25 11:47       ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-25 16:22 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='VG7aO5_2-TO69B-qYQhxhekjca-cJdzue-PHds_vI8C8G2Wn3JEwKQRyZI7bx0nHmy4rAUeGrRibjsXOiaCmlg3uY5UXwLkhmQz6AzFCaao=@protonmail.com' \
    --to=bug-gnu-emacs@gnu.org \
    --cc=54550@debbugs.gnu.org \
    --cc=goncholden@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).