[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Printing code made by a macro
From: |
Eduardo Ochs |
Subject: |
Re: Printing code made by a macro |
Date: |
Sun, 6 Aug 2023 17:36:29 -0300 |
On Sun, 6 Aug 2023 at 14:24, Heime <heimeborgia@protonmail.com> wrote:
>
> I am now looping to find pp-to-string and find-estring-elisp
>
> Where are they ?
>
> You call these "find-" tools (e.g. find-eppm) which I can use
> to print code derived from a macro. Although in actual fact,
> you use them to print code that is found in elisp files. And
> thusly you call them "find-" tools. It just happens that I
> can use them to pretty print the output of my macro, even though
> no code will be found in my libraries. Is this the correct
> evaluation of find-eppm ?
Hi Heime,
eev has lots of functions to inspect how Emacs represents things in
memory and only a few functions to jump to their source code, and the
functions in eev that start with the prefix `find-' are the ones that
are usually used as elisp hyperlinks... for example, this - note that
it is a sexp of the form "(find-... ...)" - is an elisp hyperlink:
(find-efunction 'find-eppm)
if you follow it it will take you to the definition of the function
`find-eppm' in the file "eev-blinks.el". Elisp hyperlinks are
explained here:
(find-eev-quick-intro "2. Evaluating Lisp")
(find-eev-quick-intro "3. Elisp hyperlinks")
http://anggtwu.net/eev-intros/find-eev-quick-intro.html#2
http://anggtwu.net/eev-intros/find-eev-quick-intro.html#3
The "Emacs way" to get help about a function is to put the point on
the name of the function and then type `C-h f RET'; this creates a
temporary buffer with lots of information, and one of the first things
in that temporary buffer is a link to where the function is defined.
The "eev way" to get help about a function is to put the point on the
name of the function and then type `M-h M-f RET'; this creates a
temporary buffer with lots of elisp hyperlinks. If you do `M-h M-f
RET' with the point on `find-eppm' some of the elisp hyperlinks that
will appear are these ones:
(find-efunction-links 'find-eppm)
(eek "M-h M-f find-eppm")
(find-eev-quick-intro "4.2. `find-ekey-links' and friends")
(find-efunctiondescr 'find-eppm)
(find-efunction 'find-eppm)
(find-efunctionpp 'find-eppm)
(symbol-file 'find-eppm 'defun)
(find-fline (symbol-file 'find-eppm 'defun))
(find-epp (assoc (symbol-file 'find-eppm 'defun) load-history))
Try them - I mean, try the ones above and then try all the ones in the
temporary buffer... you will see that some of them do things that are
easy to understand, and some other ones do things that are very
low-level and very technical... but you are trying to learn things
that are very low-level and very technical, so I think that you will
like them. Also, take a look at this:
(find-elisp-intro)
http://anggtwu.net/eev-intros/find-elisp-intro.html
I have the impression that its section 6
(find-elisp-intro "6. Defining functions")
http://anggtwu.net/eev-intros/find-elisp-intro.html#6
explains some things about how functions are stored in memory that may
be useful to you...
Btw, eev has a mailing list:
https://lists.nongnu.org/mailman/listinfo/eev
https://lists.gnu.org/archive/html/eev/
More later! Cheers =),
Eduardo
http://anggtwu.net/eepitch.html
- Printing code made by a macro, Heime, 2023/08/05
- Re: Printing code made by a macro, Eduardo Ochs, 2023/08/05
- Re: Printing code made by a macro, Heime, 2023/08/05
- Re: Printing code made by a macro, Eduardo Ochs, 2023/08/05
- Re: Printing code made by a macro, Heime, 2023/08/05
- Re: Printing code made by a macro, Heime, 2023/08/05
- Re: Printing code made by a macro, Eduardo Ochs, 2023/08/05
- Re: Printing code made by a macro, Heime, 2023/08/05
- Re: Printing code made by a macro, Heime, 2023/08/06
- Re: Printing code made by a macro,
Eduardo Ochs <=
- Re: Printing code made by a macro, Heime, 2023/08/06
- Re: Printing code made by a macro, Emanuel Berg, 2023/08/08
- Re: Printing code made by a macro, Heime, 2023/08/06
Re: Printing code made by a macro, Eli Zaretskii, 2023/08/06
Re: Printing code made by a macro, Sebastian Miele, 2023/08/06
Re: Printing code made by a macro, Pierre Rouleau, 2023/08/07