unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* View-scroll-page-forward baby steps not grown out of
@ 2004-09-27 20:28 Dan Jacobson
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Jacobson @ 2004-09-27 20:28 UTC (permalink / raw)


Gentlemen, is View-scroll-page-forward still unaware of window size
changes or whatever, in the latest emacs version?

$ mkdir 8; cd 8
$ seq 222 > 222
$ # Does this:
$ emacs --no-site-file -nw -q .
C-x 2 v C-x 1 SPC SPC SPC SPC
$ # still only scroll half as far per spacebar press as this?:
$ emacs --no-site-file -nw -q .
v SPC SPC SPC SPC

Maybe we are still supposed to hit "w". If so say so in
View-scroll-page-forward's doc string.  But by default scroll length
should be dynamic, and not arbitrarily set at one point in time and
then frozen.

scroll-up (C-v) can handle the change, but not View-scroll-page-forward.
emacs-version's value is "21.3.1"

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

* Re: View-scroll-page-forward baby steps not grown out of
       [not found] <mailman.123.1096398222.2017.bug-gnu-emacs@gnu.org>
@ 2004-09-28 21:39 ` Miles Bader
  0 siblings, 0 replies; 3+ messages in thread
From: Miles Bader @ 2004-09-28 21:39 UTC (permalink / raw)
  Cc: bug-gnu-emacs

Dan Jacobson <jidanni@jidanni.org> writes:
> Gentlemen, is View-scroll-page-forward still unaware of window size
> changes or whatever, in the latest emacs version?

view-mode acts quite bizarrely in this sense: it uses the size of the
entire frame as the size for scrolling, regardless of how large the
window you are in is.  I think this behavior is absurd.  However the
last time I complained about it, the author argued vociferously that it
was a `feature'; I can't really recall his justification.

-Miles
-- 
.Numeric stability is probably not all that important when you're guessing.

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

* Re: View-scroll-page-forward baby steps not grown out of
@ 2004-09-29 21:03 Dan Jacobson
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Jacobson @ 2004-09-29 21:03 UTC (permalink / raw)


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

RMS> Does this patch fix it?
Probably, but on Debian we don't have as new an emacs to patch and
test against.  I'll post it so the pros can examine it.


[-- Attachment #2: Type: message/rfc822, Size: 3756 bytes --]


***************
*** 117,128 ****
  
  (defvar view-page-size nil
    "Default number of lines to scroll by View page commands.
! If nil then the local value of this is initially set to window size.")
  (make-variable-buffer-local 'view-page-size)
  
  (defvar view-half-page-size nil
    "Default number of lines to scroll by View half page commands.
! If nil then the local value of this is initially set to half window size.")
  (make-variable-buffer-local 'view-half-page-size)
  
  (defvar view-last-regexp nil)
--- 117,128 ----
  
  (defvar view-page-size nil
    "Default number of lines to scroll by View page commands.
! If nil that means use the window size.")
  (make-variable-buffer-local 'view-page-size)
  
  (defvar view-half-page-size nil
    "Default number of lines to scroll by View half page commands.
! If nil that means use half the window size.")
  (make-variable-buffer-local 'view-half-page-size)
  
  (defvar view-last-regexp nil)
***************
*** 453,460 ****
    ;; This is to guarantee that the buffer-read-only variable is restored.
    (add-hook 'change-major-mode-hook 'view-mode-disable nil t)
    (setq view-mode t
! 	view-page-size (view-page-size-default view-page-size)
! 	view-half-page-size (or view-half-page-size (/ (view-window-size) 2))
  	view-old-buffer-read-only buffer-read-only
  	buffer-read-only t
  	view-old-Helper-return-blurb (and (boundp 'Helper-return-blurb)
--- 453,460 ----
    ;; This is to guarantee that the buffer-read-only variable is restored.
    (add-hook 'change-major-mode-hook 'view-mode-disable nil t)
    (setq view-mode t
! 	view-page-size nil
! 	view-half-page-size nil
  	view-old-buffer-read-only buffer-read-only
  	buffer-read-only t
  	view-old-Helper-return-blurb (and (boundp 'Helper-return-blurb)
***************
*** 675,681 ****
  
  (defun view-set-half-page-size-default (lines)
    ;; Get and maybe set half page size.
!   (if (not lines) view-half-page-size
      (setq view-half-page-size
  	  (if (zerop (setq lines (prefix-numeric-value lines)))
  	      (/ (view-window-size) 2)
--- 675,682 ----
  
  (defun view-set-half-page-size-default (lines)
    ;; Get and maybe set half page size.
!   (if (not lines) (or view-half-page-size
! 		      (/ (view-window-size) 2))
      (setq view-half-page-size
  	  (if (zerop (setq lines (prefix-numeric-value lines)))
  	      (/ (view-window-size) 2)
***************
*** 803,815 ****
  \\[View-scroll-page-backward-set-page-size].
  If LINES is more than a window-full, only the last window-full is shown."
    (interactive "P")
!   (view-scroll-lines lines nil view-page-size nil))
  
  (defun View-scroll-page-backward (&optional lines)
    "Scroll \"page size\" or prefix LINES lines backward in View mode.
  See also `View-scroll-page-forward'."
    (interactive "P")
!   (view-scroll-lines lines t view-page-size nil))
  
  (defun View-scroll-page-forward-set-page-size (&optional lines)
    "Scroll forward LINES lines in View mode, setting the \"page size\".
--- 804,816 ----
  \\[View-scroll-page-backward-set-page-size].
  If LINES is more than a window-full, only the last window-full is shown."
    (interactive "P")
!   (view-scroll-lines lines nil (view-page-size-default view-page-size) nil))
  
  (defun View-scroll-page-backward (&optional lines)
    "Scroll \"page size\" or prefix LINES lines backward in View mode.
  See also `View-scroll-page-forward'."
    (interactive "P")
!   (view-scroll-lines lines t (view-page-size-default view-page-size) nil))
  
  (defun View-scroll-page-forward-set-page-size (&optional lines)
    "Scroll forward LINES lines in View mode, setting the \"page size\".
MIME-Version: 1.0


[-- Attachment #3: Type: text/plain, Size: 149 bytes --]

_______________________________________________
Bug-gnu-emacs mailing list
Bug-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs

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

end of thread, other threads:[~2004-09-29 21:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-27 20:28 View-scroll-page-forward baby steps not grown out of Dan Jacobson
     [not found] <mailman.123.1096398222.2017.bug-gnu-emacs@gnu.org>
2004-09-28 21:39 ` Miles Bader
  -- strict thread matches above, loose matches on Subject: below --
2004-09-29 21:03 Dan Jacobson

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