unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Help debug an error in pre-command-hook?
@ 2012-02-09  8:33 Leo
  2012-02-09 18:25 ` martin rudalics
  2012-02-09 22:20 ` Stefan Monnier
  0 siblings, 2 replies; 4+ messages in thread
From: Leo @ 2012-02-09  8:33 UTC (permalink / raw)
  To: emacs-devel

I am seeing an error:

Error in pre-command-hook: 

(wrong-type-argument symbolp (lambda (&rest --cl-rest--) (interactive)
(apply (lambda (G91516 G91517 G91518) (setq
minor-mode-overriding-map-alist (symbol-value G91518)) (bury-buffer) (if
(and (symbol-value G91517) (not (one-window-p))) (delete-window)) (if
(window-live-p (symbol-value G91516)) (select-window (symbol-value
G91516)))) (quote --origwin--) (quote --delete-p--) (quote --old--)
--cl-rest--)))

Before the error, the value of pre-command-hook is:

   pre-command-hook is a variable defined in `C source code'.
   Its value is (t comint-preinput-scroll-to-bottom)
   
   Local in buffer *Python*; global value is 
   (delete-selection-pre-hook tooltip-hide)


But looking at the source of comint-preinput-scroll-to-bottom, I cannot
see where it can generate this error? Any idea how to debug this?

Thanks in advance.

Leo




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

* Re: Help debug an error in pre-command-hook?
  2012-02-09  8:33 Help debug an error in pre-command-hook? Leo
@ 2012-02-09 18:25 ` martin rudalics
  2012-02-09 22:20 ` Stefan Monnier
  1 sibling, 0 replies; 4+ messages in thread
From: martin rudalics @ 2012-02-09 18:25 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

 > Error in pre-command-hook:
 >
 > (wrong-type-argument symbolp (lambda (&rest --cl-rest--) (interactive)
 > (apply (lambda (G91516 G91517 G91518) (setq
 > minor-mode-overriding-map-alist (symbol-value G91518)) (bury-buffer) (if
 > (and (symbol-value G91517) (not (one-window-p))) (delete-window)) (if
 > (window-live-p (symbol-value G91516)) (select-window (symbol-value
 > G91516)))) (quote --origwin--) (quote --delete-p--) (quote --old--)
 > --cl-rest--)))
 >
 > Before the error, the value of pre-command-hook is:
 >
 >    pre-command-hook is a variable defined in `C source code'.
 >    Its value is (t comint-preinput-scroll-to-bottom)
 >
 >    Local in buffer *Python*; global value is
 >    (delete-selection-pre-hook tooltip-hide)
 >
 >
 > But looking at the source of comint-preinput-scroll-to-bottom, I cannot
 > see where it can generate this error? Any idea how to debug this?

I can neither find

(setq minor-mode-overriding-map-alist

nor

origwin

anywhere in the Emacs sources so maybe this is something from your
customizations or a package you load.  Try printing the values of
`pre-command-hook' from within `comint-preinput-scroll-to-bottom'.

martin



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

* Re: Help debug an error in pre-command-hook?
  2012-02-09  8:33 Help debug an error in pre-command-hook? Leo
  2012-02-09 18:25 ` martin rudalics
@ 2012-02-09 22:20 ` Stefan Monnier
  2012-02-13  8:08   ` Leo
  1 sibling, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2012-02-09 22:20 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

> I am seeing an error:
> Error in pre-command-hook: 

Are you using Emacs-24?  [In Emacs-24 I try to provide the faulty hook
function in the error message, which can be really helpful]

> (wrong-type-argument symbolp (lambda (&rest --cl-rest--) (interactive)
> (apply (lambda (G91516 G91517 G91518) (setq
> minor-mode-overriding-map-alist (symbol-value G91518)) (bury-buffer) (if
> (and (symbol-value G91517) (not (one-window-p))) (delete-window)) (if
> (window-live-p (symbol-value G91516)) (select-window (symbol-value
> G91516)))) (quote --origwin--) (quote --delete-p--) (quote --old--)
> --cl-rest--)))

This looks like the macroexpansion of a lexical-let closure.
I guess the code expects a function name and not a lambda expression
(e.g. `fboundp').

> Before the error, the value of pre-command-hook is:

>    pre-command-hook is a variable defined in `C source code'.
>    Its value is (t comint-preinput-scroll-to-bottom)
   
>    Local in buffer *Python*; global value is 
>    (delete-selection-pre-hook tooltip-hide)

> But looking at the source of comint-preinput-scroll-to-bottom, I cannot
> see where it can generate this error? Any idea how to debug this?

I tried to look for a package which uses both lexical-let and one of the
symbols that appear above but can't find it.  Can you reproduce it with
emacs -Q?


        Stefan



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

* Re: Help debug an error in pre-command-hook?
  2012-02-09 22:20 ` Stefan Monnier
@ 2012-02-13  8:08   ` Leo
  0 siblings, 0 replies; 4+ messages in thread
From: Leo @ 2012-02-13  8:08 UTC (permalink / raw)
  To: emacs-devel

On 2012-02-10 06:20 +0800, Stefan Monnier wrote:
> Are you using Emacs-24?  [In Emacs-24 I try to provide the faulty hook
> function in the error message, which can be really helpful]

I tracked this down. It is a 3rd party library (autopair.el) that tries
to get symbol-name of this-command which can be non-symbol.

Leo




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

end of thread, other threads:[~2012-02-13  8:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-09  8:33 Help debug an error in pre-command-hook? Leo
2012-02-09 18:25 ` martin rudalics
2012-02-09 22:20 ` Stefan Monnier
2012-02-13  8:08   ` Leo

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