From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: save-window-excursion and window-configuration-change-hook interaction Date: Thu, 20 May 2010 11:44:39 +0200 Message-ID: <4BF50487.5060900@gmx.at> References: <87mxvy5mly.fsf@vh213601.truman.edu> <4BF282E0.8000001@gmx.at> <87hbm52fzu.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1274348699 30841 80.91.229.12 (20 May 2010 09:44:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 20 May 2010 09:44:59 +0000 (UTC) Cc: emacs-devel@gnu.org To: jay.p.belanger@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 20 11:44:58 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OF2JG-0007rk-1r for ged-emacs-devel@m.gmane.org; Thu, 20 May 2010 11:44:58 +0200 Original-Received: from localhost ([127.0.0.1]:46772 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OF2JF-0002GI-Dh for ged-emacs-devel@m.gmane.org; Thu, 20 May 2010 05:44:57 -0400 Original-Received: from [140.186.70.92] (port=41164 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OF2J6-0002FC-Ne for emacs-devel@gnu.org; Thu, 20 May 2010 05:44:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OF2J4-0005Mm-Il for emacs-devel@gnu.org; Thu, 20 May 2010 05:44:47 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]:40324) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OF2J3-0005Lz-Eh for emacs-devel@gnu.org; Thu, 20 May 2010 05:44:46 -0400 Original-Received: (qmail invoked by alias); 20 May 2010 09:44:41 -0000 Original-Received: from 62-47-43-79.adsl.highway.telekom.at (EHLO [62.47.43.79]) [62.47.43.79] by mail.gmx.net (mp013) with SMTP; 20 May 2010 11:44:41 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX195HaMavPh5AY/vSFGSFSp2buKPA3JFYS5tIOGJS0 0GLqdiFPKi/JdA User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: <87hbm52fzu.fsf@gmail.com> X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:124961 Archived-At: > I assure you, right now I like it less than you do. It's next to impossible to get this right. If we don't move `point' to the window's point we get non-standard semantics for the code run in the hook. That is, we'd violate a basic invariant that with a window selected and its buffer current, the window's point and the buffer's point refer to the same position. If we do move `point' we have two choices: If we restore `point' to its previous value (using some sort of `save-excursion'), any `point' changing operations run in the hook are lost and any calculations based on `point' run in the hook are moot. If we don't restore `point' to its previous value we get the current behavior. martin