unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* debug-on-call
@ 2003-01-31 19:03 Dan Jacobson
  0 siblings, 0 replies; 9+ messages in thread
From: Dan Jacobson @ 2003-01-31 19:03 UTC (permalink / raw)


I wanted to have emacs stop if it ever called a function, but no:
debug-on-entry: Function base64-encode-region is a primitive

I don't need to debug inside that function. All I wanted was to see a
backtrace so I can tell the layers of stuff calling that function.

So provide a debug-on-call.

And, inside the Emacs Info manual, all we can find about debugging is
about debugging non emacs lisp.  If we want to learn about the emacs
debugger then we have to know to leave the emacs manual and search in
a neighboring manual not mentioned via any searching in the emacs
manual.

BTW
debug-on-entry-1: gnus-uu-post-news not user-defined Lisp function
same deal. not too many things i can debug these days. i know. no more
debugging for me. i will post my problems instead.
-- 
http://jidanni.org/ Taiwan(04)25854780

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

* Re: debug-on-call
       [not found] <mailman.1280.1044050572.21513.bug-gnu-emacs@gnu.org>
@ 2003-02-03 16:52 ` Kevin Rodgers
  2003-02-04  1:11   ` debug-on-call Dan Jacobson
                     ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Kevin Rodgers @ 2003-02-03 16:52 UTC (permalink / raw)


Dan Jacobson wrote:

> I wanted to have emacs stop if it ever called a function, but no:
> debug-on-entry: Function base64-encode-region is a primitive
> 
> I don't need to debug inside that function. All I wanted was to see a
> backtrace so I can tell the layers of stuff calling that function.

(defadvice base64-encode-region (before debug activate)
   "Debug (when called from an Emacs Lisp function)."
   (debug))

-- 
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>

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

* Re: debug-on-call
  2003-02-03 16:52 ` debug-on-call Kevin Rodgers
@ 2003-02-04  1:11   ` Dan Jacobson
  2003-02-18 18:15     ` debug-on-call Kevin Rodgers
  2003-02-04 15:42   ` debug-on-call Richard Stallman
       [not found]   ` <mailman.1383.1044374904.21513.bug-gnu-emacs@gnu.org>
  2 siblings, 1 reply; 9+ messages in thread
From: Dan Jacobson @ 2003-02-04  1:11 UTC (permalink / raw)


>>>>> "K" == Kevin Rodgers <kevin.rodgers@ihs.com> writes:

K> Dan Jacobson wrote:
>> I wanted to have emacs stop if it ever called a function, but no:
>> debug-on-entry: Function base64-encode-region is a primitive
>> 
>> I don't need to debug inside that function. All I wanted was to see a
>> backtrace so I can tell the layers of stuff calling that function.

K> (defadvice base64-encode-region (before debug activate)
K>    "Debug (when called from an Emacs Lisp function)."
K>    (debug))

OK, maybe this could be the guts of the new debug-on-call function, or
at least documented as what to do when debug-on-entry isn't usable...
Of course an antidote should also be provided to turn it off.

P.S. Kev, your References:
<mailman.1280.1044050572.21513.bug-gnu-emacs@gnu.org> does not give my
original post the fame and glory of its original Message-ID causing
its thread to be broken 'in many newsreaders'.  Did you try reading
this group via NNTP of gmane.org for maximal comfort?
-- 
http://jidanni.org/ Taiwan(04)25854780

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

* Re: debug-on-call
  2003-02-03 16:52 ` debug-on-call Kevin Rodgers
  2003-02-04  1:11   ` debug-on-call Dan Jacobson
@ 2003-02-04 15:42   ` Richard Stallman
       [not found]   ` <mailman.1383.1044374904.21513.bug-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 9+ messages in thread
From: Richard Stallman @ 2003-02-04 15:42 UTC (permalink / raw)
  Cc: gnu-emacs-bug

    > I wanted to have emacs stop if it ever called a function, but no:
    > debug-on-entry: Function base64-encode-region is a primitive

It worked for me when I tried it.

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

* Re: debug-on-call
       [not found]   ` <mailman.1383.1044374904.21513.bug-gnu-emacs@gnu.org>
