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

From: "Drew Adams" <[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.

> > Why is such a message written to *Messages* just because (seemingly)
> > a user hits C-g during redisplay?
> 
> When some Lisp expression eval'ed by the display engine signals an
> error, that error is caught and the message is written to *Messages*.
> That's because redisplay cannot possibly let the message appear in the
> echo area, as this will cause another redisplay, which will again
> signal an error, and so on, ad nauseam.

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

> So the problem here is that an error was signaled during evaluation of
> a Lisp expression.  Are you sure that the cause was C-g?  The fact
> that you see "Quit" does not yet prove it was a C-g that caused that.

No, I certainly am not sure of anything regarding this.  I do know that that
sexp is eval'd and the mode line updated accordingly zillions of times
throughout every one of my Emacs sessions, with no problem.  That, together with
the "signaled (quit)" led me to think that it was a C-g that caused the message
printing.

Are you sure that the cause was not C-g?  Why print "signaled (quit)" if there
was no quit signal?  Or is that supposed to mean (a) an error was signalled (not
a quit) and so (b) redisplay then quit?

> > Is there an option that controls whether to print such messages?
> 
> Print where?

To *Messages*.  But I guess there is not, since you say that this is the normal
handling of an eval error and did not come from C-g.  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.