From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eduardo Ochs Newsgroups: gmane.emacs.help Subject: Re: Printing code made by a macro Date: Sun, 6 Aug 2023 17:36:29 -0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25645"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Heime via Users list for the GNU Emacs text editor To: Heime Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 06 22:37:25 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qSkVA-0006Sb-2v for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 06 Aug 2023 22:37:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qSkUa-0008Sj-P5; Sun, 06 Aug 2023 16:36:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qSkUW-0008SV-KG for help-gnu-emacs@gnu.org; Sun, 06 Aug 2023 16:36:44 -0400 Original-Received: from mail-yw1-x1132.google.com ([2607:f8b0:4864:20::1132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qSkUU-00050u-SK for help-gnu-emacs@gnu.org; Sun, 06 Aug 2023 16:36:44 -0400 Original-Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-586df08bba0so5173507b3.3 for ; Sun, 06 Aug 2023 13:36:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691354201; x=1691959001; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=TwJqaHr0Tz9+yBTxaTyr7MAcaonefp7wpk7ks4s8G6I=; b=T2zd50INX8ertXJ2ofjwIJ1TtDS0+WZgTYQ/rDT9wLqm/t8nRxxjwJ3B4qHrj7pdq7 Iqd9JW/5zkjaNxHUHdmHYqdjMBcpiNb1W/EEMFnxtVnTZtKMz9xMSGszxfhM5T2nASE4 +113bTdfR92/eKfzWqI4Dj17XFaWsSZiO9r7L+zNf4FgFaY82Sky49ZPVXuzaENNeRhw +rnvJ9i4waqiHFQjzdEsSgEx9W+yAERpHsA1lFX7IrCvruq1kVcfJ29MKh98szMVCtKD /UEUw1a9L1adzV9A7VP0QsA4Yk2ZxYCBLjAFEQsZfT3e3CvrKi7dIf4fE6fymBLzM5Bd 8QYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691354201; x=1691959001; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TwJqaHr0Tz9+yBTxaTyr7MAcaonefp7wpk7ks4s8G6I=; b=M6InXq2F+WAIXmGq2Ajp12UOcnluwW5sBwPPP4pGNGcHCeo0Dexta7CepOHUxanjqx B86PO3RfBM3zHvmEyIpzWp+ER/+i7ru/zLslYew/NCB/2KGF2rrVgu6th/2BuEWvxQ0q ehxnVhsccKlTf/zMIEZ9GwEI4P3oljeh6Id3cr1l744dPlUIo6+SZorUq34DRGLlzmXp h/y8G2ssKLf4uUyuRzyToaR3qp+6lewsGDLvkiTeSwKMav1rzyXO70RKD1nSCVYTUMNF tOZhgtsMm/KjF2zR4Kn2mPdTVm0igq89+8d7fx28dyqZwdxEpTbce7+Ylx1H/svJK2Wd iHyw== X-Gm-Message-State: AOJu0YwXGZ8uWrEc0e8BVYVFVh+o0KLsoiZL4c1AJ6FnqVyAxIJJ+AQS IbqpydiiSD9o54i4BFfLihuR0AM2yG4S55+/kbI= X-Google-Smtp-Source: AGHT+IE6zmHvdqBp2JDoJIdVAgiRExlf1L8dee6lZXQWJtjawyE8d/FLcsxiowfisL+jLpE9mCgHl6bE0Z/OijfmEhc= X-Received: by 2002:a0d:dfd7:0:b0:583:d054:229 with SMTP id i206-20020a0ddfd7000000b00583d0540229mr9897228ywe.36.1691354201546; Sun, 06 Aug 2023 13:36:41 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::1132; envelope-from=eduardoochs@gmail.com; helo=mail-yw1-x1132.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:144653 Archived-At: On Sun, 6 Aug 2023 at 14:24, Heime 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