@ 2003-02-13 19:25     ` Alexander Pohoyda
  0 siblings, 0 replies; 9+ messages in thread
From: Alexander Pohoyda @ 2003-02-13 19:25 UTC (permalink / raw)


>     > I wanted to have emacs stop if it ever called a function, but no:
>     > debug-on-entry: Function base64-encode-region is a primitive
> It worked for me when I tried it.

Worked for me as well.


-- 
Alexander Pohoyda
<alexander.pohoyda@gmx.net>

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

* Re: debug-on-call
  2003-02-04  1:11   ` debug-on-call Dan Jacobson
@ 2003-02-18 18:15     ` Kevin Rodgers
  2003-02-19  2:48       ` message id got changed by mailman? Dan Jacobson
  0 siblings, 1 reply; 9+ messages in thread
From: Kevin Rodgers @ 2003-02-18 18:15 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1883 bytes --]

Dan Jacobson wrote:

>>>>>>"K" == Kevin Rodgers <kevin.rodgers@ihs.com> writes:
>>>>>>
> 
> K> Dan Jacobson wrote:
> 
>>>I wanted to have emacs stop if it ever called a function, but no:
>>>debug-on-entry: Function base64-encode-region is a primitive
>>>
>>>I don't need to debug inside that function. All I wanted was to see a
>>>backtrace so I can tell the layers of stuff calling that function.
>>>
> 
> K> (defadvice base64-encode-region (before debug activate)
> K>    "Debug (when called from an Emacs Lisp function)."
> K>    (debug))
> 
> OK, maybe this could be the guts of the new debug-on-call function, or
> at least documented as what to do when debug-on-entry isn't usable...


Please find attached a tentative user (i.e. non-integrated) implementation.

> Of course an antidote should also be provided to turn it off.


Yep, but I haven't gotten that far yet.


> P.S. Kev, your References:
> <mailman.1280.1044050572.21513.bug-gnu-emacs@gnu.org> does not give my
> original post the fame and glory of its original Message-ID causing
> its thread to be broken 'in many newsreaders'.


That's odd, google finds it under that Message-ID.  I used

	http://www.google.com/advanced_group_search?hl=en

to find

	From: Dan Jacobson <jidanni@dman.ddts.net>
	Newsgroups: gnu.emacs.bug
	Subject: debug-on-call
	Date: 01 Feb 2003 03:03:22 +0800
	Lines: 23
	Sender: news <news@main.gmane.org>
	Approved: bug-gnu-emacs@gnu.org
	Message-ID: <mailman.1280.1044050572.21513.bug-gnu-emacs@gnu.org>
	Reply-To: Dan Jacobson <jidanni@dman.ddts.net>
	NNTP-Posting-Host: monty-python.gnu.org

> Did you try reading
> this group via NNTP of gmane.org for maximal comfort?
 
I primarily read gnu.emacs.bug and only check gmane.emacs.bug (both via

NNTPSERVER=news.cis.dfn.de) to make sure I don't miss any articles.


-- 
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>

