bug-gnu-emacs
[Top][All Lists]
Advanced

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

Re: the actions of the spacebar differ in GNU Emacs info [bad] and comma


From: Dan Jacobson
Subject: Re: the actions of the spacebar differ in GNU Emacs info [bad] and command line info [good]
Date: Thu, 21 Dec 2000 00:43:52 +0800

> >;I must do
> >(defadvice Info-scroll-up (around jidanni:Info-scroll-up)
> >  "quick hack to demilitarize it."
> >  (scroll-up))
> >; because the work involved trying to make the SPC bar operate like it
> >; does in the command line info program is a lot.  Several functions
> >; would need adjusting in info.el All I want is when at the bottom of
> >; the current page, go to the first menu item on the current page,
> >; like in the command line info.  Don't just jump to the first item
> >; from the first screen before I'm thru reading this screen.  I'm just
> >; saying the SPC bar should behave like it does in view-mode, man-page
> >; mode dired-mode, etc. at least let me page down to the end before
> >; say jumping elsewhere, etc.
> >
> >; I'd better do
> >(defadvice Info-scroll-down (around jidanni:Info-scroll-down)
> >  "quick hack to demilitarize it."
> >  (scroll-down))
> >;as I bet there's a similar problem there.
>
> Here are versions of your advice I just hacked that try to be a little
> more sophisticated about when to let the Info mode commands do their
> thing.  Do they behave closer to the standalone info program?
>
> (defadvice Info-scroll-up (around scroll-up activate)
>   "Don't move into a menu node's subnode."
>   (if (and (pos-visible-in-window-p (point-max))
>    (not (text-property-any (point) (point-max) 'face 'info-node)))
>       ad-do-it
>     (scroll-up)))
>
> (defadvice Info-scroll-down (around scroll-down activate)
>   "Don't move into a menu node's subnode."
>   (if (and (pos-visible-in-window-p (point-min))
>    (not (text-property-any (point-min) (point) 'face 'info-node)))
>       ad-do-it
>     (scroll-down)))
>
No I'm sorry.  Say you go to a lengthy info page, e.g. the first one
of info.
You page down with spacebar. you finally get to the end and then we
see you are taken to the top menu item on the final screenful. I want
to be taken to the top menu item of the entire page, not just the last
screenful.

In the 20.7 GNU Emacs I get to where I want to go, but it happens
before I can read more than one screenful of the current info page
[unless there aren't any menu items in view yet.]

In your version I am allowed to finish reading this page, but I get
taken not to the net logical thing to read as we might get to as
reading a paper manual page by page, but get jolted ahead
unnecessarily.

Indeed what I want from Emacs Towers is hitting the spacebar be the
same as flipping pages in a paper manual, it is in command line info,
but broke in GNU Emacs info, and there are an amazing amount of
functions that would need to be fixed if you look at the .el's, for
such a simple request, so a few more lines added to one of these
'advice' calls might be easier.

Indeed, let's have a look:
(defun Info-scroll-up ()
  "Scroll one screenful forward in Info, considering all nodes as one sequence.
Once you scroll far enough in a node that its menu appears on the screen
but after point, the next scroll moves into its first subnode.

[how dare one make spacebar behave like that?
that's not how spacebar works in standalone info.
Just think if your child read books in this manner,
always jumping ahead before finishing a page...]

[etc etc] looks simple to fix, but...

Wait, I think I fixed it:
(defadvice Info-scroll-up (around jidanni:Info-scroll-up)
  "quick hack to demilitarize it."
  (if (not(pos-visible-in-window-p (point-max)))
      (scroll-up)
    (goto-char (point-min))
    (Info-next-preorder)))
;old fogey me didn't hasen't learned 'faces'yet so didn't add that line.

;didn't take deep look into this one, but at least no worse than the original:
(defadvice Info-scroll-down (around jidanni:Info-scroll-down)
  "quick hack to demilitarize it."
  (if (not(pos-visible-in-window-p (point-min)))
      (scroll-down)
    (goto-char (point-min))
    (Info-last-preorder)))
--
www.geocities.com/jidanni E-mail: restore ".com."  ¿n¤¦¥§
Tel:+886-4-5854780; starting in year 2001: +886-4-25854780





reply via email to

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