all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Arthur Miller <arthur.miller@live.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Stefan Monnier via Users list for the GNU Emacs text editor
	<help-gnu-emacs@gnu.org>,
	 Stefan Monnier <monnier@iro.umontreal.ca>,
	Jean Louis <bugs@gnu.support>
Subject: Re: How to get full value of variable during edebug function tracing?
Date: Sun, 19 Jun 2022 08:22:06 +0200	[thread overview]
Message-ID: <AM9PR09MB497701DF0AB16311FA85836A96B19@AM9PR09MB4977.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <871qvn3pd0.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 18 Jun 2022 00:19:07 +0200")

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Stefan Monnier via Users list for the GNU Emacs text editor
> <help-gnu-emacs@gnu.org> writes:
>
>> Personally, in similar circumstances I tend to do the following:
>>
>>     e (setq my-foo <THEVARIABLE>) RET
>>
>> and then I go to my trusty `ielm` buffer to look at `my-foo` in all
>> its glory.
>
> That's what I do, too, but it's kinda cumbersome, isn't it?  So I've now
> made `C-u e' in edebug in Emacs 29 pop up a new buffer and pretty-print
> the value.

That sounds useful. Could you pop it up in a tooltip?

What about using mouse pointer as a "secondary cursor", if we would like to see
some previous value, so we don't have to move cursor around:

(defun pointer (x y)
  (save-excursion
    (goto-char (window-start))
    (forward-line x)
    (when (> (- (line-end-position) (line-beginning-position)) y)
      (move-to-column y)
      (1- (point)))))

(defun symbol-value-under-pointer ()
  (interactive)
  (save-excursion
    (let ((pointer (mouse-position)))
    (goto-char (pointer (cddr pointer) (cadr pointer)))
    (let ((sym (intern-soft (current-word))))
      (when sym
        (message "%S: %S" sym (symbol-value sym)))))))

Could that be useful to have on a C-u C-u e?



  parent reply	other threads:[~2022-06-19  6:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-17 18:25 How to get full value of variable during edebug function tracing? Jean Louis
2022-06-17 21:34 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-06-17 22:19   ` Lars Ingebrigtsen
2022-06-18  2:36     ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-06-18  8:22     ` Jean Louis
2022-06-18 11:26       ` Lars Ingebrigtsen
2022-06-19  6:22     ` Arthur Miller [this message]
2022-06-19 11:45       ` Lars Ingebrigtsen
2022-06-20  5:35         ` Arthur Miller

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=AM9PR09MB497701DF0AB16311FA85836A96B19@AM9PR09MB4977.eurprd09.prod.outlook.com \
    --to=arthur.miller@live.com \
    --cc=bugs@gnu.support \
    --cc=help-gnu-emacs@gnu.org \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    /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.