GNU bug report logs - #13466
find-file-noselect scrolls current buffer

Previous Next

Package: emacs;

Reported by: Michael Brand <michael.ch.brand <at> gmail.com>

Date: Wed, 16 Jan 2013 19:26:02 UTC

Severity: minor

Tags: notabug

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Michael Brand <michael.ch.brand <at> gmail.com>
Cc: 13466 <at> debbugs.gnu.org
Subject: bug#13466: find-file-noselect scrolls current buffer
Date: Wed, 16 Jan 2013 18:10:22 -0500
> $ 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




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.