Subject: Re: bug#12704: 24.2.50; QuitError during redisplay: (eval (\` ((-3 (\, (propertize "%p" ...

From: Eli Zaretskii <[email-masked]>
Date: Mon, 22 Oct 2012 22:13:14 +0200

> From: "Drew Adams" <[email-masked]>
> Cc: <[email-masked]>
> Date: Mon, 22 Oct 2012 10:56:59 -0700
> 
> > Can you try guessing which part of the expression could have barfed?
> 
> No.  This is the expression that was passed to `eval', and it is eval'd all of
> the time during redisplay, with no problem:
> 
> `((-3 ,(propertize
>         "%p" 'local-map mode-line-column-line-number-mode-map
>         'mouse-face 'mode-line-highlight
>         'help-echo "Buffer position, mouse-1: Line/col menu"))
>   (size-indication-mode
>    (8 ,(propertize
>         (if (and transient-mark-mode mark-active)
>             (apply #'format (mapcar #'eval mode linepos-style))
>           " of %I") 'face (and transient-mark-mode mark-active
>           'modelinepos-region)
>         'local-map mode-line-column-line-number-mode-map
>         'mouse-face 'mode-line-highlight
>         'help-echo "Buffer position, mouse-1: Line/col menu")))
>   (line-number-mode
>    ((column-number-mode
>      (10 ,(propertize
>            " (%l,%c)"
>            'face (and (> (current-column)
>                          modelinepos-column-limit)
>                       modelinepos-column-warning)
>            'local-map mode-line-column-line-number-mode-map
>            'mouse-face 'mode-line-highlight
>            'help-echo "Line and column, mouse-1: Line/col menu"))
>      (6 ,(propertize
>           " L%l" 'local-map mode-line-column-line-number-mode-map
>           'mouse-face 'mode-line-highlight
>           'help-echo "Line number, mouse-1: Line/col menu"))))
>    ((column-number-mode
>      (5 ,(propertize
>           " C%c" 'face (and (> (current-column)
>                                modelinepos-column-limit)
>                             'modelinepos-column-warning)
>           'local-map mode-line-column-line-number-mode-map
>           'mouse-face 'mode-line-highlight
>           'help-echo "Column number, mouse-1: Line/col menu"))))))
> 
> Do you see anything problematic in that sexp?  I don't.

If you have size-indication-mode turned on, I'd look at the mapcar
part, like Stefan suggests.

> I got the (mistaken?) impression that this message was printed out
> because of a user quit during redisplay.

It could be the case, but then it's a bug somewhere, as redisplay
generally disables quitting.

> Are you sure that the cause was not C-g?

No.

> Why print "signaled (quit)" if there was no quit signal?

Quit signal can be generated by something that is not C-g. It could
come from evaluating a menu item, for example, or from a canceled
menu.

> Or is that supposed to mean (a) an error was signalled (not a quit)
> and so (b) redisplay then quit?

No, it really means that some Lisp form signaled quit, or C-g was
pressed while a Lisp form was evaluated without inhibiting quitting.

> > > Is there an option that controls whether to print such messages?
> > 
> > Print where?
> 
> To *Messages*.

They are always printed to *Messages*, as redisplay has no other ways
of recording these errors that don't re-enter redisplay.

> I understand that such a message would be printed for a real
> (display) error.  What seemed odd was that it would be done for C-g
> during redisplay.  That's what I thought was happening.

It did.  When redisplay needs to eval some Lisp, it does so in a way
that catches any signals thrown by that Lisp.  When such a signal is
caught, the message you see is inserted into *Messages*.

The quit signal could come either from the eval'ed Lisp, or because
you typed C-g while inhibit-quit was not set, which will cause the
Lisp evaluation to be canceled by the quit signal.