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

Patch for Gnus scrolling issues



I have had issues with Gnus reading too little or too much. I think that
this patch solves them:
1. Patches emacspeak-gnus-speak-article-body to use the dimensions of
the window containing the article buffer.

2. patches gnus-summary-prev-page and gnus-summary-next-page to use move-to-window-line instead of
forward-line and window-height in order to avoid reading too much due to the mode line being included in window-height.

3. Does the same to gnus-summary-kill-same-subject-and-select.

Index: emacspeak-gnus.el
===================================================================
--- emacspeak-gnus.el	(revision 5939)
+++ emacspeak-gnus.el	(working copy)
@@ -155,13 +155,16 @@
     (emacspeak-dtk-sync)
     (cond
      ((< (count-lines (point-min) (point-max))
-         emacspeak-gnus-large-article)
+	 emacspeak-gnus-large-article)
       (emacspeak-speak-buffer  ))
      (t (emacspeak-auditory-icon 'large-movement )
-        (let ((start (point)))
-          (move-to-window-line -1)
-          (end-of-line)
-          (emacspeak-speak-region start (point)))))))
+	(let ((start (point))
+	      (window (get-buffer-window (current-buffer))))
+	  (with-selected-window window
+	    (save-excursion
+	      (move-to-window-line -1)
+	      (end-of-line)
+	      (emacspeak-speak-region start (point)))))))))
 
 ;;}}}
 ;;{{{ Advise top-level gnus command
@@ -648,8 +651,11 @@
       (emacspeak-dtk-sync)
       (let ((start  (point ))
             (window (get-buffer-window (current-buffer ))))
-        (forward-line (window-height window))
-        (emacspeak-speak-region start (point ))))))
+        (with-selected-window window
+	  (save-excursion
+	   (move-to-window-line -1)
+	   (end-of-line)
+	   (emacspeak-speak-region start (point ))))))))
 
 (defadvice gnus-summary-kill-same-subject (after emacspeak pre act)
   "Speak the line.
@@ -726,8 +732,11 @@
     (set-buffer  "*Article*")
     (let ((start  (point ))
           (window (get-buffer-window (current-buffer ))))
-      (forward-line (window-height window))
-      (emacspeak-speak-region start (point )))))
+      (with-selected-window window
+	(save-excursion
+	  (move-to-window-line -1)
+	  (end-of-line)
+	  (emacspeak-speak-region start (point )))))))
 
 (defadvice gnus-summary-prev-page (after emacspeak pre act)
   "Speak the previous  pageful "
@@ -737,8 +746,11 @@
     (set-buffer  "*Article*")
     (let ((start  (point ))
           (window (get-buffer-window (current-buffer ))))
-      (forward-line (-  (window-height window)))
-      (emacspeak-speak-region start (point )))))
+      (with-selected-window window
+	(save-excursion
+	  (move-to-window-line -1)
+	  (end-of-line)
+	  (emacspeak-speak-region start (point )))))))
 
 (defadvice gnus-summary-beginning-of-article (after emacspeak pre act)
   "Speak the first line. "(save-excursion

-----------------------------------------------------------------------------
To unsubscribe from the emacspeak list or change your address on the
emacspeak list send mail to "emacspeak-request@xxxxxxxxxxx" with a
subject of "unsubscribe" or "help"



If you have questions about this archive or had problems using it, please send mail to:

priestdo@xxxxxxxxxxx No Soliciting!

Emacspeak List Archive | 2007 | 2006 | 2005 | 2004 | 2003 | 2002 | 2001 | 2000 | 1999 | 1998 | Pre 1998

Emacspeak Files | Emacspeak Blog