From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rodolfo Medina Newsgroups: gmane.emacs.devel Subject: Re: scroll-preserve-screen-position doesn't work in info pages and TeX mode Date: Sat, 04 Oct 2008 21:53:23 +0100 Message-ID: <87prmgxet8.fsf@gmail.com> References: <87bpy5nuvy.fsf@gmail.com> <87r66zng45.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1223150020 16987 80.91.229.12 (4 Oct 2008 19:53:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Oct 2008 19:53:40 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 04 21:54:32 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KmDCx-0003pI-4a for ged-emacs-devel@m.gmane.org; Sat, 04 Oct 2008 21:54:31 +0200 Original-Received: from localhost ([127.0.0.1]:60044 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KmDBt-0003qG-TI for ged-emacs-devel@m.gmane.org; Sat, 04 Oct 2008 15:53:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KmDBq-0003pk-11 for emacs-devel@gnu.org; Sat, 04 Oct 2008 15:53:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KmDBl-0003nt-49 for emacs-devel@gnu.org; Sat, 04 Oct 2008 15:53:21 -0400 Original-Received: from [199.232.76.173] (port=52243 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KmDBl-0003nq-1Q for emacs-devel@gnu.org; Sat, 04 Oct 2008 15:53:17 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:33553 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KmDBk-0007Zx-A6 for emacs-devel@gnu.org; Sat, 04 Oct 2008 15:53:16 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KmDBd-0004oN-Dh for emacs-devel@gnu.org; Sat, 04 Oct 2008 19:53:09 +0000 Original-Received: from 151.80.134.46 ([151.80.134.46]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 04 Oct 2008 19:53:09 +0000 Original-Received: from rodolfo.medina by 151.80.134.46 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 04 Oct 2008 19:53:09 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 217 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 151.80.134.46 User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:R7VTCNaM0EcF28wzFoa+aP91CoU= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:104343 Archived-At: --=-=-= Rodolfo Medina wrote: >> Also with your modified version, such as with the original one, we leave >> point >> in the same place after C-v and M-v, but we lose the >> `next-screen-context-lines' property in TeX mode and info buffers (and maybe >> also in buffers with very long lines, longer than screen width). The same >> happens with scroll-in-place.el. >> >> I find it strange that noone apparently seems to have arose the problem and >> fixed it. Adrian Robert writes: > Could you describe a bit more clearly what the problem with > next-screen-context-lines is? Is there any way to reproduce > it without having a TEX file with certain contents at hand? > From a -Q emacs? > I'm puzzled what the issue is because the lisp code I posted > (and maybe the original pager.el) appear to explicitly take the > next-screen-context-lines variable into account. The problem is probably related to the use of the `window-height' variable in pager.el macros, that measures the window height in regular lines, not in actual lines. The use of `window-height' should be avoided in such macros. In its place, something different should be used. Suppose you do five times `C-v' and then five times `M-v'. At any `C-v', the *actual* number of lines scrolled should be stored somewhere: the first C-v scrolled screen 31 lines forward the second C-v scrolled screen 31 lines forward the third C-v scrolled screen 33 lines forward the fourth C-v scrolled screen 32 lines forward the fifth C-v scrolled screen 31 lines forward . So, any M-v should scroll screen back by the same number of lines of its correspondent C-v: the first M-v must scroll screen 31 lines backward the second M-v must scroll screen 31 lines backward the third M-v must scroll screen 33 lines backward the fourth M-v must scroll screen 32 lines backward the fifth M-v must scroll screen 31 lines backward To reproduce the problem you have to have auctex installed in your system. Once auctex is installed, load it putting the following line in .emacs: (load "auctex.el" nil t t) and restart Emacs. Open the file test.tex that I'm attaching and do `C-v'. If pager.el is *not* installed, you will see now on the first line the verse: Is this a holiday? What! know you not, ; instead, if pager.el is installed, you will see on the first line the verse: Where is thy leather apron and thy rule? . So, with pager.el installed 7 lines will have disappeared from your screen. Please let me know if you can't reproduce the problem and I'll try some other way to reproduce it. I hope the problem will be solved. Thanks for your attention. Bye Rodolfo --=-=-= Content-Type: text/x-tex Content-Disposition: inline; filename=test.tex \chapter{William Shakespeare: Julius Caesar ACT I. SCENE I. Rome. A street. [Enter Flavius, Marullus, and a Throng of Citizens.] FLAVIUS. Hence! home, you idle creatures, get you home! Is this a holiday? What! know you not, Being mechanical, you ought not walk Upon a laboring day without the sign Of your profession?--Speak, what trade art thou? } William Shakespeare: Julius Caesar ACT I. SCENE I. Rome. A street. [Enter Flavius, Marullus, and a Throng of Citizens.] FLAVIUS. Hence! home, you idle creatures, get you home! Is this a holiday? What! know you not, Being mechanical, you ought not walk Upon a laboring day without the sign Of your profession?--Speak, what trade art thou? FIRST CITIZEN. Why, sir, a carpenter. MARULLUS. Where is thy leather apron and thy rule? What dost thou with thy best apparel on?-- You, sir; what trade are you? SECOND CITIZEN. Truly, sir, in respect of a fine workman, I am but, as you would say, a cobbler. MARULLUS. But what trade art thou? Answer me directly. SECOND CITIZEN. A trade, sir, that, I hope, I may use with a safe conscience, which is indeed, sir, a mender of bad soles. MARULLUS. What trade, thou knave? Thou naughty knave, what trade? SECOND CITIZEN. Nay, I beseech you, sir, be not out with me; yet, if you be out, sir, I can mend you. MARULLUS. What mean'st thou by that? Mend me, thou saucy fellow! SECOND CITIZEN. Why, sir, cobble you. FLAVIUS. Thou art a cobbler, art thou? SECOND CITIZEN. Truly, Sir, all that I live by is with the awl; I meddle with no tradesman's matters, nor women's matters, but with awl. I am indeed, sir, a surgeon to old shoes; when they are in great danger, I re-cover them. As proper men as ever trod upon neat's-leather have gone upon my handiwork. FLAVIUS. But wherefore art not in thy shop today? Why dost thou lead these men about the streets? SECOND CITIZEN. Truly, sir, to wear out their shoes to get myself into more work. But indeed, sir, we make holiday to see Caesar and to rejoice in his triumph. MARULLUS. Wherefore rejoice? What conquest brings he home? What tributaries follow him to Rome, To grace in captive bonds his chariot wheels? You blocks, you stones, you worse than senseless things! O you hard hearts, you cruel men of Rome, Knew you not Pompey? Many a time and oft Have you climb'd up to walls and battlements, To towers and windows, yea, to chimney tops, Your infants in your arms, and there have sat The livelong day with patient expectation To see great Pompey pass the streets of Rome. And when you saw his chariot but appear, Have you not made an universal shout That Tiber trembled underneath her banks To hear the replication of your sounds Made in her concave shores? And do you now put on your best attire? And do you now cull out a holiday? And do you now strew flowers in his way That comes in triumph over Pompey's blood? Be gone! Run to your houses, fall upon your knees, Pray to the gods to intermit the plague That needs must light on this ingratitude. FLAVIUS. Go, go, good countrymen, and, for this fault, Assemble all the poor men of your sort, Draw them to Tiber banks, and weep your tears Into the channel, till the lowest stream Do kiss the most exalted shores of all. [Exeunt CITIZENS.] See whether their basest metal be not moved; They vanish tongue-tied in their guiltiness. Go you down that way towards the Capitol; This way will I. Disrobe the images, If you do find them deck'd with ceremonies. MARULLUS. May we do so? You know it is the feast of Lupercal. FLAVIUS. It is no matter; let no images Be hung with Caesar's trophies. I'll about And drive away the vulgar from the streets; So do you too, where you perceive them thick. These growing feathers pluck'd from Caesar's wing Will make him fly an ordinary pitch, Who else would soar above the view of men, And keep us all in servile fearfulness. [Exeunt.] --=-=-=--