From: John Valente <johnv02139@yahoo.com>
To: hector <hectorlahoz@gmail.com>,
"help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: debugging Emacs LISP functions
Date: Wed, 1 Mar 2017 17:33:31 +0000 (UTC) [thread overview]
Message-ID: <1134748621.1292569.1488389611565@mail.yahoo.com> (raw)
In-Reply-To: <20170301121427.GA3290@workstation>
The blurring between "user" and "developer", in this case, has nothing to do with free software. Emacs is many things, including an elisp complier and interpreter. So the problem you're having is absolutely appropriate for a user-level mailing list.
As far as Lisp goes, it's very common and canonical to have a function that can return either a string or a list of strings.
I see someone else has already responded with some help about using the debugger, and about evaluating source-code functions. One other thing you might try is quit emacs, and move or delete all the .elc files, and start it up again. I don't know how much that will work, because there might be code around that notices the lack of .elc files and recompiles the source. But I don't think the core files do that. As far as I recall, emacs is more than happy to work with interpreted code. It's just a little bit slower.
- John
From: hector <hectorlahoz@gmail.com>
To: help-gnu-emacs@gnu.org
Sent: Wednesday, March 1, 2017 4:14 AM
Subject: debugging Emacs LISP functions
I have a problem with Emacs. Basically it doesn't do what I want it to do :-)
Or put it another way, it doesn't behave as I expect it to behave.
I tried debugging the offending function (dir-locals-find-file)
and then I found another problem.
Perhaps I just don't get acquainted to the LISP typing system.
This function can return a string or a list. Is this good coding style?
But that's another question. Perhaps this mail should go to the
emacs-devel mailing list. I don't know. With free software you just
loose the difference between a "user" and a "developer". Anyway I see
some developers read this list every now and then.
When I try to debug LISP code that is part of Emacs I see with some functions
I get the source code and with others I just get "byte-code". In the latter
case I can't debug it because the debugger just skips the whole function.
How can I know what functions appear as "byte-code" in the debugger?
And how can I debug them?
next prev parent reply other threads:[~2017-03-01 17:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-01 12:14 debugging Emacs LISP functions hector
2017-03-01 12:30 ` chaouche yacine
2017-03-01 14:01 ` Stefan Monnier
2017-03-01 17:33 ` John Valente [this message]
2017-03-01 18:31 ` Drew Adams
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1134748621.1292569.1488389611565@mail.yahoo.com \
--to=johnv02139@yahoo.com \
--cc=hectorlahoz@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.