all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Brand <michael.ch.brand@gmail.com>
To: 13466@debbugs.gnu.org
Subject: bug#13466: find-file-noselect scrolls current buffer
Date: Wed, 16 Jan 2013 19:27:56 +0100	[thread overview]
Message-ID: <CALn3zogUkkY6mE9VnAaRK1JmJWuHhzQNXdGP0S9GAkOej4N6AQ@mail.gmail.com> (raw)

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





             reply	other threads:[~2013-01-16 18:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-16 18:27 Michael Brand [this message]
2013-01-16 23:10 ` bug#13466: find-file-noselect scrolls current buffer Stefan Monnier
2013-01-17 18:44   ` Michael Brand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALn3zogUkkY6mE9VnAaRK1JmJWuHhzQNXdGP0S9GAkOej4N6AQ@mail.gmail.com \
    --to=michael.ch.brand@gmail.com \
    --cc=13466@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.