From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Brand Newsgroups: gmane.emacs.bugs Subject: bug#13466: find-file-noselect scrolls current buffer Date: Wed, 16 Jan 2013 19:27:56 +0100 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1358364333 20522 80.91.229.3 (16 Jan 2013 19:25:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Jan 2013 19:25:33 +0000 (UTC) To: 13466@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 16 20:25:51 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TvYcO-00036D-Pr for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Jan 2013 20:25:49 +0100 Original-Received: from localhost ([::1]:47907 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvYc8-0001FI-AS for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Jan 2013 14:25:32 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:55327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvYc4-0001CM-FD for bug-gnu-emacs@gnu.org; Wed, 16 Jan 2013 14:25:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvYc3-0000A6-2W for bug-gnu-emacs@gnu.org; Wed, 16 Jan 2013 14:25:28 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58389) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvYc2-0000A1-Vd for bug-gnu-emacs@gnu.org; Wed, 16 Jan 2013 14:25:27 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TvYcd-0002lO-2X for bug-gnu-emacs@gnu.org; Wed, 16 Jan 2013 14:26:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Brand Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Jan 2013 19:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 13466 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.135836435210602 (code B ref -1); Wed, 16 Jan 2013 19:26:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Jan 2013 19:25:52 +0000 Original-Received: from localhost ([127.0.0.1]:35620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvYcQ-0002kv-6W for submit@debbugs.gnu.org; Wed, 16 Jan 2013 14:25:51 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:43894) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvYcL-0002kl-Qt for submit@debbugs.gnu.org; Wed, 16 Jan 2013 14:25:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvYbk-000069-3k for submit@debbugs.gnu.org; Wed, 16 Jan 2013 14:25:09 -0500 Original-Received: from lists.gnu.org ([208.118.235.17]:56931) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvYbk-00005l-0b for submit@debbugs.gnu.org; Wed, 16 Jan 2013 14:25:08 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:41864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvXiQ-0008UJ-OD for bug-gnu-emacs@gnu.org; Wed, 16 Jan 2013 13:27:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvXiP-0008TF-Ld for bug-gnu-emacs@gnu.org; Wed, 16 Jan 2013 13:27:58 -0500 Original-Received: from mail-vb0-f41.google.com ([209.85.212.41]:55112) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvXiP-0008T4-H5 for bug-gnu-emacs@gnu.org; Wed, 16 Jan 2013 13:27:57 -0500 Original-Received: by mail-vb0-f41.google.com with SMTP id l22so1665340vbn.28 for ; Wed, 16 Jan 2013 10:27:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=sIHE6t27bnuziLPbR+mjQaQ3NTgaKlPnzoYDYKTEKVE=; b=P/kIonAUcmx1p5iEQWlsHSgznDmD5Jep95XtAJsslvd+RFvY5uMrZ2lQu0Gi5AXOj6 373wBpk/DI9ONqQOM6oht+fLwgjrJTRA2eM9PbMcJJu9bGqFf/7rQIt3xDodD8XoHOKE pI9XEx3pHxFL3ptHG6lJS2IiSKJ7TU6xdR4NHKW00vKtBFzfPbiYUkLpBcLihcKVWf0U 8jr3YxniVIXykuMbXCPeUQuP49pHkpTYP5zYK630tZdmL9otpGsoNFbiDrIvMu/0uGn9 GdlhJxk3uSr6IcNbdvYpD+owyPgzsQelGXN5IfGJ9SyyuHbiFwmiiKmHi25lpnVaOUu3 vVMA== X-Received: by 10.221.10.72 with SMTP id oz8mr2328805vcb.36.1358360876712; Wed, 16 Jan 2013 10:27:56 -0800 (PST) Original-Received: by 10.221.13.202 with HTTP; Wed, 16 Jan 2013 10:27:56 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:69877 Archived-At: 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