From: Alan Mackenzie <acm@muc.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 19381@debbugs.gnu.org
Subject: bug#19381: The doc string for `sit-for' is wrong; redisplay isn't unconditionally done.
Date: Mon, 15 Dec 2014 10:35:17 +0000 [thread overview]
Message-ID: <20141215103517.GA3435@acm.acm> (raw)
In-Reply-To: <jwvegs1yfk7.fsf-monnier+emacsbugs@gnu.org>
Hello, Stefan.
On Sun, Dec 14, 2014 at 06:31:29PM -0500, Stefan Monnier wrote:
> > of "(sit-for 0)" in Emacs, and a lot of these are probably intended to
> > mean "perform redisplay NOW". So it might be better to make
> > `sit-for' always do a redisplay.
> I'd need to see evidence of it.
I've extracted all instances of "(sit-for 0)" to which a comment is
appended (and stripped out the "(sit-for 0)" and numbered the lines)
with the command:
find . -name '*.el' | xargs grep -n '^[^;]*(sit-for 0).*;' | \
sed 's/\([^:]*:[^:]*:\)[^;]*\(.*\)/\1 \2/' | cat -b
The result is this:
1 ./ehelp.el:223: ;necessary if last command was end-of-buffer or
2 ./emacs-lisp/edebug.el:2504: ; Force update and continue.
3 ./play/gomoku.el:993: ; Display NOW
4 ./play/gomoku.el:1036: ; Display NOW
5 ./play/gomoku.el:1127: ; Display NOW
6 ./play/landmark.el:884: ; Display NOW
7 ./play/landmark.el:926: ; Display NOW
8 ./play/landmark.el:1014: ; Display NOW
9 ./obsolete/terminal.el:627: ;get display to update
10 ./isearch.el:2991: ;make sure (window-start) is credible
11 ./ffap.el:366: ; display point movement
12 ./ffap.el:1502: ; display
13 ./ffap.el:1536: ; redraw original screen
14 ./ffap.el:1618: ; display
15 ./progmodes/compile.el:1754: ; Force redisplay
16 ./textmodes/page-ext.el:639: ; otherwise forward-line fails if N > window height.
17 ./textmodes/ispell.el:2749: ; update display
18 ./textmodes/ispell.el:2753: ; update display showing inverse video.
19 ./net/rcirc.el:1657: ; displayed text before hook
20 ./shell.el:988: ; force redisplay
21 ./shell.el:1067: ; force redisplay
22 ./emulation/cua-rect.el:769: ; make window top/bottom reliable
23 ./emulation/viper-macs.el:201: ; this overcomes xemacs tty bug
24 ./vc/ediff-mult.el:2103: ; sometimes needed to synch the display and ensure that the
25 ./vc/ediff.el:945: ; sync before using window-start/end -- a precaution
26 ./vc/smerge-mode.el:403: ;Display the new highlighting.
27 ./vc/ediff-ptch.el:717: ; synchronize - let the user see diagnostics
That's ~20% of the instances. Let's assume, for want of a better
hypothesis, that these 27 uses are representative of the 125 in total.
Of these, 1, 2, 10, 15, 16, 20, 21, 22, 25 state that redisplay is
forced, or give a reason why redisplay is needed. That's 9 out of 27, a
third. It is impossible to say from this whether the rest of the 27
absolutely need immediate redisplay or not. Some of them might well do.
Extrapolating that to the 125 instances of "(sit-for 0)" suggests
around 42 of them (at least) want immediate redisplay.
> Stefan
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2014-12-15 10:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-14 17:13 bug#19381: The doc string for `sit-for' is wrong; redisplay isn't unconditionally done Alan Mackenzie
2014-12-14 23:31 ` Stefan Monnier
2014-12-15 10:35 ` Alan Mackenzie [this message]
2014-12-15 14:41 ` Stefan Monnier
2014-12-15 18:50 ` Stefan Monnier
2014-12-16 17:00 ` Alan Mackenzie
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=20141215103517.GA3435@acm.acm \
--to=acm@muc.de \
--cc=19381@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.