GNU bug report logs -
#13466
find-file-noselect scrolls current buffer
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi all
Although the issue seems to be independent of the mode it becomes
mainly annoying when an Org mode buffer scrolls unwantedly when a link
to an other Org mode buffer is followed. It depends on that the target
buffer has a mode hook that moves point, in my case to search a
file-specific config that I have to process myself. I was able to
drill down the issue to a find-file-noselect with a simple mode hook
with only end-of-buffer. I tried with org-mode-hook and
text-mode-hook, both show the issue. All GNU Emacs I had easily
available have the issue: GNU/Linux: 23.1.1. 23.3.1 24.2.1 24.2.92.1,
OS X: 23.3.1 24.1.1 24.2.2.
Minimal test to reproduce with text-mode-hook:
$ yes | nl | head -999 > /tmp/n
$ cp /tmp/n /tmp/m.txt
$ emacs -q /tmp/n
M-: (scroll-up)
M-: (add-hook 'text-mode-hook 'end-of-buffer)
M-: (find-file-noselect "/tmp/m.txt")
During the last step the buffer /tmp/n is scrolled which I consider a
bug. Note that when /tmp/m.txt is small this scrolling does not occur.
The same happens with find-file-other-window.
Is there a workaround how to use the hook? The save-excursion I have
around moving the point in the mode hook anyway is not enough.
Michael
This bug report was last modified 12 years and 127 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.