From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#12401: scroll-preserve-screen-position broken with font height faces Date: Wed, 12 Sep 2012 10:08:48 +0200 Message-ID: <50504310.8070505@gmx.at> References: <83mx0yl4s2.fsf@gnu.org> <83a9wxlpnc.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1347437374 12413 80.91.229.3 (12 Sep 2012 08:09:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Sep 2012 08:09:34 +0000 (UTC) Cc: 12401@debbugs.gnu.org, l26wang@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 12 10:09:36 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 1TBi0t-0007hE-JP for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Sep 2012 10:09:35 +0200 Original-Received: from localhost ([::1]:39322 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBi0p-0005Kt-Vo for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Sep 2012 04:09:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40233) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBi0i-0005Fi-3H for bug-gnu-emacs@gnu.org; Wed, 12 Sep 2012 04:09:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TBi0c-0001i3-9x for bug-gnu-emacs@gnu.org; Wed, 12 Sep 2012 04:09:24 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46370) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBi0c-0001hs-65 for bug-gnu-emacs@gnu.org; Wed, 12 Sep 2012 04:09:18 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TBi1K-0000z6-MX for bug-gnu-emacs@gnu.org; Wed, 12 Sep 2012 04:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Sep 2012 08:10: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.13474373773729 (code B ref 12401); Wed, 12 Sep 2012 08:10:02 +0000 Original-Received: (at 12401) by debbugs.gnu.org; 12 Sep 2012 08:09:37 +0000 Original-Received: from localhost ([127.0.0.1]:55912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TBi0u-0000y4-T4 for submit@debbugs.gnu.org; Wed, 12 Sep 2012 04:09:37 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:45866) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1TBi0r-0000xv-L2 for 12401@debbugs.gnu.org; Wed, 12 Sep 2012 04:09:35 -0400 Original-Received: (qmail invoked by alias); 12 Sep 2012 08:08:47 -0000 Original-Received: from 62-47-43-31.adsl.highway.telekom.at (EHLO [62.47.43.31]) [62.47.43.31] by mail.gmx.net (mp071) with SMTP; 12 Sep 2012 10:08:47 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19Vc1ozepVVn5oYxiG2FKHrQM/nYlXDvq3lN64k5E EY3oygvfrJ1jN0 In-Reply-To: <83a9wxlpnc.fsf@gnu.org> X-Y-GMX-Trusted: 0 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:64177 Archived-At: >>> 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. Why? > 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. I'm completely happy with the following solution: Whenever, after a sequence of scrolling commands, the original position (that is the position before the sequence started) reappears in a window, move to that position and leave the window start position alone. See also http://lists.gnu.org/archive/html/emacs-devel/2008-02/msg01892.html martin