[-- Attachment #2: debug-primitive-on-entry.el --]
[-- Type: text/plain, Size: 777 bytes --]

(defadvice debug-on-entry (around advise-primitive activate)
  "If an error is signalled because FUNCTION is a primitive, query the user
whether to debug Lisp calls via `defadvice'."
  (condition-case condition-data
      ad-do-it
    (error (let ((error-message (format "Function %s is a primitive"
					(ad-get-arg 0))))
	     (if (and (equal (car (cdr condition-data)) error-message)
		      (interactive-p)
		      (yes-or-no-p
		       (concat error-message
			       "; debug Lisp calls via defadvice? ")))
		 (eval `(defadvice ,(ad-get-arg 0) (before debug activate)
			  "Debug (when called from an Emacs Lisp function)."
			  (debug)))
	       (signal 'error (cdr condition-data)))))))

;; (defadvice cancel-debug-on-entry (around advise-primitive activate)
;;   ...)

[-- Attachment #3: Type: text/plain, Size: 148 bytes --]

_______________________________________________
Bug-gnu-emacs mailing list
Bug-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs

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

* message id got changed by mailman?
  2003-02-18 18:15     ` debug-on-call Kevin Rodgers
@ 2003-02-19  2:48       ` Dan Jacobson
  2003-02-19 22:09         ` Kevin Rodgers
  0 siblings, 1 reply; 9+ messages in thread
From: Dan Jacobson @ 2003-02-19  2:48 UTC (permalink / raw)


>> P.S. Kev, your References:
>> <mailman.1280.1044050572.21513.bug-gnu-emacs@gnu.org> does not give my
>> original post the fame and glory of its original Message-ID

K> That's odd, google finds it under that Message-ID.  I used

K> 	http://www.google.com/advanced_group_search?hl=en

K> to find

K> 	From: Dan Jacobson <jidanni@dman.ddts.net>
K> 	Newsgroups: gnu.emacs.bug
K> 	Subject: debug-on-call
K> 	Date: 01 Feb 2003 03:03:22 +0800
K> 	Lines: 23
K> 	Sender: news <news@main.gmane.org>
K> 	Approved: bug-gnu-emacs@gnu.org
K> 	Message-ID: <mailman.1280.1044050572.21513.bug-gnu-emacs@gnu.org>
K> 	Reply-To: Dan Jacobson <jidanni@dman.ddts.net>
K> 	NNTP-Posting-Host: monty-python.gnu.org

hhmm, well, reading from gmane.org for the past week shows everybody's
message i.d. coming from their original computers and not any gnu.org,
so maybe it is fixed by now. The message id of this message is
<874r7156js.fsf_-_@jidanni.org> if that's not what you see, say so and
i'll complain to sysadmin@gnu.org

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

* Re: message id got changed by mailman?
  2003-02-19  2:48       ` message id got changed by mailman? Dan Jacobson
@ 2003-02-19 22:09         ` Kevin Rodgers
  2003-02-22  1:24           ` Dan Jacobson
  0 siblings, 1 reply; 9+ messages in thread
From: Kevin Rodgers @ 2003-02-19 22:09 UTC (permalink / raw)


Dan Jacobson wrote:

> hhmm, well, reading from gmane.org for the past week shows everybody's
> message i.d. coming from their original computers and not any gnu.org,
> so maybe it is fixed by now. The message id of this message is
> <874r7156js.fsf_-_@jidanni.org> if that's not what you see, say so and
> i'll complain to sysadmin@gnu.org

Interesting.  Your message in the gmane.emacs.bug newsgroup (which I read from

news.gmane.org) has that message id.  But in gnu.emacs.bug (read from
news.cis.dfn.de) has this message id:

	mailman.2116.1045629695.21513.bug-gnu-emacs@gnu.org

-- 
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>

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

* Re: message id got changed by mailman?
  2003-02-19 22:09         ` Kevin Rodgers
@ 2003-02-22  1:24           ` Dan Jacobson
  0 siblings, 0 replies; 9+ messages in thread
From: Dan Jacobson @ 2003-02-22  1:24 UTC (permalink / raw)
  Cc: sysadmin

K> Interesting.  Your message in the gmane.emacs.bug newsgroup (which
K> I read from news.gmane.org) has that [jidanni.org] message id.  But
K> in gnu.emacs.bug (read from news.cis.dfn.de) has this message id:

K> 	mailman.2116.1045629695.21513.bug-gnu-emacs@gnu.org

then the bug-gnu-emacs@gnu.org mail-to-news link is changing
message-ID in violation of all RFCs. I will CC sysadmin@gnu.org.
-- 
http://jidanni.org/ Taiwan(04)25854780

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

end of thread, other threads:[~2003-02-22  1:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.1280.1044050572.21513.bug-gnu-emacs@gnu.org>
2003-02-03 16:52 ` debug-on-call Kevin Rodgers
2003-02-04  1:11   ` debug-on-call Dan Jacobson
2003-02-18 18:15     ` debug-on-call Kevin Rodgers
2003-02-19  2:48       ` message id got changed by mailman? Dan Jacobson
2003-02-19 22:09         ` Kevin Rodgers
2003-02-22  1:24           ` Dan Jacobson
2003-02-04 15:42   ` debug-on-call Richard Stallman
     [not found]   ` <mailman.1383.1044374904.21513.bug-gnu-emacs@gnu.org>
2003-02-13 19:25     ` debug-on-call Alexander Pohoyda
2003-01-31 19:03 debug-on-call Dan Jacobson

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).