GNU bug report logs - #12401
scroll-preserve-screen-position broken with font height faces

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Le Wang <l26wang@HIDDEN>; dated Mon, 10 Sep 2012 06:14:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 12401 <at> debbugs.gnu.org:


Received: (at 12401) by debbugs.gnu.org; 12 Sep 2012 17:38:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 12 13:38:47 2012
Received: from localhost ([127.0.0.1]:57449 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TBqtj-0006ax-0D
	for submit <at> debbugs.gnu.org; Wed, 12 Sep 2012 13:38:47 -0400
Received: from mailout-de.gmx.net ([213.165.64.22]:34850)
	by debbugs.gnu.org with smtp (Exim 4.72)
	(envelope-from <rudalics@HIDDEN>) id 1TBqtf-0006ao-E7
	for 12401 <at> debbugs.gnu.org; Wed, 12 Sep 2012 13:38:44 -0400
Received: (qmail invoked by alias); 12 Sep 2012 17:37:55 -0000
Received: from 62-47-58-95.adsl.highway.telekom.at (EHLO [62.47.58.95])
	[62.47.58.95]
	by mail.gmx.net (mp040) with SMTP; 12 Sep 2012 19:37:55 +0200
X-Authenticated: #14592706
X-Provags-ID: V01U2FsdGVkX199Z6E2LlV9I2TQtHl8OPoMa5L7ABteXxLW+dhpeu
	rmys5CVsz4veTV
Message-ID: <5050C87A.1090203@HIDDEN>
Date: Wed, 12 Sep 2012 19:38:02 +0200
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#12401: scroll-preserve-screen-position broken with font	height
	faces
References: <CAM=K+io7LpXt+trfeiKpBuPNwfR7wMkgp9mUCjKsB338MYAwFA@HIDDEN>
	<83mx0yl4s2.fsf@HIDDEN> <jwvr4qahuve.fsf-monnier+emacs@HIDDEN>
	<83a9wxlpnc.fsf@HIDDEN> <50504310.8070505@HIDDEN>
	<83d31rw5j8.fsf@HIDDEN>
In-Reply-To: <83d31rw5j8.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 12401
Cc: 12401 <at> debbugs.gnu.org, monnier@HIDDEN, l26wang@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

 > Because all scroll-preserve-screen-position does is put point on
 > certain window-relative pixel coordinates.  For this to follow a
 > repeatable series of point values, you need the series of window-start
 > positions to be repeatable, too.
 >
 > IOW, if you start with point P1 and window-start W1, and do a C-v
 > followed by M-v, then setting point at the same pixel distance from
 > the left-top window edge will get you back to P1 iff the window-start
 > gets back at W1.

Yes.  Given the constraints of `scroll-preserve-screen-position' I
understand you now.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12401; Package emacs. Full text available.

Message received at 12401 <at> debbugs.gnu.org:


Received: (at 12401) by debbugs.gnu.org; 12 Sep 2012 16:49:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 12 12:49:44 2012
Received: from localhost ([127.0.0.1]:57309 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TBq8G-0005Sg-5F
	for submit <at> debbugs.gnu.org; Wed, 12 Sep 2012 12:49:44 -0400
Received: from mtaout21.012.net.il ([80.179.55.169]:57471)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <eliz@HIDDEN>) id 1TBq8D-0005SY-As
	for 12401 <at> debbugs.gnu.org; Wed, 12 Sep 2012 12:49:43 -0400
Received: from conversion-daemon.a-mtaout21.012.net.il by
	a-mtaout21.012.net.il (HyperSendmail v2007.08) id
	<0MA800H00X6E7U00@HIDDEN> for
	12401 <at> debbugs.gnu.org; Wed, 12 Sep 2012 19:48:48 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il
	(HyperSendmail v2007.08) with ESMTPA id
	<0MA800HP7XDC3F50@HIDDEN>;
	Wed, 12 Sep 2012 19:48:48 +0300 (IDT)
Date: Wed, 12 Sep 2012 19:48:59 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#12401: scroll-preserve-screen-position broken with
	font	height faces
In-reply-to: <50504310.8070505@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: martin rudalics <rudalics@HIDDEN>
Message-id: <83d31rw5j8.fsf@HIDDEN>
References: <CAM=K+io7LpXt+trfeiKpBuPNwfR7wMkgp9mUCjKsB338MYAwFA@HIDDEN>
	<83mx0yl4s2.fsf@HIDDEN> <jwvr4qahuve.fsf-monnier+emacs@HIDDEN>
	<83a9wxlpnc.fsf@HIDDEN> <50504310.8070505@HIDDEN>
X-Spam-Score: -1.2 (-)
X-Debbugs-Envelope-To: 12401
Cc: 12401 <at> debbugs.gnu.org, monnier@HIDDEN, l26wang@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.2 (-)

> Date: Wed, 12 Sep 2012 10:08:48 +0200
> From: martin rudalics <rudalics@HIDDEN>
> CC: Stefan Monnier <monnier@HIDDEN>, 12401 <at> debbugs.gnu.org, 
>  l26wang@HIDDEN
> 
>  >>> 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?

Because all scroll-preserve-screen-position does is put point on
certain window-relative pixel coordinates.  For this to follow a
repeatable series of point values, you need the series of window-start
positions to be repeatable, too.

IOW, if you start with point P1 and window-start W1, and do a C-v
followed by M-v, then setting point at the same pixel distance from
the left-top window edge will get you back to P1 iff the window-start
gets back at W1.

>  > 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

Fine by me.  However, the OP asked if there's an existing feature in
Emacs that can satisfy this need.  After looking into this, my
response was that no, there's no such a feature.  (The fact that
setting scroll-preserve-screen-position is documented in the manual as
providing this feature is, I suspect, a remnant from the old display
engine that only supported fixed fonts.)

The solution you propose, and another one implemented in
scroll-in-place.el, is OK, and indeed this is better done in Lisp than
in C.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12401; Package emacs. Full text available.

Message received at 12401 <at> debbugs.gnu.org:


Received: (at 12401) by debbugs.gnu.org; 12 Sep 2012 08:09:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 12 04:09:37 2012
Received: from localhost ([127.0.0.1]:55912 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TBi0u-0000y4-T4
	for submit <at> debbugs.gnu.org; Wed, 12 Sep 2012 04:09:37 -0400
Received: from mailout-de.gmx.net ([213.165.64.23]:45866)
	by debbugs.gnu.org with smtp (Exim 4.72)
	(envelope-from <rudalics@HIDDEN>) id 1TBi0r-0000xv-L2
	for 12401 <at> debbugs.gnu.org; Wed, 12 Sep 2012 04:09:35 -0400
Received: (qmail invoked by alias); 12 Sep 2012 08:08:47 -0000
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
Message-ID: <50504310.8070505@HIDDEN>
Date: Wed, 12 Sep 2012 10:08:48 +0200
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#12401: scroll-preserve-screen-position broken with font	height
	faces
References: <CAM=K+io7LpXt+trfeiKpBuPNwfR7wMkgp9mUCjKsB338MYAwFA@HIDDEN>	<83mx0yl4s2.fsf@HIDDEN>
	<jwvr4qahuve.fsf-monnier+emacs@HIDDEN> <83a9wxlpnc.fsf@HIDDEN>
In-Reply-To: <83a9wxlpnc.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 12401
Cc: 12401 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>,
	l26wang@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

 >>> 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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12401; Package emacs. Full text available.

Message received at 12401 <at> debbugs.gnu.org:


Received: (at 12401) by debbugs.gnu.org; 10 Sep 2012 20:43:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 10 16:43:00 2012
Received: from localhost ([127.0.0.1]:52818 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TBAou-0003Il-LC
	for submit <at> debbugs.gnu.org; Mon, 10 Sep 2012 16:43:00 -0400
Received: from chene.dit.umontreal.ca ([132.204.246.20]:44123)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <monnier@HIDDEN>) id 1TBAos-0003Id-JR
	for 12401 <at> debbugs.gnu.org; Mon, 10 Sep 2012 16:42:59 -0400
Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca
	[132.204.27.242])
	by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q8AKgLHd006482; 
	Mon, 10 Sep 2012 16:42:21 -0400
Received: by faina.iro.umontreal.ca (Postfix, from userid 20848)
	id 51213B4085; Mon, 10 Sep 2012 16:42:21 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#12401: scroll-preserve-screen-position broken with font
	height	faces
Message-ID: <jwv7gs1y5jk.fsf-monnier+emacs@HIDDEN>
References: <CAM=K+io7LpXt+trfeiKpBuPNwfR7wMkgp9mUCjKsB338MYAwFA@HIDDEN>
	<83mx0yl4s2.fsf@HIDDEN> <jwvr4qahuve.fsf-monnier+emacs@HIDDEN>
	<83a9wxlpnc.fsf@HIDDEN>
Date: Mon, 10 Sep 2012 16:42:21 -0400
In-Reply-To: <83a9wxlpnc.fsf@HIDDEN> (Eli Zaretskii's message of "Mon, 10 Sep
	2012 21:05:27 +0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -3.9 (---)
X-Debbugs-Envelope-To: 12401
Cc: 12401 <at> debbugs.gnu.org, l26wang@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.9 (---)

>> > 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.

Indeed.

> IOW, this is a limitation of the current design of the
> window-scrolling functions that can only be lifted by redesigning.

Yup,


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12401; Package emacs. Full text available.

Message received at 12401 <at> debbugs.gnu.org:


Received: (at 12401) by debbugs.gnu.org; 10 Sep 2012 18:06:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 10 14:06:25 2012
Received: from localhost ([127.0.0.1]:52700 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TB8NJ-0007Js-03
	for submit <at> debbugs.gnu.org; Mon, 10 Sep 2012 14:06:25 -0400
Received: from mtaout20.012.net.il ([80.179.55.166]:40144)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <eliz@HIDDEN>) id 1TB8NE-0007Jg-8O
	for 12401 <at> debbugs.gnu.org; Mon, 10 Sep 2012 14:06:20 -0400
Received: from conversion-daemon.a-mtaout20.012.net.il by
	a-mtaout20.012.net.il (HyperSendmail v2007.08) id
	<0MA500H00BC78Z00@HIDDEN> for
	12401 <at> debbugs.gnu.org; Mon, 10 Sep 2012 21:05:20 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il
	(HyperSendmail v2007.08) with ESMTPA id
	<0MA500FR0BKWV4R0@HIDDEN>;
	Mon, 10 Sep 2012 21:05:20 +0300 (IDT)
Date: Mon, 10 Sep 2012 21:05:27 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#12401: scroll-preserve-screen-position broken with font
	height	faces
In-reply-to: <jwvr4qahuve.fsf-monnier+emacs@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Stefan Monnier <monnier@HIDDEN>
Message-id: <83a9wxlpnc.fsf@HIDDEN>
References: <CAM=K+io7LpXt+trfeiKpBuPNwfR7wMkgp9mUCjKsB338MYAwFA@HIDDEN>
	<83mx0yl4s2.fsf@HIDDEN> <jwvr4qahuve.fsf-monnier+emacs@HIDDEN>
X-Spam-Score: -1.2 (-)
X-Debbugs-Envelope-To: 12401
Cc: 12401 <at> debbugs.gnu.org, l26wang@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.2 (-)

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: Le Wang <l26wang@HIDDEN>,  12401 <at> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12401; Package emacs. Full text available.

Message received at 12401 <at> debbugs.gnu.org:


Received: (at 12401) by debbugs.gnu.org; 10 Sep 2012 18:02:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 10 14:02:46 2012
Received: from localhost ([127.0.0.1]:52688 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TB8Jm-0007Ec-3u
	for submit <at> debbugs.gnu.org; Mon, 10 Sep 2012 14:02:46 -0400
Received: from mtaout22.012.net.il ([80.179.55.172]:46735)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <eliz@HIDDEN>) id 1TB8Jg-0007EO-8u
	for 12401 <at> debbugs.gnu.org; Mon, 10 Sep 2012 14:02:40 -0400
Received: from conversion-daemon.a-mtaout22.012.net.il by
	a-mtaout22.012.net.il (HyperSendmail v2007.08) id
	<0MA500000BENZW00@HIDDEN> for
	12401 <at> debbugs.gnu.org; Mon, 10 Sep 2012 21:01:58 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il
	(HyperSendmail v2007.08) with ESMTPA id
	<0MA500M9JBF9PFP0@HIDDEN>;
	Mon, 10 Sep 2012 21:01:57 +0300 (IDT)
Date: Mon, 10 Sep 2012 21:02:04 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#12401: scroll-preserve-screen-position broken with font
	height faces
In-reply-to: <CAM=K+ioEoP3+cz2N_pV3K+82jKpjcPmS5y+mDii0GFS6sBLN5w@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Le Wang <l26wang@HIDDEN>
Message-id: <83bohdlpsz.fsf@HIDDEN>
References: <CAM=K+io7LpXt+trfeiKpBuPNwfR7wMkgp9mUCjKsB338MYAwFA@HIDDEN>
	<83mx0yl4s2.fsf@HIDDEN>
	<CAM=K+ioEoP3+cz2N_pV3K+82jKpjcPmS5y+mDii0GFS6sBLN5w@HIDDEN>
X-Spam-Score: -1.2 (-)
X-Debbugs-Envelope-To: 12401
Cc: 12401 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.2 (-)

> Date: Mon, 10 Sep 2012 20:37:06 +0800
> From: Le Wang <l26wang@HIDDEN>
> Cc: 12401 <at> debbugs.gnu.org
> 
> Thanks for the quick response, Eli.
> 
> On Mon, Sep 10, 2012 at 3:23 PM, Eli Zaretskii <eliz@HIDDEN> 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.

Then that feature is not currently available in Emacs scrolling,
sorry.  scroll-preserve-screen-position simply puts the point at or
near the same screen position after the window is scrolled.  That is
all it does.  The manual says that this returns to the previous point
when you scroll back, but that promise has no basis.  When some faces
are higher than the default font, the way Emacs scrolls windows cannot
make sure you will return to the same place.  It can only work when
all the faces use fonts that are no higher than the default face.

> >> 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

This package uses an entirely different method of scrolling, one that
is based on lines, not pixels.  I wonder how well it works when
(large) images, display strings, invisible text, and other calamities
are present in the buffer.  In any case, using such a method would
mean a thorough rewrite of window-scrolling primitives.  Volunteers
welcome.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12401; Package emacs. Full text available.

Message received at 12401 <at> debbugs.gnu.org:


Received: (at 12401) by debbugs.gnu.org; 10 Sep 2012 13:27:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 10 09:27:21 2012
Received: from localhost ([127.0.0.1]:51657 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TB41I-0007eN-IH
	for submit <at> debbugs.gnu.org; Mon, 10 Sep 2012 09:27:21 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.182]:58248)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <monnier@HIDDEN>) id 1TB41G-0007e9-F8
	for 12401 <at> debbugs.gnu.org; Mon, 10 Sep 2012 09:27:18 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av0EAG6Zu0+4rxAc/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLNBIUGA0kiBwFugmQRAOjM4FYgwU
X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="197958930"
Received: from 184-175-16-28.dsl.teksavvy.com (HELO pastel.home)
	([184.175.16.28])
	by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA;
	10 Sep 2012 09:26:43 -0400
Received: by pastel.home (Postfix, from userid 20848)
	id AA8FB5923B; Mon, 10 Sep 2012 09:26:42 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#12401: scroll-preserve-screen-position broken with font
	height	faces
Message-ID: <jwvr4qahuve.fsf-monnier+emacs@HIDDEN>
References: <CAM=K+io7LpXt+trfeiKpBuPNwfR7wMkgp9mUCjKsB338MYAwFA@HIDDEN>
	<83mx0yl4s2.fsf@HIDDEN>
Date: Mon, 10 Sep 2012 09:26:42 -0400
In-Reply-To: <83mx0yl4s2.fsf@HIDDEN> (Eli Zaretskii's message of "Mon, 10 Sep
	2012 10:23:57 +0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 12401
Cc: 12401 <at> debbugs.gnu.org, Le Wang <l26wang@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

> 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.


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12401; Package emacs. Full text available.

Message received at 12401 <at> debbugs.gnu.org:


Received: (at 12401) by debbugs.gnu.org; 10 Sep 2012 12:37:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 10 08:37:47 2012
Received: from localhost ([127.0.0.1]:51562 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TB3FK-0004Gl-6Y
	for submit <at> debbugs.gnu.org; Mon, 10 Sep 2012 08:37:46 -0400
Received: from mail-qa0-f51.google.com ([209.85.216.51]:63538)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <l26wang@HIDDEN>) id 1TB3FG-0004Gd-Oi
	for 12401 <at> debbugs.gnu.org; Mon, 10 Sep 2012 08:37:44 -0400
Received: by qadz3 with SMTP id z3so1141474qad.3
	for <12401 <at> 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==
MIME-Version: 1.0
Received: by 10.224.177.5 with SMTP id bg5mr15624727qab.40.1347280626596; Mon,
	10 Sep 2012 05:37:06 -0700 (PDT)
Received: by 10.49.24.211 with HTTP; Mon, 10 Sep 2012 05:37:06 -0700 (PDT)
In-Reply-To: <83mx0yl4s2.fsf@HIDDEN>
References: <CAM=K+io7LpXt+trfeiKpBuPNwfR7wMkgp9mUCjKsB338MYAwFA@HIDDEN>
	<83mx0yl4s2.fsf@HIDDEN>
Date: Mon, 10 Sep 2012 20:37:06 +0800
Message-ID: <CAM=K+ioEoP3+cz2N_pV3K+82jKpjcPmS5y+mDii0GFS6sBLN5w@HIDDEN>
Subject: Re: bug#12401: scroll-preserve-screen-position broken with font
	height faces
From: Le Wang <l26wang@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1
X-Spam-Score: -2.6 (--)
X-Debbugs-Envelope-To: 12401
Cc: 12401 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.6 (--)

Thanks for the quick response, Eli.

On Mon, Sep 10, 2012 at 3:23 PM, Eli Zaretskii <eliz@HIDDEN> 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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12401; Package emacs. Full text available.

Message received at 12401 <at> debbugs.gnu.org:


Received: (at 12401) by debbugs.gnu.org; 10 Sep 2012 07:24:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 10 03:24:50 2012
Received: from localhost ([127.0.0.1]:51171 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TAyMT-0004U0-Gd
	for submit <at> debbugs.gnu.org; Mon, 10 Sep 2012 03:24:50 -0400
Received: from mtaout23.012.net.il ([80.179.55.175]:34359)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <eliz@HIDDEN>) id 1TAyMO-0004Tm-Kr
	for 12401 <at> debbugs.gnu.org; Mon, 10 Sep 2012 03:24:48 -0400
Received: from conversion-daemon.a-mtaout23.012.net.il by
	a-mtaout23.012.net.il (HyperSendmail v2007.08) id
	<0MA400100HTRFF00@HIDDEN> for
	12401 <at> debbugs.gnu.org; Mon, 10 Sep 2012 10:23:51 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il
	(HyperSendmail v2007.08) with ESMTPA id
	<0MA40017SHVQ8H50@HIDDEN>;
	Mon, 10 Sep 2012 10:23:51 +0300 (IDT)
Date: Mon, 10 Sep 2012 10:23:57 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#12401: scroll-preserve-screen-position broken with font
	height	faces
In-reply-to: <CAM=K+io7LpXt+trfeiKpBuPNwfR7wMkgp9mUCjKsB338MYAwFA@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Le Wang <l26wang@HIDDEN>
Message-id: <83mx0yl4s2.fsf@HIDDEN>
References: <CAM=K+io7LpXt+trfeiKpBuPNwfR7wMkgp9mUCjKsB338MYAwFA@HIDDEN>
X-Spam-Score: -1.2 (-)
X-Debbugs-Envelope-To: 12401
Cc: 12401 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.2 (-)

> Date: Mon, 10 Sep 2012 14:12:39 +0800
> From: Le Wang <l26wang@HIDDEN>
> 
> with "scroll-preserve-screen-position" set to t, pressing <C-v>, <M-v>
> brings point back to the same buffer position.
> 
> However if I customize a face e.g. font-lock-keyword-face with height
> of 1.3, then this no longer works.  Browsing any emacs-lisp source,
> <C-v>, <M-v> changes line position.

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?

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?

> 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.

For that matter, please also provide all the details collected by
report-emacs-bug, they might be important.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12401; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 10 Sep 2012 06:13:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 10 02:13:18 2012
Received: from localhost ([127.0.0.1]:51105 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TAxFG-0002nm-IN
	for submit <at> debbugs.gnu.org; Mon, 10 Sep 2012 02:13:18 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45430)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <l26wang@HIDDEN>) id 1TAxFE-0002ne-Fi
	for submit <at> debbugs.gnu.org; Mon, 10 Sep 2012 02:13:17 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <l26wang@HIDDEN>) id 1TAxEg-0000Am-Fl
	for submit <at> debbugs.gnu.org; Mon, 10 Sep 2012 02:12:43 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([208.118.235.17]:57058)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <l26wang@HIDDEN>) id 1TAxEg-0000Ai-DE
	for submit <at> debbugs.gnu.org; Mon, 10 Sep 2012 02:12:42 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37304)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <l26wang@HIDDEN>) id 1TAxEf-0003lc-77
	for bug-gnu-emacs@HIDDEN; Mon, 10 Sep 2012 02:12:42 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <l26wang@HIDDEN>) id 1TAxEe-00009t-4L
	for bug-gnu-emacs@HIDDEN; Mon, 10 Sep 2012 02:12:41 -0400
Received: from mail-qa0-f48.google.com ([209.85.216.48]:34332)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <l26wang@HIDDEN>) id 1TAxEd-00009n-VZ
	for bug-gnu-emacs@HIDDEN; Mon, 10 Sep 2012 02:12:40 -0400
Received: by qady1 with SMTP id y1so865230qad.0
	for <bug-gnu-emacs@HIDDEN>; Sun, 09 Sep 2012 23:12:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:date:message-id:subject:from:to:content-type;
	bh=lmkjn+noeKpGp5LeMvm5HKMdClhaxiQyNVxEwIZE+ew=;
	b=ekQgerrXEpNlcZ83hYF3BSYQh5oXtn2VvEjDwjqCnYr/xCwiHePEukTAwkjMsKpfYF
	QlnnSEduZZWPfAkJoNY8D/UYD3BVNAKKQLoh+oQfbYOIpV41H6LjL31BBVtLMvOMFv9z
	Xj973+ZVQXV3skAdoY84qSG5vdPwwv0g+pBCVhi/urWDcl8gfKI1cs30iO+yEgAgksj9
	kfBotFMuFD1kHItR7n6/7nwN5T+ZtwaL1F3iihc5SUXzCKKD5ZhuwR2CWVntrfLAdqBk
	WpQxGrGhxIVaFPcFdjjq+kBbwkDINjP4ZrNiLxQGeybLwcf1w2JFVYv44bq9ixhbfRvw
	LpAg==
MIME-Version: 1.0
Received: by 10.224.52.139 with SMTP id i11mr2326903qag.11.1347257559630; Sun,
	09 Sep 2012 23:12:39 -0700 (PDT)
Received: by 10.49.24.211 with HTTP; Sun, 9 Sep 2012 23:12:39 -0700 (PDT)
Date: Mon, 10 Sep 2012 14:12:39 +0800
Message-ID: <CAM=K+io7LpXt+trfeiKpBuPNwfR7wMkgp9mUCjKsB338MYAwFA@HIDDEN>
Subject: scroll-preserve-screen-position broken with font height faces
From: Le Wang <l26wang@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Content-Type: text/plain; charset=ISO-8859-1
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 208.118.235.17
X-Spam-Score: -6.1 (------)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.1 (------)

with "scroll-preserve-screen-position" set to t, pressing <C-v>, <M-v>
brings point back to the same buffer position.

However if I customize a face e.g. font-lock-keyword-face with height
of 1.3, then this no longer works.  Browsing any emacs-lisp source,
<C-v>, <M-v> changes line position.

For reference this package works just fine with variable height faces:
http://www.cs.utah.edu/~eeide/emacs/scroll-in-place.el.gz

I would like to not load extra packages if this functionality is
already in Emacs though.

-- 
Le




Acknowledgement sent to Le Wang <l26wang@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#12401; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.