[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs development...
From: |
Arthur Miller |
Subject: |
Re: Emacs development... |
Date: |
Sun, 22 Aug 2021 04:15:07 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Tim Cross <theophilusx@gmail.com> writes:
> Jean-Christophe Helary <lists@traduction-libre.org> writes:
>
>>> On Aug 21, 2021, at 23:08, Tim Cross <theophilusx@gmail.com> wrote:
>>>
>>> I would also recommend getting comfortable with ielm (M-x ielm), an
>>> Interactive Emacs Lisp Mode, as well as learning how to evaluate
>>> expressions in the source buffer.
>>
>> Thank you Tim for the suggestion. I like ielm a lot, when I use it.
>>
>> What I am trying to do now is fix a bug in package.el and I don't see how I
>> can
>> use ielm for that. Do you have suggestions ?
>
> The relevance of ielm is that it is a powerful and useful tool you have
> at hand when doing development or bug fixing in elisp. It provides the
> REPL where you can test/evaluate bits of code. How useful it is for a
> specific issue will depend on that issue.
What does ielm offer over M-: (eval-expression)? I use a lot M-: so I am
interested to know if I can improve on my workflow.
> The main limitation with edebug (with debuggers generally), is that it
> doesn't really help with understanding the logic and intention of the
> code. It can help with understanding the 'mechanics' - what gets run
> when and what gets set to what value at what point etc. However, this
> rarely helps explain why. You may identify when a variable gets set to
> the wrong value, but not why it ended up with the wrong value. Knowing
> when it gets set to the wrong value can be useful, but often, if you
> really understand the code, you can already see this by just running the
> steps through mentally.
You have a point there, but in many cases people are not really sure
what value is passed into variable, so they will printf or message in
elisp, something just to see the value so they can identify which piece
of code it gets.
In that particular case, I would suggest that debugger is to prefer,
instead of adding a printf statememnt which will go away in a seconds
after.
Before I learned to use a debugger it could have being a lot
of System.out.println statements, to the point I needed to search the
output in a text editor. It was many years ago when even grep was an
esoteric command for me :).
- Re: Emacs development..., (continued)
- Re: Emacs development..., Arthur Miller, 2021/08/21
- RE: [External] : Re: Emacs development..., Drew Adams, 2021/08/21
- Re: Emacs development..., Stephen Berman, 2021/08/21
- Re: Emacs development..., Konstantin Kharlamov, 2021/08/21
- Re: Emacs development..., Jean-Christophe Helary, 2021/08/21
- Re: Emacs development..., Tim Cross, 2021/08/21
- Re: Emacs development..., Jean-Christophe Helary, 2021/08/21
- Re: Emacs development..., Tim Cross, 2021/08/21
- Re: Emacs development..., Jean-Christophe Helary, 2021/08/21
- Re: Emacs development..., Tim Cross, 2021/08/21
- Re: Emacs development...,
Arthur Miller <=
- Re: Emacs development..., Tim Cross, 2021/08/21
- Re: Emacs development..., Arthur Miller, 2021/08/22
- Re: Emacs development..., Tim Cross, 2021/08/22
- Re: Emacs development..., T.V Raman, 2021/08/22
- Re: Emacs development..., Eric Abrahamsen, 2021/08/22
- Re: Emacs development..., Jean-Christophe Helary, 2021/08/22
- Re: Emacs development..., Eric Abrahamsen, 2021/08/22
- Re: Emacs development..., Arthur Miller, 2021/08/22
- Re: Emacs development..., Jean-Christophe Helary, 2021/08/22
- Re: Emacs development..., Arthur Miller, 2021/08/22