From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Le Wang Newsgroups: gmane.emacs.bugs Subject: bug#12401: scroll-preserve-screen-position broken with font height faces Date: Mon, 10 Sep 2012 20:37:06 +0800 Message-ID: References: <83mx0yl4s2.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1347280668 17916 80.91.229.3 (10 Sep 2012 12:37:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Sep 2012 12:37:48 +0000 (UTC) Cc: 12401@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 10 14:37:50 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 1TB3FN-0006DE-Tn for geb-bug-gnu-emacs@m.gmane.org; Mon, 10 Sep 2012 14:37:50 +0200 Original-Received: from localhost ([::1]:36686 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TB3FK-0004Ef-7d for geb-bug-gnu-emacs@m.gmane.org; Mon, 10 Sep 2012 08:37:46 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44102) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TB3FB-0004Dy-QM for bug-gnu-emacs@gnu.org; Mon, 10 Sep 2012 08:37:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TB3F2-0003UB-L6 for bug-gnu-emacs@gnu.org; Mon, 10 Sep 2012 08:37:37 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42016) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TB3F2-0003U1-H7 for bug-gnu-emacs@gnu.org; Mon, 10 Sep 2012 08:37:28 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TB3Fa-0004HI-7W for bug-gnu-emacs@gnu.org; Mon, 10 Sep 2012 08:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Le Wang Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Sep 2012 12:38: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.134728066716420 (code B ref 12401); Mon, 10 Sep 2012 12:38:02 +0000 Original-Received: (at 12401) by debbugs.gnu.org; 10 Sep 2012 12:37:47 +0000 Original-Received: from localhost ([127.0.0.1]:51562 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TB3FK-0004Gl-6Y for submit@debbugs.gnu.org; Mon, 10 Sep 2012 08:37:46 -0400 Original-Received: from mail-qa0-f51.google.com ([209.85.216.51]:63538) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TB3FG-0004Gd-Oi for 12401@debbugs.gnu.org; Mon, 10 Sep 2012 08:37:44 -0400 Original-Received: by qadz3 with SMTP id z3so1141474qad.3 for <12401@debbugs.gnu.org>; Mon, 10 Sep 2012 05:37:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=cnqVOCRx3RylBu6VNjpAtDoajrJ5XhTUlXYzUBdt1qo=; b=k320mujJKmLlNUynOY81Tpx/ifgbzLAlcG4wt9dnFVaStR2UGkfdVzRnW0JlitjGK+ XPHJVQMQzRnv9MovKt/zAY8RYemhhM2CGMtJNy5Smj4RgL8ZZtKGfzkgzoD+ype2PfvN XVts5cYhPeGVzB4ZLdWyYhCj8jgO5dEYK6wngpBPY9cGnyR9c/QgX41/o3UB2sV7Q0YE PcJwk9A5OlQGKb9p3UO+UmXbIoVuk+sAEVwOd43EjcA9C017mwn7b6uTZKjcmJ/0qETG 4TeXSpzQRnXrxXlN/tPoQgv9NXJwqkrtQ91JoX6BIxQEp3mC1Ik78Lq8VNo48jlGRcmA ngGA== Original-Received: by 10.224.177.5 with SMTP id bg5mr15624727qab.40.1347280626596; Mon, 10 Sep 2012 05:37:06 -0700 (PDT) Original-Received: by 10.49.24.211 with HTTP; Mon, 10 Sep 2012 05:37:06 -0700 (PDT) In-Reply-To: <83mx0yl4s2.fsf@gnu.org> 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:64034 Archived-At: Thanks for the quick response, Eli. On Mon, Sep 10, 2012 at 3:23 PM, Eli Zaretskii wrote: > scroll-preserve-screen-position tries to preserve the > _screen_position_ of point, i.e. where you find the cursor, after it > executes one of the scrolling commands. But since arbitrary pixel > coordinates on the screen might in general (in the presence of > variable-size fonts) correspond to one of 2 possible text lines, Emacs > needs to choose where to put the cursor. What exactly do you expect > Emacs to do in such a situation, where it simply _cannot_ keep the > same pixel coordinates? I understand the problem. > IOW, what is the "contract" that you expect Emacs to keep under > 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? Or do you also expect something > from each individual C-v/M-v, and if so, what exactly? The contract should be C-v followed by M-v should bring the point back to the same line. If the max_column after C-v is less than current_column, then either restoring the column as current_column or max_column is acceptable. Although the current behaviour of C-p followed by C-n seems to restore current_column, so that would be more consistent. As a corrolary, if this contract is enforced then N C-v followed by N M-v should also bring point back to the same line. >> For reference this package works just fine with variable height faces: >> http://www.cs.utah.edu/~eeide/emacs/scroll-in-place.el.gz > > I cannot use it, neither in Emacs 24.2 nor in the current trunk code: > it complains about a missing function screen-width. Please provide a > complete recipe for using this package, starting with "emacs -Q", in > Emacs 24.2 or newer, so I could study what it does and how. Sorry about this. It seems the version I use comes from XEmacs and I've made a small fix. I've placed it here: https://gist.github.com/3690403 > For that matter, please also provide all the details collected by > report-emacs-bug, they might be important. The repro steps I've described starts from "emacs -Q". I can still provide this information, if needed though. -- Le