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#12401: scroll-preserve-screen-position broken with font height faces Date: Mon, 10 Sep 2012 21:05:27 +0300 Message-ID: <83a9wxlpnc.fsf@gnu.org> References: <83mx0yl4s2.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1347300407 6283 80.91.229.3 (10 Sep 2012 18:06:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Sep 2012 18:06:47 +0000 (UTC) Cc: 12401@debbugs.gnu.org, l26wang@gmail.com To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 10 20:06:48 2012 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 1TB8Ng-0006AL-OF for geb-bug-gnu-emacs@m.gmane.org; Mon, 10 Sep 2012 20:06:44 +0200 Original-Received: from localhost ([::1]:34266 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TB8Nd-0005in-9d for geb-bug-gnu-emacs@m.gmane.org; Mon, 10 Sep 2012 14:06:41 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46545) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TB8NW-0005iB-LE for bug-gnu-emacs@gnu.org; Mon, 10 Sep 2012 14:06:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TB8NP-0001rg-0H for bug-gnu-emacs@gnu.org; Mon, 10 Sep 2012 14:06:34 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43154) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TB8NO-0001rb-SH for bug-gnu-emacs@gnu.org; Mon, 10 Sep 2012 14:06:26 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TB8Ny-0007Kq-6A for bug-gnu-emacs@gnu.org; Mon, 10 Sep 2012 14:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Sep 2012 18:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12401 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12401-submit@debbugs.gnu.org id=B12401.134730038528147 (code B ref 12401); Mon, 10 Sep 2012 18:07:02 +0000 Original-Received: (at 12401) by debbugs.gnu.org; 10 Sep 2012 18:06:25 +0000 Original-Received: from localhost ([127.0.0.1]:52700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TB8NJ-0007Js-03 for submit@debbugs.gnu.org; Mon, 10 Sep 2012 14:06:25 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:40144) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TB8NE-0007Jg-8O for 12401@debbugs.gnu.org; Mon, 10 Sep 2012 14:06:20 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MA500H00BC78Z00@a-mtaout20.012.net.il> for 12401@debbugs.gnu.org; Mon, 10 Sep 2012 21:05:20 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MA500FR0BKWV4R0@a-mtaout20.012.net.il>; Mon, 10 Sep 2012 21:05:20 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il 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 (newer, 2) 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:64068 Archived-At: > From: Stefan Monnier > Cc: Le Wang , 12401@debbugs.gnu.org > Date: Mon, 10 Sep 2012 09:26:42 -0400 > > > scroll-preserve-screen-position? Is it just that doing N C-v's > > followed by N M-v's brings point to the same location where it was > > before this sequence of 2N commands? > > I think this should be the main point, yes. For this to work, we would need to make sure that C-v followed by M-v end up with a window that has the same window-start as the one before C-v. But this is impossible to ensure with the way we compute window-start, because the move_it family of functions used for that can only move forward; therefore moving back is necessarily implemented differently, and the results differ when variable-size fonts are present. IOW, this is a limitation of the current design of the window-scrolling functions that can only be lifted by redesigning.