From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#10971: Problem with `split-window-keep-point' set to `nil' Date: Fri, 09 Mar 2012 17:24:24 +0100 Message-ID: <4F5A2EB8.6020808@gmx.at> References: <4F5A1FDE.3020604@gmx.at> NNTP-Posting-Host: plane.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 1331310277 20981 80.91.229.3 (9 Mar 2012 16:24:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 9 Mar 2012 16:24:37 +0000 (UTC) Cc: 10971@debbugs.gnu.org To: Dani Moncayo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 09 17:24:36 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S62cN-0006n3-IB for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Mar 2012 17:24:35 +0100 Original-Received: from localhost ([::1]:54447 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S62cM-0007yO-Tw for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Mar 2012 11:24:34 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:43351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S62cF-0007yB-S0 for bug-gnu-emacs@gnu.org; Fri, 09 Mar 2012 11:24:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S62bu-0007OF-Gb for bug-gnu-emacs@gnu.org; Fri, 09 Mar 2012 11:24:27 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S62bu-0007OA-D2 for bug-gnu-emacs@gnu.org; Fri, 09 Mar 2012 11:24:06 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1S62co-0007gS-84 for bug-gnu-emacs@gnu.org; Fri, 09 Mar 2012 11:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Mar 2012 16:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10971 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10971-submit@debbugs.gnu.org id=B10971.133131026229478 (code B ref 10971); Fri, 09 Mar 2012 16:25:02 +0000 Original-Received: (at 10971) by debbugs.gnu.org; 9 Mar 2012 16:24:22 +0000 Original-Received: from localhost ([127.0.0.1]:40735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S62cA-0007fP-2r for submit@debbugs.gnu.org; Fri, 09 Mar 2012 11:24:22 -0500 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:52117) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1S62c7-0007fG-MR for 10971@debbugs.gnu.org; Fri, 09 Mar 2012 11:24:20 -0500 Original-Received: (qmail invoked by alias); 09 Mar 2012 16:23:22 -0000 Original-Received: from 62-47-44-92.adsl.highway.telekom.at (EHLO [62.47.44.92]) [62.47.44.92] by mail.gmx.net (mp071) with SMTP; 09 Mar 2012 17:23:22 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX196CbR+IZx6rfn+7j9Z7pWq6oGsIyYfU1/s6/0UFr jWWEZwB5Ej4Xu7 In-Reply-To: <4F5A1FDE.3020604@gmx.at> X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list 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:57585 Archived-At: > Does the attached patch give better results? Just to explain what IMO happened and maybe should happen here: Emacs 23 had a wrapper (save-excursion (set-buffer (window-buffer)) which, probably to avoid a warning, Stefan changed on 2009-11-13 to (with-current-buffer (window-buffer) Ever since that `split-window-keep-point' was broken and the fact that nobody complained till now seems to indicate that we probably should obsolete this option. I don't understand the purpose of the (set-buffer (window-buffer)). Maybe it was due to the fact that the current buffer might not be the window buffer of the selected window when `split-window-vertically' is called. In that case, however, the specification of `old-point' and the conjunct (<= bottom (point)) some lines below _would_ consult the current buffer (since it's outside the `save-excursion') and we'd have a problem anyway. OTOH, not using `save-excursion' is the wrong thing since everything done in the excursion is to _calculate_ positions and not to modify them. My patch is an attempt to fix most old and new issues with one exception: The let's (old-point (point)) should probably become (old-point (window-point-1)) but I'm not very sure yet. Any ideas? martin