emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scroll-preserve-screen-position doesn't work in info pages and TeX m


From: Rodolfo Medina
Subject: Re: scroll-preserve-screen-position doesn't work in info pages and TeX mode
Date: Sat, 04 Oct 2008 21:53:23 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.0.50 (gnu/linux)

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 <address@hidden> 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



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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]