From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: Follow link scrolls current buffer when table aligns Date: Thu, 17 Jan 2013 19:40:15 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=20cf307c9d64689c4904d3805363 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:59483) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvuO4-00064G-8Q for emacs-orgmode@gnu.org; Thu, 17 Jan 2013 13:40:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvuNv-0002UN-VH for emacs-orgmode@gnu.org; Thu, 17 Jan 2013 13:40:27 -0500 Received: from mail-vb0-f48.google.com ([209.85.212.48]:43160) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvuNv-0002SN-Nl for emacs-orgmode@gnu.org; Thu, 17 Jan 2013 13:40:19 -0500 Received: by mail-vb0-f48.google.com with SMTP id fc21so2808462vbb.7 for ; Thu, 17 Jan 2013 10:40:15 -0800 (PST) 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: Org Mode Cc: Stefan Monnier --20cf307c9d64689c4904d3805363 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable (continued from bug-gnu-emacs@gnu.org: =93find-file-noselect scrolls current buffer=94 http://lists.gnu.org/archive/html/bug-gnu-emacs/2013-01/msg00619.html ) Hi all On Thu, Jan 17, 2013 at 12:10 AM, Stefan Monnier wrote: > I.e. use > M-: (add-hook 'text-mode-hook (lambda () (goto-char (point-max)))) I changed my code for the org-mode-hook accordingly to resolve the first issue related with using end-of-buffer. This change uncovers a second scroll issue, this time caused by set-window-start used in org-table-align. The scroll happens in an Org buffer under some circumstances when a link to an other Org mode buffer with a table alignment is followed. The first time when the target file is opened by find-file-noselect, org-table-align is called and its set-window-start is the reason for the scroll in the original buffer. 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? Michael --20cf307c9d64689c4904d3805363 Content-Type: application/octet-stream; name="n.org" Content-Disposition: attachment; filename="n.org" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hc288f3h0 IDEKIDIKIDMKIDQKIDUKIDYKIDcKIDgKIDkKMTAKMTEKMTIKMTMKMTQKMTUKMTYKMTcKMTgKMTkK MjAKMjEKMjIKMjMKMjQKMjUKMjYKMjcKMjgKMjkKMzAKMzEKMzIKMzMKMzQKMzUKMzYKMzcKMzgK MzkKNDAKNDEKNDIKNDMKNDQKNDUKNDYKNDcKNDgKNDkKNTAKNTEKNTIKNTMKNTQKNTUKNTYKNTcK NTgKNTkKNjAKNjEKNjIKNjMKNjQKNjUKNjYKNjcKNjgKNjkKNzAKNzEKNzIKNzMKNzQKNzUKNzYK NzcKNzgKNzkKODAKODEKODIKODMKODQKODUKODYKODcKODgKODkKOTAKOTEKOTIKOTMKOTQKOTUK OTYKOTcKOTgKOTkKW1tmaWxlOnQub3JnOjoqdGFibGVdXQo= --20cf307c9d64689c4904d3805363 Content-Type: application/octet-stream; name="t.org" Content-Disposition: attachment; filename="t.org" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hc288o5s1 IytTVEFSVFVQOiBhbGlnbgoqIHRhYmxlCiAgfCBibGEgYmxhIGJsYSBibGEgYmxhIGJsYSBibGEg YmxhIGJsYSBibGEgYmxhIGJsYSBibGEgYmxhIGJsYSBibGEgfAogIHwgYmxhIGJsYSBibGEgYmxh IGJsYSBibGEgYmxhIGJsYSBibGEgYmxhIGJsYSBibGEgYmxhIGJsYSBibGEgYmxhIHwKICB8IGJs YSBibGEgYmxhIGJsYSBibGEgYmxhIGJsYSBibGEgYmxhIGJsYSBibGEgYmxhIGJsYSBibGEgYmxh IGJsYSB8CiAgfCBibGEgYmxhIGJsYSBibGEgYmxhIGJsYSBibGEgYmxhIGJsYSBibGEgYmxhIGJs YSBibGEgYmxhIGJsYSBibGEgfAogIHwgYmxhIGJsYSBibGEgYmxhIGJsYSBibGEgYmxhIGJsYSBi bGEgYmxhIGJsYSBibGEgYmxhIGJsYSBibGEgYmxhIHwKICB8IGJsYSBibGEgYmxhIGJsYSBibGEg YmxhIGJsYSBibGEgYmxhIGJsYSBibGEgYmxhIGJsYSBibGEgYmxhIGJsYSB8CiAgfCBibGEgYmxh IGJsYSBibGEgYmxhIGJsYSBibGEgYmxhIGJsYSBibGEgYmxhIGJsYSBibGEgYmxhIGJsYSBibGEg fAogIHwgYmxhIGJsYSBibGEgYmxhIGJsYSBibGEgYmxhIGJsYSBibGEgYmxhIGJsYSBibGEgYmxh IGJsYSBibGEgYmxhIHwKICB8IGJsYSBibGEgYmxhIGJsYSBibGEgYmxhIGJsYSBibGEgYmxhIGJs YSBibGEgYmxhIGJsYSBibGEgYmxhIGJsYSB8CiAgfCBibGEgYmxhIGJsYSBibGEgYmxhIGJsYSBi bGEgYmxhIGJsYSBibGEgYmxhIGJsYSBibGEgYmxhIGJsYSBibGEgfAo= --20cf307c9d64689c4904d3805363--