From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#9979: 24.0.91; doc string of `save-window-excursion' Date: Sun, 6 Nov 2011 14:59:31 -0800 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1320620433 25268 80.91.229.12 (6 Nov 2011 23:00:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 6 Nov 2011 23:00:33 +0000 (UTC) To: 9979@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 07 00:00:29 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RNBhO-0006r4-Dd for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 Nov 2011 00:00:22 +0100 Original-Received: from localhost ([::1]:41587 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNBhO-0008Nk-2K for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Nov 2011 18:00:22 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:57461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNBhL-0008M4-8C for bug-gnu-emacs@gnu.org; Sun, 06 Nov 2011 18:00:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RNBhG-0006Qt-Pl for bug-gnu-emacs@gnu.org; Sun, 06 Nov 2011 18:00:19 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57240) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNBhG-0006Qg-K5 for bug-gnu-emacs@gnu.org; Sun, 06 Nov 2011 18:00:14 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RNBjx-0001mY-Ub for bug-gnu-emacs@gnu.org; Sun, 06 Nov 2011 18:03:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 06 Nov 2011 23:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 9979 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Original-Received: via spool by submit@debbugs.gnu.org id=B.13206205596818 (code B ref -1); Sun, 06 Nov 2011 23:03:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Nov 2011 23:02:39 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNBjb-0001lv-3h for submit@debbugs.gnu.org; Sun, 06 Nov 2011 18:02:39 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNBjZ-0001lp-BN for submit@debbugs.gnu.org; Sun, 06 Nov 2011 18:02:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RNBgq-0006Is-1O for submit@debbugs.gnu.org; Sun, 06 Nov 2011 17:59:48 -0500 Original-Received: from lists.gnu.org ([140.186.70.17]:52340) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNBgp-0006Io-WD for submit@debbugs.gnu.org; Sun, 06 Nov 2011 17:59:48 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:57358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNBgp-00083l-00 for bug-gnu-emacs@gnu.org; Sun, 06 Nov 2011 17:59:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RNBgn-0006IX-TI for bug-gnu-emacs@gnu.org; Sun, 06 Nov 2011 17:59:46 -0500 Original-Received: from rcsinet15.oracle.com ([148.87.113.117]:32934) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNBgn-0006IF-Is for bug-gnu-emacs@gnu.org; Sun, 06 Nov 2011 17:59:45 -0500 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by rcsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id pA6MxfZa008521 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 6 Nov 2011 22:59:41 GMT Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id pA6MxeeM005372 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 6 Nov 2011 22:59:40 GMT Original-Received: from abhmt105.oracle.com (abhmt105.oracle.com [141.146.116.57]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id pA6MxZp3004883 for ; Sun, 6 Nov 2011 16:59:35 -0600 Original-Received: from dradamslap1 (/10.159.60.254) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 06 Nov 2011 14:59:34 -0800 X-Mailer: Microsoft Office Outlook 11 Thread-Index: Acyc176NdupuFTTARYy2I8YK/QAGjQ== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090201.4EB7115D.00FA,ss=1,re=0.000,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 06 Nov 2011 18:03:01 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:53628 Archived-At: 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"'