unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#13466: find-file-noselect scrolls current buffer
@ 2013-01-16 18:27 Michael Brand
  2013-01-16 23:10 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Brand @ 2013-01-16 18:27 UTC (permalink / raw)
  To: 13466

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





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-17 18:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-16 18:27 bug#13466: find-file-noselect scrolls current buffer Michael Brand
2013-01-16 23:10 ` Stefan Monnier
2013-01-17 18:44   ` Michael Brand

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).