all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [REQ] An instructive example of trace-function and some example of  debugging
@ 2010-06-10 20:27 bolega
  2010-06-12 17:42 ` bolega
       [not found] ` <d48c2b9e-0853-448e-9992-d71e87fcccd0@j4g2000yqh.googlegroups.com>
  0 siblings, 2 replies; 5+ messages in thread
From: bolega @ 2010-06-10 20:27 UTC (permalink / raw)
  To: help-gnu-emacs

An instructive example of trace-function and some example of
debugging, for example, some of the error that pops up in lower window
of emacs and how to read/interpret it. Alternatively, a link to some
page or elisp manual but I am sure an expert here would have a
superior instruction as many replies here have shown.

Thanks
Bolega

trace-function is an interactive autoloaded Lisp function in `trace'.
[Arg list not available until function definition is loaded.]

Traces FUNCTION with trace output going to BUFFER.
For every call of FUNCTION Lisp-style trace messages that display
argument
and return values will be inserted into BUFFER. This function
generates the
trace advice for FUNCTION and activates it together with any other
advice
there might be!! The trace BUFFER will popup whenever FUNCTION is
called.
Do not use this to trace functions that switch buffers or do any other
display oriented stuff, use `trace-function-background' instead.



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

* Re: An instructive example of trace-function and some example of  debugging
  2010-06-10 20:27 [REQ] An instructive example of trace-function and some example of debugging bolega
@ 2010-06-12 17:42 ` bolega
       [not found] ` <d48c2b9e-0853-448e-9992-d71e87fcccd0@j4g2000yqh.googlegroups.com>
  1 sibling, 0 replies; 5+ messages in thread
From: bolega @ 2010-06-12 17:42 UTC (permalink / raw)
  To: help-gnu-emacs

On Jun 10, 1:27 pm, bolega <gnuist...@gmail.com> wrote:
> An instructive example of trace-function and some example of
> debugging, for example, some of the error that pops up in lower window
> of emacs and how to read/interpret it. Alternatively, a link to some
> page or elisp manual but I am sure an expert here would have a
> superior instruction as many replies here have shown.
>
> Thanks
> Bolega
>
> trace-function is an interactive autoloaded Lisp function in `trace'.
> [Arg list not available until function definition is loaded.]
>
> Traces FUNCTION with trace output going to BUFFER.
> For every call of FUNCTION Lisp-style trace messages that display
> argument
> and return values will be inserted into BUFFER. This function
> generates the
> trace advice for FUNCTION and activates it together with any other
> advice
> there might be!! The trace BUFFER will popup whenever FUNCTION is
> called.
> Do not use this to trace functions that switch buffers or do any other
> display oriented stuff, use `trace-function-background' instead.

Sometimes, in emacs, error takes places and the mode gets nested
inside many brackets.

[(((.lisp...)))]

above line recalling from memory

what does it mean ? C-g does not get out of it.

What to do ?





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

* Re: An instructive example of trace-function and some example of  debugging
       [not found] ` <d48c2b9e-0853-448e-9992-d71e87fcccd0@j4g2000yqh.googlegroups.com>
@ 2010-06-13 15:07   ` Icarus Sparry
  2010-06-13 20:31     ` bolega
  0 siblings, 1 reply; 5+ messages in thread
From: Icarus Sparry @ 2010-06-13 15:07 UTC (permalink / raw)
  To: help-gnu-emacs

On Sat, 12 Jun 2010 10:43:46 -0700, bolega wrote:

> On Jun 10, 1:27 pm, bolega <gnuist...@gmail.com> wrote:
>> An instructive example of trace-function and some example of debugging,
>> for example, some of the error that pops up in lower window of emacs
>> and how to read/interpret it. Alternatively, a link to some page or
>> elisp manual but I am sure an expert here would have a superior
>> instruction as many replies here have shown.
>>
>> Thanks
>> Bolega
>>
>> trace-function is an interactive autoloaded Lisp function in `trace'.
>> [Arg list not available until function definition is loaded.]
>>
>> Traces FUNCTION with trace output going to BUFFER. For every call of
>> FUNCTION Lisp-style trace messages that display argument
>> and return values will be inserted into BUFFER. This function generates
>> the
>> trace advice for FUNCTION and activates it together with any other
>> advice
>> there might be!! The trace BUFFER will popup whenever FUNCTION is
>> called.
>> Do not use this to trace functions that switch buffers or do any other
>> display oriented stuff, use `trace-function-background' instead.
> 
> let me widen the newsgroups as there was no reply to this one in the
> first one.
> 
> Sometimes, in emacs, error takes places and the mode gets nested inside
> many brackets.
> 
> [(((.lisp...)))]
> 
> above line recalling from memory
> 
> what does it mean ? C-g does not get out of it.
> 
> What to do ?

If you are seeing [[[lisp]]] then you are in a "recursive edit".

This is not an error, it is a feature! The most common way to get into it 
is if you are doing a query-replace (M-% with standard bindings), and 
type control-r. This allows you to make some edits and then continue the 
query-replace.

The standard key binding to abort out of recursive edit is C-] (the [..] 
in the mode line is supposed to help you remember this key sequence).



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

* Re: An instructive example of trace-function and some example of  debugging
  2010-06-13 15:07   ` Icarus Sparry
@ 2010-06-13 20:31     ` bolega
  2010-06-14  7:14       ` Icarus Sparry
  0 siblings, 1 reply; 5+ messages in thread
From: bolega @ 2010-06-13 20:31 UTC (permalink / raw)
  To: help-gnu-emacs

