From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 06 18:02:39 2011 Received: (at submit) by debbugs.gnu.org; 6 Nov 2011 23:02:39 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 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 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 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 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 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 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 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 Received: from dradamslap1 (/10.159.60.254) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 06 Nov 2011 14:59:34 -0800 From: "Drew Adams" To: Subject: 24.0.91; doc string of `save-window-excursion' Date: Sun, 6 Nov 2011 14:59:31 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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-Received-From: 140.186.70.17 X-Spam-Score: -6.2 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.2 (------) 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"' From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 07 08:52:12 2011 Received: (at 9979) by debbugs.gnu.org; 7 Nov 2011 13:52:12 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNPcR-0006MN-OK for submit@debbugs.gnu.org; Mon, 07 Nov 2011 08:52:12 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNPcP-0006ME-IZ for 9979@debbugs.gnu.org; Mon, 07 Nov 2011 08:52:10 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAIbgt05MCoYy/2dsb2JhbABDqWWBBoFyAQEEAVYjBQsLNBIUGA0kiBW2G4krBIgLmViESA X-IronPort-AV: E=Sophos;i="4.69,470,1315195200"; d="scan'208";a="146686889" Received: from 76-10-134-50.dsl.teksavvy.com (HELO pastel.home) ([76.10.134.50]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 07 Nov 2011 08:49:16 -0500 Received: by pastel.home (Postfix, from userid 20848) id 846CB59212; Mon, 7 Nov 2011 08:49:16 -0500 (EST) From: Stefan Monnier To: "Drew Adams" Subject: Re: bug#9979: 24.0.91; doc string of `save-window-excursion' Message-ID: References: Date: Mon, 07 Nov 2011 08:49:16 -0500 In-Reply-To: (Drew Adams's message of "Sun, 6 Nov 2011 14:59:31 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 9979 Cc: 9979@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) > Are you really > suggesting that most of the existing uses of this macro introduce bugs? Yes. > But that too does not really say what you want (IIUC). No one would use > this to try to _prevent_ opening a new window. This No one seems to write an awful lot of Elisp code, sadly. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 07 11:37:14 2011 Received: (at 9979) by debbugs.gnu.org; 7 Nov 2011 16:37:14 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNSC3-0001hY-MS for submit@debbugs.gnu.org; Mon, 07 Nov 2011 11:37:14 -0500 Received: from acsinet15.oracle.com ([141.146.126.227]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNSBv-0001h4-SX for 9979@debbugs.gnu.org; Mon, 07 Nov 2011 11:37:06 -0500 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by acsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id pA7GY5M2030986 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 7 Nov 2011 16:34:06 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id pA7GY4Pw007409 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 7 Nov 2011 16:34:04 GMT Received: from abhmt118.oracle.com (abhmt118.oracle.com [141.146.116.70]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id pA7GXwqg004004; Mon, 7 Nov 2011 10:33:59 -0600 Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 07 Nov 2011 08:33:58 -0800 From: "Drew Adams" To: "'Stefan Monnier'" References: Subject: RE: bug#9979: 24.0.91; doc string of `save-window-excursion' Date: Mon, 7 Nov 2011 08:33:58 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcydVBAcuUrJuF/AS6+PuNc08EMkhgAFIKpg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090203.4EB8087E.006E,ss=1,re=0.000,fgs=0 X-Spam-Score: -6.2 (------) X-Debbugs-Envelope-To: 9979 Cc: 9979@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.2 (------) > > 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. > > This No one seems to write an awful lot of Elisp code, sadly. If you think that, then it is OK to add that to a list of things you want to mention that the macro does _not_ do. But it is not adequate to state _only_ that, as the doc for the macro. That's pretty much what is happening here. It is not even adequate to state only a whole list of things that the macro does _not_ do. In any case, most important for such a list would be to mention that the macro has no effect on windows in other frames. Above all, the doc needs to state what the macro _does_ do. There, the doc string falls down. See the Elisp manual for a better and more succinct explanation of what the macro does. The first line of the doc string is also incorrect. The macro does not "preserve" window sizes and contents. Preserving implies that these do not change at any time during the macro call. It does not preserve these, but it _restores_ them, after they have perhaps been changed by the BODY. And again, it's important to mention that it is only the windows of the selected frame (not other frames) that are restored. A statement that the macro "preserves" a window config is in fact _precisely_ the kind of thing that can lead users to think that it _prevents_ opening a new window. Preserving the config would indeed prevent new windows opening. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 11 12:46:58 2012 Received: (at 9979) by debbugs.gnu.org; 11 Mar 2012 16:46:58 +0000 Received: from localhost ([127.0.0.1]:45201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S6lv7-0002xn-63 for submit@debbugs.gnu.org; Sun, 11 Mar 2012 12:46:58 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:42185) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S6lv4-0002xe-FO for 9979@debbugs.gnu.org; Sun, 11 Mar 2012 12:46:55 -0400 Received: from bb116-14-103-36.singnet.com.sg ([116.14.103.36]:58553 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1S6lSD-0000qv-SS; Sun, 11 Mar 2012 12:17:06 -0400 From: Chong Yidong To: "Drew Adams" Subject: Re: bug#9979: 24.0.91; doc string of `save-window-excursion' References: Date: Mon, 12 Mar 2012 00:16:57 +0800 In-Reply-To: (Drew Adams's message of "Mon, 7 Nov 2011 08:33:58 -0800") Message-ID: <874ntv2juu.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 9979 Cc: 9979@debbugs.gnu.org, 'Stefan Monnier' X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) "Drew Adams" writes: > The macro does not "preserve" window sizes and contents. Preserving > implies that these do not change at any time during the macro call. > It does not preserve these, but it _restores_ them, after they have > perhaps been changed by the BODY. And again, it's important to > mention that it is only the windows of the selected frame (not other > frames) that are restored. I've fixed the docstring. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 11 12:47:01 2012 Received: (at control) by debbugs.gnu.org; 11 Mar 2012 16:47:01 +0000 Received: from localhost ([127.0.0.1]:45204 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S6lvB-0002y4-Af for submit@debbugs.gnu.org; Sun, 11 Mar 2012 12:47:01 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:42189) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S6lv9-0002xx-9I for control@debbugs.gnu.org; Sun, 11 Mar 2012 12:46:59 -0400 Received: from bb116-14-103-36.singnet.com.sg ([116.14.103.36]:58554 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1S6lSK-0000rO-F8 for control@debbugs.gnu.org; Sun, 11 Mar 2012 12:17:13 -0400 From: Chong Yidong To: control@debbugs.gnu.org Subject: close 9979 Date: Mon, 12 Mar 2012 00:17:05 +0800 Message-ID: <87y5r7az9a.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) close 9979 thanks From unknown Sun Aug 17 01:23:35 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 09 Apr 2012 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator