[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to get full value of variable during edebug function tracing?
From: |
Arthur Miller |
Subject: |
Re: How to get full value of variable during edebug function tracing? |
Date: |
Sun, 19 Jun 2022 08:22:06 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
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?