From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#15894: 24.3.50; unwarranted horizontal auto-scrolling Date: Thu, 14 Nov 2013 19:26:37 +0200 Message-ID: <83k3gazygi.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1384450100 1066 80.91.229.3 (14 Nov 2013 17:28:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Nov 2013 17:28:20 +0000 (UTC) Cc: control@debbugs.gnu.org, 15894@debbugs.gnu.org To: Dani Moncayo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 14 18:28:24 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 1Vh0iN-0003q3-4J for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Nov 2013 18:28:23 +0100 Original-Received: from localhost ([::1]:56563 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vh0iM-0001Bg-Of for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Nov 2013 12:28:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vh0iC-00015X-UK for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2013 12:28:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vh0i3-0005xl-Qy for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2013 12:28:12 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38397) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vh0i3-0005xg-NR for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2013 12:28:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Vh0i3-0002il-7X for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2013 12:28:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Nov 2013 17:28:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15894 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15894-submit@debbugs.gnu.org id=B15894.138445002610341 (code B ref 15894); Thu, 14 Nov 2013 17:28:03 +0000 Original-Received: (at 15894) by debbugs.gnu.org; 14 Nov 2013 17:27:06 +0000 Original-Received: from localhost ([127.0.0.1]:52406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vh0h5-0002gd-05 for submit@debbugs.gnu.org; Thu, 14 Nov 2013 12:27:05 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:60099) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vh0h1-0002g2-EM; Thu, 14 Nov 2013 12:27:00 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MW900M00KCOAO00@a-mtaout22.012.net.il>; Thu, 14 Nov 2013 19:26:53 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MW900M1EKGS0LB0@a-mtaout22.012.net.il>; Thu, 14 Nov 2013 19:26:53 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.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:80439 Archived-At: severity 15894 wishlist thanks > Date: Thu, 14 Nov 2013 14:59:09 +0100 > From: Dani Moncayo > > >From "emacs -Q": > 1. M-x toggle-truncate-lines > 2. Visit a file with a single long line (say, about 300 characters) > 3. Move point to the right until horizontal auto-scrolling take > place. (note that now the point is centered horizontally in the > window - ok). > 4. Now move the point a bit to the left, but not too much, so that > horizontal auto-scrolling doesn't happen again, and thereby the point > ends up in a position closer to the left edge of the window. > 5. C-x b C-x b (i.e. display another buffer and then display our buffer > again). > > I observe that the cursor is re-centered horizontally, which IMO is not > TRT. The cursor should be at the same position it was last time I > displayed the buffer (i.e. where I put it). This isn't a bug, but a missing feature. Emacs was never coded to support what you expect. The amount of hscroll is recorded in the window object, so when another buffer is displayed in a window, that information is thrown away and recomputed from scratch. IOW, Emacs does not remember what was the hscroll with which the buffer was last displayed. Patches are welcome to add such a feature.