From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#13466: find-file-noselect scrolls current buffer Date: Wed, 16 Jan 2013 18:10:22 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1358377890 18587 80.91.229.3 (16 Jan 2013 23:11:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Jan 2013 23:11:30 +0000 (UTC) Cc: 13466@debbugs.gnu.org To: Michael Brand Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 17 00:11:48 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 1Tvc94-0006zm-Aq for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Jan 2013 00:11:46 +0100 Original-Received: from localhost ([::1]:52185 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tvc8n-0001s7-CV for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Jan 2013 18:11:29 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:48167) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tvc8k-0001s2-In for bug-gnu-emacs@gnu.org; Wed, 16 Jan 2013 18:11:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tvc8j-00050j-Hb for bug-gnu-emacs@gnu.org; Wed, 16 Jan 2013 18:11:26 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58556) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tvc8j-00050a-EI for bug-gnu-emacs@gnu.org; Wed, 16 Jan 2013 18:11:25 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Tvc9K-0002e9-E0 for bug-gnu-emacs@gnu.org; Wed, 16 Jan 2013 18:12:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Jan 2013 23:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13466 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13466-submit@debbugs.gnu.org id=B13466.135837786510095 (code B ref 13466); Wed, 16 Jan 2013 23:12:02 +0000 Original-Received: (at 13466) by debbugs.gnu.org; 16 Jan 2013 23:11:05 +0000 Original-Received: from localhost ([127.0.0.1]:35786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tvc8O-0002cl-FW for submit@debbugs.gnu.org; Wed, 16 Jan 2013 18:11:04 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:19251) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tvc8M-0002cQ-Dj for 13466@debbugs.gnu.org; Wed, 16 Jan 2013 18:11:02 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtkGAG6Zu09FpZpV/2dsb2JhbABEgXuyFoEIghYBBVYjEAs0EhQYDSSIIboJkEQDiEKacYFYgwc X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="212738228" Original-Received: from 69-165-154-85.dsl.teksavvy.com (HELO pastel.home) ([69.165.154.85]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 16 Jan 2013 18:10:23 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 7855B59537; Wed, 16 Jan 2013 18:10:23 -0500 (EST) In-Reply-To: (Michael Brand's message of "Wed, 16 Jan 2013 19:27:56 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) 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:69885 Archived-At: > $ 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