* Backtrace mode
@ 2018-07-27 20:13 Gemini Lasswell
2018-07-27 20:36 ` John Wiegley
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Gemini Lasswell @ 2018-07-27 20:13 UTC (permalink / raw)
To: Emacs Development
Hi All,
I've finished everything I set out to add to Backtrace mode, and have
pushed it to scratch/backtrace-mode. Documentation, NEWS and tests are
all done, so please have a look at it and let me know if you find
anything that should be fixed before I merge it.
Notable changes:
- It's now possible to toggle both local variable display and printing
with 'print-circle' for the entire buffer instead of just the current
frame, using the C-u prefix with 'v' and '#' respectively.
- C functions in backtraces now get links to their source code. Links
are also created for the reading position of 'eval-buffer' and
'eval-region'.
- I've added a new function 'cl-print-to-string-with-limit' to
cl-print.el, which tries to get a printed representation to fit in a
specified number of characters using 'print-length' and 'print-level'.
Backtrace mode is using it and I plan to use it for results printing
in Edebug, the Lisp Debugger and ERT, hopefully putting an end to
performance problems caused by excessively long lines in those modes.
- You can now expand all the '...'s in a backtrace frame at once using
backtrace-expand-ellipses, bound to '.' and with the C-u prefix expand
them without putting a limit on the expansion.
- In Edebug backtraces, three new commands are available.
backtrace-goto-source, bound to 's', works on frames in
Edebug-instrumented code, which are marked with a '>' on the left side.
I've also added edebug-backtrace-show-instrumentation and
edebug-backtrace-hide-instrumentation, to show and hide Edebug's
functions in the backtrace.
- The function 'backtrace' now uses Backtrace mode's printing and is now
located in backtrace.el instead of subr.el. The functions
'backtrace-frame' and 'backtrace-frames' remain in subr.el so that
Backtrace mode doesn't have to be loaded for programmatic access to the
backtrace from Lisp.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Backtrace mode
2018-07-27 20:13 Backtrace mode Gemini Lasswell
@ 2018-07-27 20:36 ` John Wiegley
2018-07-28 16:28 ` Eli Zaretskii
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: John Wiegley @ 2018-07-27 20:36 UTC (permalink / raw)
To: Gemini Lasswell; +Cc: Emacs Development
>>>>> "GL" == Gemini Lasswell <gazally@runbox.com> writes:
GL> I've finished everything I set out to add to Backtrace mode, and have
GL> pushed it to scratch/backtrace-mode. Documentation, NEWS and tests are all
GL> done, so please have a look at it and let me know if you find anything
GL> that should be fixed before I merge it.
Sounds useful!
--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Backtrace mode
2018-07-27 20:13 Backtrace mode Gemini Lasswell
2018-07-27 20:36 ` John Wiegley
@ 2018-07-28 16:28 ` Eli Zaretskii
2018-08-01 15:22 ` Gemini Lasswell
2018-08-01 20:58 ` Clément Pit-Claudel
2018-08-01 21:07 ` Clément Pit-Claudel
3 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2018-07-28 16:28 UTC (permalink / raw)
To: Gemini Lasswell; +Cc: emacs-devel
> From: Gemini Lasswell <gazally@runbox.com>
> Date: Fri, 27 Jul 2018 13:13:30 -0700
>
> I've finished everything I set out to add to Backtrace mode, and have
> pushed it to scratch/backtrace-mode. Documentation, NEWS and tests are
> all done, so please have a look at it and let me know if you find
> anything that should be fixed before I merge it.
Thanks. A few minor nits regarding documentation:
. The first line of each NEWS entry should ideally be a single
sentence; all the following sentences should begin on the second
line.
. Leave 2 spaces between sentences.
. The closing brace of a cross-reference should be followed by a
period or a comma.
. The last (5th) argument of a cross-reference should be the official
title of the manual to which you point, as stated in the title
page.
. When making cross-references to the current file, there's no need
to specify that file's name by using the 4-argument cross-reference
form.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Backtrace mode
2018-07-28 16:28 ` Eli Zaretskii
@ 2018-08-01 15:22 ` Gemini Lasswell
0 siblings, 0 replies; 9+ messages in thread
From: Gemini Lasswell @ 2018-08-01 15:22 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
> Thanks. A few minor nits regarding documentation:
Thanks for the feedback. I've taken care of the nits,
and I'll merge the branch in a day or two.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Backtrace mode
2018-07-27 20:13 Backtrace mode Gemini Lasswell
2018-07-27 20:36 ` John Wiegley
2018-07-28 16:28 ` Eli Zaretskii
@ 2018-08-01 20:58 ` Clément Pit-Claudel
2018-08-03 15:48 ` Gemini Lasswell
2018-08-01 21:07 ` Clément Pit-Claudel
3 siblings, 1 reply; 9+ messages in thread
From: Clément Pit-Claudel @ 2018-08-01 20:58 UTC (permalink / raw)
To: emacs-devel
Hi Gemini,
I just gave the new code a try. This is really neat! Thanks a lot :)
Did you consider using V instead of C-u v to toggle all locals?
Clément.
On 2018-07-27 16:13, Gemini Lasswell wrote:
> Hi All,
>
> I've finished everything I set out to add to Backtrace mode, and have
> pushed it to scratch/backtrace-mode. Documentation, NEWS and tests are
> all done, so please have a look at it and let me know if you find
> anything that should be fixed before I merge it.
>
> Notable changes:
>
> - It's now possible to toggle both local variable display and printing
> with 'print-circle' for the entire buffer instead of just the current
> frame, using the C-u prefix with 'v' and '#' respectively.
>
> - C functions in backtraces now get links to their source code. Links
> are also created for the reading position of 'eval-buffer' and
> 'eval-region'.
>
> - I've added a new function 'cl-print-to-string-with-limit' to
> cl-print.el, which tries to get a printed representation to fit in a
> specified number of characters using 'print-length' and 'print-level'.
> Backtrace mode is using it and I plan to use it for results printing
> in Edebug, the Lisp Debugger and ERT, hopefully putting an end to
> performance problems caused by excessively long lines in those modes.
>
> - You can now expand all the '...'s in a backtrace frame at once using
> backtrace-expand-ellipses, bound to '.' and with the C-u prefix expand
> them without putting a limit on the expansion.
>
> - In Edebug backtraces, three new commands are available.
> backtrace-goto-source, bound to 's', works on frames in
> Edebug-instrumented code, which are marked with a '>' on the left side.
> I've also added edebug-backtrace-show-instrumentation and
> edebug-backtrace-hide-instrumentation, to show and hide Edebug's
> functions in the backtrace.
>
> - The function 'backtrace' now uses Backtrace mode's printing and is now
> located in backtrace.el instead of subr.el. The functions
> 'backtrace-frame' and 'backtrace-frames' remain in subr.el so that
> Backtrace mode doesn't have to be loaded for programmatic access to the
> backtrace from Lisp.
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Backtrace mode
2018-07-27 20:13 Backtrace mode Gemini Lasswell
` (2 preceding siblings ...)
2018-08-01 20:58 ` Clément Pit-Claudel
@ 2018-08-01 21:07 ` Clément Pit-Claudel
2018-08-03 17:14 ` Gemini Lasswell
3 siblings, 1 reply; 9+ messages in thread
From: Clément Pit-Claudel @ 2018-08-01 21:07 UTC (permalink / raw)
To: emacs-devel
On 2018-07-27 16:13, Gemini Lasswell wrote:
> - C functions in backtraces now get links to their source code. Links
> are also created for the reading position of 'eval-buffer' and
> 'eval-region'.
A small potential bug: if I install ido-completin-read+ emacs -Q, then running M-: (debug) produces a backtrace in which call-interactively isn't highlighted:
- Without ido-cr+ (all lines have a hyperlink to their sources):
Debugger entered: nil
eval((debug) nil)
eval-expression((debug) nil nil 127)
funcall-interactively(eval-expression (debug) nil nil 127)
call-interactively(eval-expression nil nil)
command-execute(eval-expression)
- With ido-cr+ (lines marked with ‘!’ don't have hyperlinks):
Debugger entered: nil
eval((debug) nil)
eval-expression((debug) nil nil 127)
funcall-interactively(eval-expression (debug) nil nil 127)
! #<subr call-interactively>(eval-expression nil nil)
apply(#<subr call-interactively> eval-expression (nil nil))
call-interactively@ido-cr+-record-current-command(#<subr call-interactively> eval-expression nil nil)
apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (eval-expression nil nil))
! call-interactively(eval-expression nil nil)
command-execute(eval-expression)
I imagine this is due to advice?
:around advice: ‘call-interactively@ido-cr+-record-current-command’
Cheers,
Clément.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Backtrace mode
2018-08-01 20:58 ` Clément Pit-Claudel
@ 2018-08-03 15:48 ` Gemini Lasswell
0 siblings, 0 replies; 9+ messages in thread
From: Gemini Lasswell @ 2018-08-03 15:48 UTC (permalink / raw)
To: Clément Pit-Claudel; +Cc: emacs-devel
Clément Pit-Claudel <cpitclaudel@gmail.com> writes:
> I just gave the new code a try. This is really neat! Thanks a lot :)
> Did you consider using V instead of C-u v to toggle all locals?
Hi Clément,
Glad you like it! No, it didn't occur to me to use V. But there's also
backtrace-toggle-print-circle which is currently also using C-u to make
it work on the whole buffer, and which would need a different binding if
the idea is for the shift key to mean do the whole buffer.
I bound backtrace-toggle-print-circle to # because p is used by
backtrace-backward-frame and c by debugger-continue. The number of #'s
in the printed representations of circular objects changes with the
value of print-circle, so I thought it would be mneumonic.
Gemini
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Backtrace mode
2018-08-01 21:07 ` Clément Pit-Claudel
@ 2018-08-03 17:14 ` Gemini Lasswell
2018-08-03 18:03 ` Clément Pit-Claudel
0 siblings, 1 reply; 9+ messages in thread
From: Gemini Lasswell @ 2018-08-03 17:14 UTC (permalink / raw)
To: Clément Pit-Claudel; +Cc: emacs-devel
Clément Pit-Claudel <cpitclaudel@gmail.com> writes:
> A small potential bug: if I install ido-completin-read+ emacs -Q, then running M-: (debug) produces a backtrace in which call-interactively isn't highlighted:
>
> I imagine this is due to advice?
Thanks for the bug report, and the correct diagnosis. I'll see what I can do about it.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Backtrace mode
2018-08-03 17:14 ` Gemini Lasswell
@ 2018-08-03 18:03 ` Clément Pit-Claudel
0 siblings, 0 replies; 9+ messages in thread
From: Clément Pit-Claudel @ 2018-08-03 18:03 UTC (permalink / raw)
To: Gemini Lasswell; +Cc: emacs-devel
On 2018-08-03 13:14, Gemini Lasswell wrote:
> Clément Pit-Claudel <cpitclaudel@gmail.com> writes:
>
>> A small potential bug: if I install ido-completin-read+ emacs -Q, then running M-: (debug) produces a backtrace in which call-interactively isn't highlighted:
>>
>> I imagine this is due to advice?
>
> Thanks for the bug report, and the correct diagnosis. I'll see what I can do about it.
Thanks for the cool improvements :)
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-08-03 18:03 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-27 20:13 Backtrace mode Gemini Lasswell
2018-07-27 20:36 ` John Wiegley
2018-07-28 16:28 ` Eli Zaretskii
2018-08-01 15:22 ` Gemini Lasswell
2018-08-01 20:58 ` Clément Pit-Claudel
2018-08-03 15:48 ` Gemini Lasswell
2018-08-01 21:07 ` Clément Pit-Claudel
2018-08-03 17:14 ` Gemini Lasswell
2018-08-03 18:03 ` Clément Pit-Claudel
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.