From: Eli Zaretskii <eliz@gnu.org>
To: Glenn Morris <rgm@gnu.org>
Cc: 20445@debbugs.gnu.org
Subject: bug#20445: excessive redisplay / echo area resizing during byte-compilation
Date: Tue, 28 Apr 2015 18:13:25 +0300 [thread overview]
Message-ID: <83sibkuvze.fsf@gnu.org> (raw)
In-Reply-To: <7cfv7lxnpr.fsf@fencepost.gnu.org>
> From: Glenn Morris <rgm@gnu.org>
> Date: Mon, 27 Apr 2015 17:31:28 -0400
>
> Does not happen with M-x byte-recompile-file.
If you invoke byte-compile-file like this:
M-: (byte-compile-file "org.el") RET
then it flickers exactly like with the menu-bar invocation. Which is
expected, since the menu bar invokes emacs-lisp-byte-compile, which
does this:
(defun emacs-lisp-byte-compile ()
"Byte compile the file containing the current buffer."
(interactive)
(if buffer-file-name
(byte-compile-file buffer-file-name)
(error "The buffer must be saved in a file first")))
The difference between "M-x byte-compile-file" and the invocation via
M-: seems to be due to this trick in bytecomp.el:
(defun byte-compile--message (format &rest args)
"Like `message', except sometimes don't print to minibuffer.
If the variable `byte-compile--interactive' is nil, the message
is not displayed on the minibuffer."
(apply #'message format args)
(unless byte-compile--interactive
(message nil)))
And indeed, if I invoke byte-compile-file like this:
M-: (let ((byte-compile--interactive t)) (byte-compile-file "org.el")) RET
the flickering goes away.
Now to the source of the flickering: it's the resizing of the echo
area that causes that. We have this code in echo_area_display:
window_height_changed_p = display_echo_area (w);
[...]
if (window_height_changed_p <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
/* Don't do this if Emacs is shutting down. Redisplay
needs to run hooks. */
&& !NILP (Vrun_hooks))
{
/* Must update other windows. Likewise as in other
cases, don't let this update be interrupted by
pending input. */
ptrdiff_t count = SPECPDL_INDEX ();
specbind (Qredisplay_dont_pause, Qt);
windows_or_buffers_changed = 44; <<<<<<<<<<<<<<<<<<<<<<
redisplay_internal ();
And a non-zero value of windows_or_buffers_changed causes a thorough
redisplay, including, for example, the mode lines, the menu bar and
the scroll bars.
If I set resize-mini-windows to nil, the flickering disappears.
I think what causes the frequent resizes of the echo area are those
calls to (message nil) in byte-compile--message. Perhaps avoiding
that would resolve the issue.
Otherwise, I guess I'll have to say that this is the display engine
"functioning as designed".
> Does not happen with 24.5, even with the menu-bar.
The trick with byte-compile--message and byte-compile--interactive is
new on master, it didn't exist in Emacs 24.
next prev parent reply other threads:[~2015-04-28 15:13 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-27 21:31 bug#20445: excessive redisplay / echo area resizing during byte-compilation Glenn Morris
2015-04-27 21:44 ` Glenn Morris
2015-04-28 9:33 ` martin rudalics
2015-04-28 14:26 ` martin rudalics
2015-04-28 15:22 ` Eli Zaretskii
2015-04-28 17:43 ` martin rudalics
2015-04-28 18:00 ` Eli Zaretskii
2015-04-29 7:11 ` martin rudalics
2015-04-28 15:13 ` Eli Zaretskii [this message]
2015-04-29 3:21 ` Stefan Monnier
2015-04-29 7:11 ` martin rudalics
2015-04-29 8:56 ` Artur Malabarba
2015-04-29 8:58 ` Artur Malabarba
2015-04-29 7:37 ` Artur Malabarba
2015-04-29 15:53 ` Eli Zaretskii
2015-04-29 18:35 ` Artur Malabarba
2015-04-29 18:52 ` Artur Malabarba
2015-05-01 10:41 ` martin rudalics
2015-05-01 12:20 ` Artur Malabarba
2015-05-01 13:45 ` martin rudalics
2015-05-01 14:19 ` Artur Malabarba
2015-05-01 16:28 ` Artur Malabarba
2015-05-02 8:58 ` martin rudalics
2015-05-01 10:41 ` martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83sibkuvze.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=20445@debbugs.gnu.org \
--cc=rgm@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.