unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* scroll-preserve-screen-position doesn't work in info pages and TeX mode
@ 2008-09-30 22:14 Rodolfo Medina
  2008-10-02 12:57 ` Adrian Robert
  0 siblings, 1 reply; 5+ messages in thread
From: Rodolfo Medina @ 2008-09-30 22:14 UTC (permalink / raw)
  To: emacs-devel

Excuse if I'm applying this list although I'm no developer.  I submitted the
matter to gnu.emacs.help but got no solution, and the problem is somehow
related to Emacs development.

The scroll-preserve-screen-position variable does not work when I'm in TeX mode
with chapters, subchapters and so on, which are displayed with bigger
characters.  Also, it fails in info pages.

When using scroll-in-place.el or pager.el (http://user.it.uu.se/~mic/pager.el),
point stays in place, but then it's the `next-screen-context-lines' variable
that fails.

It seems that it's not possible to make the two things work both.  What I wish
is that several `C-v' followed by the same numbers of `M-v' would put point
back in the same initial text place, but without loosing the
`next-screen-context-lines' mechanism.

Is it possible to achieve this?

Thanks for your attention and for any reply.
Rodolfo





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: scroll-preserve-screen-position doesn't work in info pages and TeX mode
  2008-09-30 22:14 scroll-preserve-screen-position doesn't work in info pages and TeX mode Rodolfo Medina
@ 2008-10-02 12:57 ` Adrian Robert
  2008-10-02 15:58   ` Rodolfo Medina
  0 siblings, 1 reply; 5+ messages in thread
From: Adrian Robert @ 2008-10-02 12:57 UTC (permalink / raw)
  To: emacs-devel

Rodolfo Medina <rodolfo.medina <at> gmail.com> writes:

> It seems that it's not possible to make the two things work both.  What I wish
> is that several `C-v' followed by the same numbers of `M-v' would put point
> back in the same initial text place, but without loosing the
> `next-screen-context-lines' mechanism.
> 
> Is it possible to achieve this?

I posted a modified version of the pager.el functions a while ago:

http://thread.gmane.org/gmane.emacs.devel/98334/focus=98334

Could you give it a try?








^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: scroll-preserve-screen-position doesn't work in info pages and TeX mode
  2008-10-02 12:57 ` Adrian Robert
@ 2008-10-02 15:58   ` Rodolfo Medina
  2008-10-03 19:17     ` Adrian Robert
  0 siblings, 1 reply; 5+ messages in thread
From: Rodolfo Medina @ 2008-10-02 15:58 UTC (permalink / raw)
  To: emacs-devel

Rodolfo Medina <rodolfo.medina <at> gmail.com> writes:

>> It seems that it's not possible to make the two things work both.  What I
>> wish
>> is that several `C-v' followed by the same numbers of `M-v' would put point
>> back in the same initial text place, but without loosing the
>> `next-screen-context-lines' mechanism.
>> 
>> Is it possible to achieve this?



Adrian Robert <Adrian.B.Robert@gmail.com> writes:

> I posted a modified version of the pager.el functions a while ago:
>
> http://thread.gmane.org/gmane.emacs.devel/98334/focus=98334
>
> Could you give it a try?



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.

Bye
Rodolfo





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: scroll-preserve-screen-position doesn't work in info pages and TeX mode
  2008-10-02 15:58   ` Rodolfo Medina
@ 2008-10-03 19:17     ` Adrian Robert
  2008-10-04 20:53       ` Rodolfo Medina
  0 siblings, 1 reply; 5+ messages in thread
From: Adrian Robert @ 2008-10-03 19:17 UTC (permalink / raw)
  To: emacs-devel

Hi,

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

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.

thanks







^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: scroll-preserve-screen-position doesn't work in info pages and TeX mode
  2008-10-03 19:17     ` Adrian Robert
@ 2008-10-04 20:53       ` Rodolfo Medina
  0 siblings, 0 replies; 5+ messages in thread
From: Rodolfo Medina @ 2008-10-04 20:53 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 2799 bytes --]

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 <Adrian.B.Robert@gmail.com> 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




[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: test.tex --]
[-- Type: text/x-tex, Size: 3874 bytes --]

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-10-04 20:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-30 22:14 scroll-preserve-screen-position doesn't work in info pages and TeX mode Rodolfo Medina
2008-10-02 12:57 ` Adrian Robert
2008-10-02 15:58   ` Rodolfo Medina
2008-10-03 19:17     ` Adrian Robert
2008-10-04 20:53       ` Rodolfo Medina

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).