all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to get full value of variable during edebug function tracing?
@ 2022-06-17 18:25 Jean Louis
  2022-06-17 21:34 ` Stefan Monnier via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 9+ messages in thread
From: Jean Louis @ 2022-06-17 18:25 UTC (permalink / raw)
  To: Help GNU Emacs

How to get full value of variable during edebug function tracing?

I need to see full large value, not just the first few chars.

Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: How to get full value of variable during edebug function tracing?
  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
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2022-06-17 21:34 UTC (permalink / raw)
  To: help-gnu-emacs

Jean Louis [2022-06-17 21:25:19] wrote:
> How to get full value of variable during edebug function tracing?

You can try to use the `inspect` package newly added to GNU ELPA.
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.


        Stefan




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: How to get full value of variable during edebug function tracing?
  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
                       ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-17 22:19 UTC (permalink / raw)
  To: Stefan Monnier via Users list for the GNU Emacs text editor
  Cc: Stefan Monnier, Jean Louis

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.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: How to get full value of variable during edebug function tracing?
  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-19  6:22     ` Arthur Miller
  2 siblings, 0 replies; 9+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2022-06-18  2:36 UTC (permalink / raw)
  To: help-gnu-emacs

Lars Ingebrigtsen [2022-06-18 00:19:07] wrote:
> 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?

Not really, because most of the time I don't just want to see the full
value but I want to actually use it, passing it to functions,
etc... which is a lot more convenient to do in IELM than in Edebug.


        Stefan




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: How to get full value of variable during edebug function tracing?
  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
  2 siblings, 1 reply; 9+ messages in thread
From: Jean Louis @ 2022-06-18  8:22 UTC (permalink / raw)
  To: Lars Ingebrigtsen
  Cc: Stefan Monnier via Users list for the GNU Emacs text editor,
	Stefan Monnier, Jean Louis

* Lars Ingebrigtsen <larsi@gnus.org> [2022-06-18 08:42]:
> 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.

Thank you, that is good solution in sight. I have tried it.

I was always using C-x C-e to evaluate last expression, why not
include that also with C-u, becase that one automatically knows what
to evaluate.

While when I press only "e" I get the prompt "Edebug eval: " and then
I need to enter name of variable making it more work than C-x C-e



-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: How to get full value of variable during edebug function tracing?
  2022-06-18  8:22     ` Jean Louis
@ 2022-06-18 11:26       ` Lars Ingebrigtsen
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-18 11:26 UTC (permalink / raw)
  To: Jean Louis
  Cc: Stefan Monnier via Users list for the GNU Emacs text editor,
	Stefan Monnier

Jean Louis <bugs@gnu.support> writes:

> I was always using C-x C-e to evaluate last expression, why not
> include that also with C-u, becase that one automatically knows what
> to evaluate.

Hm...  Yes, `M-0 C-x C-e' maps to NO-TRUNCATE, but I guess we could have
`C-u C-x C-e' map to PP.

Now fixed in Emacs 29.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: How to get full value of variable during edebug function tracing?
  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-19  6:22     ` Arthur Miller
  2022-06-19 11:45       ` Lars Ingebrigtsen
  2 siblings, 1 reply; 9+ messages in thread
From: Arthur Miller @ 2022-06-19  6:22 UTC (permalink / raw)
  To: Lars Ingebrigtsen
  Cc: Stefan Monnier via Users list for the GNU Emacs text editor,
	Stefan Monnier, Jean Louis

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?



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: How to get full value of variable during edebug function tracing?
  2022-06-19  6:22     ` Arthur Miller
@ 2022-06-19 11:45       ` Lars Ingebrigtsen
  2022-06-20  5:35         ` Arthur Miller
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-19 11:45 UTC (permalink / raw)
  To: Arthur Miller
  Cc: Stefan Monnier via Users list for the GNU Emacs text editor,
	Stefan Monnier, Jean Louis

Arthur Miller <arthur.miller@live.com> writes:

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

The main point of this is to allow the user to interact with the value,
which a tooltip doesn't help with.

> 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:

[...]

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

It sounds like a quite specialised use case.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: How to get full value of variable during edebug function tracing?
  2022-06-19 11:45       ` Lars Ingebrigtsen
@ 2022-06-20  5:35         ` Arthur Miller
  0 siblings, 0 replies; 9+ messages in thread
From: Arthur Miller @ 2022-06-20  5:35 UTC (permalink / raw)
  To: Lars Ingebrigtsen
  Cc: Stefan Monnier via Users list for the GNU Emacs text editor,
	Stefan Monnier, Jean Louis

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Arthur Miller <arthur.miller@live.com> writes:
>
>> That sounds useful. Could you pop it up in a tooltip?
>
> The main point of this is to allow the user to interact with the value,
> which a tooltip doesn't help with.

One does not exclude the other?

Anyway, I just replied on what you wrote:

> 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.

If you just pretty print it in a separate buffer, it is almost as good as in a
tooltip, but can be a bit distracting depending on how Emacs chose to split
buffer. Didn't have time to build and test your code, my build is like two weeks
old or so.

>> 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:
>
> [...]
>
>> Could that be useful to have on a C-u C-u e?
>
> It sounds like a quite specialised use case.

Examining the value of a variable while debugging?

For me it is a normal thing. I press 'e' and then type the name of a variable,
or I sometimes move curser at the end of var/expression and press C-x C-e. Would
be nice if edebug instrumented code with help-echo to display values, or even
the doc together with the value, similar as in help buffer but in a
tooltip. That way we could just move the pointer over symbols and quickly see
values/docs, instead of pressing e and typing.



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-06-20  5:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2022-06-19 11:45       ` Lars Ingebrigtsen
2022-06-20  5:35         ` Arthur Miller

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.