From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Follow link scrolls current buffer when table aligns Date: Sat, 16 Feb 2013 14:13:53 +0100 Message-ID: <87vc9smmem.fsf@bzg.ath.cx> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:33268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6haZ-0005fp-AN for emacs-orgmode@gnu.org; Sat, 16 Feb 2013 08:14:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U6haX-0002qh-KB for emacs-orgmode@gnu.org; Sat, 16 Feb 2013 08:13:59 -0500 Received: from we-in-x0231.1e100.net ([2a00:1450:400c:c03::231]:53862 helo=mail-we0-x231.google.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6haX-0002qB-9H for emacs-orgmode@gnu.org; Sat, 16 Feb 2013 08:13:57 -0500 Received: by mail-we0-f177.google.com with SMTP id d7so3582689wer.22 for ; Sat, 16 Feb 2013 05:13:55 -0800 (PST) In-Reply-To: (Michael Brand's message of "Thu, 17 Jan 2013 19:40:15 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Michael Brand Cc: Org Mode , Stefan Monnier Hi Michael, Michael Brand writes: > Minimal test to reproduce: > 1) put the attached n.org and t.org into one directory > 2) emacs -q > 3) C-x 3 > 4) open n.org > 5) M->, C-p, C-c C-o > The last step changes the scroll state of n.org but the return value > of window-start is expected be the same before and after. > > How can org-table-align be changed that set-window-start affects only > the visited target buffer but not the original buffer which called > find-file-noselect to follow its link? I finally fixed this with this commit: http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=adcc0d Here is the git commit log: When opening an .org file from another .org file, org-mode is initialized in the second one while the window is not yet selected. So, functions run during org-mode's initialization need to check if the org-mode window is the selected one before manipulating the "current window". Thanks for reporting this! -- Bastien