all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: 9979@debbugs.gnu.org
Subject: bug#9979: 24.0.91; doc string of `save-window-excursion'
Date: Sun, 6 Nov 2011 14:59:31 -0800	[thread overview]
Message-ID: <ECC7D1D865A74A9BA82CDAB1749915D3@us.oracle.com> (raw)

This recent addition to the doc string is misleading and not helpful:
 
 BEWARE: Most uses of this macro introduce bugs.
 E.g. it should not be used to try and prevent some code from opening
 a new window, since that window may sometimes appear in another frame,
 in which case `save-window-excursion' cannot help.
 
For one thing, we should not be saying "BEWARE" in the doc.  "Note:" is
sufficient, and in most cases even that is superfluous.  Just get
directly to the point.
 
More importantly, "most uses" means what here?  Are you really
suggesting that most of the existing uses of this macro introduce bugs?
This is silly.  If you really have something of substance to say - to
"warn" people about, then get directly to the point and say it.  Stop
trying to add force by ornamenting this doc with vague warnings of
hobgoblins.
 
The following point appears to be the _only_ real content in this
paragraph: Do not use this to try to prevent opening a new window,
since...
 
But that too does not really say what you want (IIUC).  No one would use
this to try to _prevent_ opening a new window.  But someone might use it
in hopes of saving and restoring the configuration that existed before
a new window was opened.
 
And that's what the advice here is all about: Because this macro
restores only the window config for the selected frame, it has no effect
on changes to other frames, including addition of new windows to other
frames or the deletion of windows from other frames.
 
Just say that, and forget all the mumbo jumbo about BEWARE and
introduction of bugs: Like all window-config functions and macros, this
macro has no effect on windows in other frames.
 
In GNU Emacs 24.0.91.1 (i386-mingw-nt5.1.2600) of 2011-10-30 on MARVIN
 Windowing system distributor `Microsoft Corp.', version 5.1.2600
 configured using `configure --with-gcc (4.6) --no-opt --cflags
 -I"D:/devel/emacs/libs/libXpm-3.5.8/include"
 -I"D:/devel/emacs/libs/libXpm-3.5.8/src"
 -I"D:/devel/emacs/libs/libpng-dev_1.4.3-1/include"
 -I"D:/devel/emacs/libs/zlib-dev_1.2.5-2/include"
 -I"D:/devel/emacs/libs/giflib-4.1.4-1/include"
 -I"D:/devel/emacs/libs/jpeg-6b-4/include"
 -I"D:/devel/emacs/libs/tiff-3.8.2-1/include"
 -I"D:/devel/emacs/libs/gnutls-2.10.1/include" --ldflags
 -L"D:/devel/emacs/libs/gnutls-2.10.1/lib"'
 






             reply	other threads:[~2011-11-06 22:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-06 22:59 Drew Adams [this message]
2011-11-07 13:49 ` bug#9979: 24.0.91; doc string of `save-window-excursion' Stefan Monnier
2011-11-07 16:33   ` Drew Adams
2012-03-11 16:16     ` Chong Yidong

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=ECC7D1D865A74A9BA82CDAB1749915D3@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=9979@debbugs.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.