On Jun 13, 8:07 am, Icarus Sparry <use...@icarus.freeuk.com> wrote:
> On Sat, 12 Jun 2010 10:43:46 -0700, bolega wrote:
> > On Jun 10, 1:27 pm, bolega <gnuist...@gmail.com> wrote:
> >> An instructive example of trace-function and some example of debugging,
> >> for example, some of the error that pops up in lower window of emacs
> >> and how to read/interpret it. Alternatively, a link to some page or
> >> elisp manual but I am sure an expert here would have a superior
> >> instruction as many replies here have shown.
>
> >> Thanks
> >> Bolega
>
> >> trace-function is an interactive autoloaded Lisp function in `trace'.
> >> [Arg list not available until function definition is loaded.]
>
> >> Traces FUNCTION with trace output going to BUFFER. For every call of
> >> FUNCTION Lisp-style trace messages that display argument
> >> and return values will be inserted into BUFFER. This function generates
> >> the
> >> trace advice for FUNCTION and activates it together with any other
> >> advice
> >> there might be!! The trace BUFFER will popup whenever FUNCTION is
> >> called.
> >> Do not use this to trace functions that switch buffers or do any other
> >> display oriented stuff, use `trace-function-background' instead.
>
> > let me widen the newsgroups as there was no reply to this one in the
> > first one.
>
> > Sometimes, in emacs, error takes places and the mode gets nested inside
> > many brackets.
>
> > [(((.lisp...)))]
>
> > above line recalling from memory
>
> > what does it mean ? C-g does not get out of it.
>
> > What to do ?
>
> If you are seeing [[[lisp]]] then you are in a "recursive edit".
>
> This is not an error, it is a feature! The most common way to get into it
> is if you are doing a query-replace (M-% with standard bindings), and
> type control-r. This allows you to make some edits and then continue the
> query-replace.
>
> The standard key binding to abort out of recursive edit is C-] (the [..]
> in the mode line is supposed to help you remember this key sequence).

thx. I searched google ,

http://groups.google.com/group/gnu.emacs.help/search?num=100&group=gnu.emacs.help&q=recursive+edit&qt_g=Search+this+group

but found very sketchy info on how to utilize this FEATURE. Just one
seemed helpful,

http://groups.google.com/group/gnu.emacs.help/browse_thread/thread/8dc303a526356794/96c264702c0a4443?lnk=gst&q=recursive+edit#96c264702c0a4443

otherwise people were complaining how to get out of this strangeness,
even a "high IQ" guy from some big name company.

Can anyone add useful ideas how to get out of it incrementally and
really get benefit from it. Is there somewhere a more complete info on
it ?


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

* Re: An instructive example of trace-function and some example of  debugging
  2010-06-13 20:31     ` bolega
@ 2010-06-14  7:14       ` Icarus Sparry
  0 siblings, 0 replies; 5+ messages in thread
From: Icarus Sparry @ 2010-06-14  7:14 UTC (permalink / raw)
  To: help-gnu-emacs

On Sun, 13 Jun 2010 13:31:32 -0700, bolega wrote:

> On Jun 13, 8:07 am, Icarus Sparry <use...@icarus.freeuk.com> wrote:
>> On Sat, 12 Jun 2010 10:43:46 -0700, bolega wrote:
>> > On Jun 10, 1:27 pm, bolega <gnuist...@gmail.com> wrote:
[snip]
>> > Sometimes, in emacs, error takes places and the mode gets nested
>> > inside many brackets.
>>
>> > [(((.lisp...)))]
>>
>> > above line recalling from memory
>>
>> > what does it mean ? C-g does not get out of it.

>> If you are seeing [[[lisp]]] then you are in a "recursive edit".
>>
>> This is not an error, it is a feature! The most common way to get into
>> it is if you are doing a query-replace (M-% with standard bindings),
>> and type control-r. This allows you to make some edits and then
>> continue the query-replace.
>>
>> The standard key binding to abort out of recursive edit is C-] (the
>> [..] in the mode line is supposed to help you remember this key
>> sequence).
> 
> thx. I searched google ,
> 
> http://groups.google.com/group/gnu.emacs.help/search?
num=100&group=gnu.emacs.help&q=recursive+edit&qt_g=Search+this+group
> 
> but found very sketchy info on how to utilize this FEATURE. Just one
> seemed helpful,
> 
> http://groups.google.com/group/gnu.emacs.help/browse_thread/
thread/8dc303a526356794/96c264702c0a4443?lnk=gst&q=recursive
+edit#96c264702c0a4443
> 
> otherwise people were complaining how to get out of this strangeness,
> even a "high IQ" guy from some big name company.
> 
> Can anyone add useful ideas how to get out of it incrementally and
> really get benefit from it. Is there somewhere a more complete info on
> it ?

As I said, the most common way I use it is when I am doing a query-
replace (or query-replace-regex) and I am stepping through the buffer 
typing space or n to make a change or not. If I notice something that 
needs fixing, then I can type control-r and this suspends the query-
replace and lets me do whatever it takes to fix the problem. Once I have 
done this then I type C-M-c to resume the query-replace.

The emacs info has a section on it.

This also states that if you enter the emacs debugger then this also can 
start a recursive edit, and you can use 'c' to continue from the debugger 
window. There are several ways in which you can enter the debugger, in 
particular evaluating the form

   (debug a)

will print the value of a to the backtrace buffer and enter the debugger.


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

end of thread, other threads:[~2010-06-14  7:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-10 20:27 [REQ] An instructive example of trace-function and some example of debugging bolega
2010-06-12 17:42 ` bolega
     [not found] ` <d48c2b9e-0853-448e-9992-d71e87fcccd0@j4g2000yqh.googlegroups.com>
2010-06-13 15:07   ` Icarus Sparry
2010-06-13 20:31     ` bolega
2010-06-14  7:14       ` Icarus Sparry

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.