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: Window configurations Date: Sat, 05 Jun 2010 14:49:03 +0200 Message-ID: <4C0A47BF.7010202@gmx.at> References: <4BB4CF6B.2000007@alice.it> <87zl0rtmqy.fsf@mail.jurta.org> <871vdu6qn5.fsf@mail.jurta.org> <87bpcv1wvt.fsf@mail.jurta.org> <4BE13828.2030609@gmx.at> <87vdb2qo82.fsf@mail.jurta.org> <4BE27C17.3030005@gmx.at> <87vdav4vx5.fsf@mail.jurta.org> <4BE900E7.3090402@gmx.at> <87r5liqv8f.fsf@mail.jurta.org> <4BEA74DC.2060103@gmx.at> <87y6fns8qo.fsf@mail.jurta.org> <4BECF4D6.9030707@gmx.at> <87632na2af.fsf@mail.jurta.org> <4C03F1B5.8040708@gmx.at> <4C04D1BF.9070902@gmx.at> <87zkzcse1j.fsf@mail.jurta.org> <4C08B53C.7040304@gmx.at> <877hmezpvu.fsf@mail.jurta.org> 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 1275742163 28212 80.91.229.12 (5 Jun 2010 12:49:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 5 Jun 2010 12:49:23 +0000 (UTC) Cc: Stefan Monnier , Emacs To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 05 14:49:20 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 1OKsoR-0004MU-J9 for ged-emacs-devel@m.gmane.org; Sat, 05 Jun 2010 14:49:19 +0200 Original-Received: from localhost ([127.0.0.1]:46603 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OKsoQ-0000Je-UR for ged-emacs-devel@m.gmane.org; Sat, 05 Jun 2010 08:49:18 -0400 Original-Received: from [140.186.70.92] (port=51254 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OKsoK-0000I7-7O for emacs-devel@gnu.org; Sat, 05 Jun 2010 08:49:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OKsoH-0007cw-W5 for emacs-devel@gnu.org; Sat, 05 Jun 2010 08:49:12 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]:54090) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OKsoH-0007cR-Jy for emacs-devel@gnu.org; Sat, 05 Jun 2010 08:49:09 -0400 Original-Received: (qmail invoked by alias); 05 Jun 2010 12:49:05 -0000 Original-Received: from 62-47-57-196.adsl.highway.telekom.at (EHLO [62.47.57.196]) [62.47.57.196] by mail.gmx.net (mp022) with SMTP; 05 Jun 2010 14:49:05 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX183fDUoVJ83gPaOJNcDQicNbAae7srcwEdwp+e/NS JCB1m8mLr8pMH2 User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: <877hmezpvu.fsf@mail.jurta.org> 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:125542 Archived-At: > I tried to remove the conditional, but it doesn't help. > Maybe some other your changes fixed that? [Indeed. Just that I had the fix in my build but no more in the source so it took me three hours to find out what really happened.] It's a longstanding bug in Fselect_window. At the time I changed `pop-to-buffer' I wasn't aware of it and thus only added to the confusion. Please do two things: In Fselect_window move the if (NILP (norecord)) record_buffer (w->buffer); up into the if (NILP (norecord)) { ++window_select_count; XSETFASTINT (w->use_time, window_select_count); } clause such that the latter reads as if (NILP (norecord)) { ++window_select_count; XSETFASTINT (w->use_time, window_select_count); record_buffer (w->buffer); } so the buffer gets recorded even if the selected window does not change. In addition, remove the conditional from `pop-to-buffer' as explained before. If you don't encounter problems, please check it in. martin PS: I'm not sure whether in Fselect_window this /* Go to the point recorded in the window. This is important when the buffer is in more than one window. It also matters when redisplay_window has altered point after scrolling, because it makes the change only in the window. */ { register int new_point = marker_position (w->pointm); if (new_point < BEGV) SET_PT (BEGV); else if (new_point > ZV) SET_PT (ZV); else SET_PT (new_point); } stuff should be moved in front of the if (EQ (window, selected_window)) return window; as well. Any ideas?