Article View: gnu.epoch.misc
Article #1868Problem with vertical-motion
From: Paul Fuqua
Date: Sun, 09 Jun 1991 19:06
Date: Sun, 09 Jun 1991 19:06
57 lines
3364 bytes
3364 bytes
I've just built Epoch 3.2beta, and I like it enough to keep it.
From reading gnu.epoch.misc, I gather that 3.2 is now released and there
are two patches. Two questions: how do I get it and does it fix a
problem I'm having?
I know I can FTP to cs.uiuc.edu, but I need to know the directory
and filenames, because I have to FTP by proxy and they won't look around
for me. (Somebody else had FTP'd the beta version.)
The problem I'm having is with vertical-motion. In GNUS, I use a
little hack lifted from gnus-user-tale (included below) to make the
percentage indicator relative to the bottom of the window instead of the
top. In Epoch, the vertical-motion call returns the correct number of
lines, but apparently only moves point one line. Can anyone tell me if
the latest version fixes the problem, or suggest a different approach?
Thanks.
Paul Fuqua pf@csc.ti.com, ti-csl!pf
Texas Instruments Computer Science Center, Dallas, Texas
"Hey, Joey! Come look! Erica's about to give blood!" -- AMC
;; From gnus-user-tale.el.
(defun gnus-Article-set-percent (&optional new-article)
"Set gnus-Article-head-to-window-bottom as a string which represents the
percentage of total Article lines that are before the bottom of the window.
Also forces mode-line update. Optional NEW-ARTICLE is necessary when a new
article is selected."
(save-excursion
(save-restriction
(setq gnus-Article-head-to-window-bottom
(if new-article
(progn
(select-window (get-buffer-window gnus-Article-buffer))
(vertical-motion (- (screen-height)
(window-height
(get-buffer-window gnus-Subject-buffer))
3))
;; The next bit is in case the last real line is
;; (will be) visible on the screen.
(move-to-column (- (screen-width) 3))
(if (not (eobp)) (forward-char 1))
;; Might only be at end-of-page
(widen)
(if (eobp) "All"
(concat (/ (* 100 (count-lines (point-min) (point)))
(count-lines (point-min) (point-max))) "%")))
(move-to-window-line (- (window-height) 2))
;; Same deal as above
(move-to-column (- (window-width) 3))
(if (not (eobp)) (forward-char 1))
;; Might only be at end-of-page
(widen)
(if (eobp) "Bottom"
(concat (/ (* 100 (count-lines (point-min) (point)))
(count-lines (point-min) (point-max))) "%"))))))
(set-buffer-modified-p t))
Technical Details
Message-ID:
<2885483214-5119808@Islington-Terrace>Path:
arc1-ca.pugleaf.net!gmdzi!unido!math.fu-berlin.de!ira.uka.de!sol.ctr.columbia.edu!lll-winken!uwm.edu!linac!att!rutgers!tut.cis.ohio-state.edu!unreplyable!garbageShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc7ee,8a362f1f0b6ff594,start X-Google-Attributes: gidfc7ee,public X-Google-ArrivalTime: 1991-06-09 22:21:06 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!math.fu-berlin.de!ira.uka.de!sol.ctr.columbia.edu!lll-winken!uwm.edu!linac!att!rutgers!tut.cis.ohio-state.edu!unreplyable!garbage From: pf@islington-terrace.csc.ti.com (Paul Fuqua) Newsgroups: gnu.epoch.misc Subject: Problem with vertical-motion Message-ID: <2885483214-5119808@Islington-Terrace> Date: 9 Jun 91 19:06:54 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 57