[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13466: find-file-noselect scrolls current buffer
From: |
Stefan Monnier |
Subject: |
bug#13466: find-file-noselect scrolls current buffer |
Date: |
Wed, 16 Jan 2013 18:10:22 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> $ 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")
The problem is end-of-buffer, which affects the selected-window, even if
it does not display the current-buffer. Of course, its docstring says
not to use it from Lisp, so we could argue it's not quite a bug.
I.e. use
M-: (add-hook 'text-mode-hook (lambda () (goto-char (point-max))))
-- Stefan