Gnus development mailing list
 help / color / mirror / Atom feed
* *Group* last line behavior
@ 2003-02-24  0:07 Martin Thornquist
  2003-02-24  3:26 ` Jesper Harder
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Martin Thornquist @ 2003-02-24  0:07 UTC (permalink / raw)


Something that has bugged me for a while is that RET on the last
(empty) line in *Group* signals an error, while the same in *Summary*
selects the last article. So I fixed it. The following patches gives
*Group* (what I think is) consistent behavior with *Summary*, both in
topic and non-topic view. I have been using these patches for about a
week now without discovering any unforeseen consequences, but there
could of course always be some.

This is little enough not to require paperwork if included in Gnus,
right?


Index: lisp/gnus-group.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-group.el,v
retrieving revision 6.101
diff -u -r6.101 gnus-group.el
--- lisp/gnus-group.el	14 Feb 2003 20:28:13 -0000	6.101
+++ lisp/gnus-group.el	24 Feb 2003 00:20:51 -0000
@@ -1876,6 +1876,9 @@
 If ALL is non-nil, already read articles become readable.
 If ALL is a number, fetch this number of articles."
   (interactive "P")
+  (when (and (= (point) (point-max))
+	     (not (gnus-group-group-name)))
+    (forward-line -1))
   (gnus-group-read-group all t))
 
 (defun gnus-group-quick-select-group (&optional all)


Index: lisp/gnus-topic.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-topic.el,v
retrieving revision 6.36
diff -u -r6.36 gnus-topic.el
--- lisp/gnus-topic.el	19 Feb 2003 23:45:34 -0000	6.36
+++ lisp/gnus-topic.el	24 Feb 2003 00:21:17 -0000
@@ -1180,7 +1180,10 @@
 
 If performed over a topic line, toggle folding the topic."
   (interactive "P")
-  (if (gnus-group-topic-p)
+  (when (and (= (point) (point-max))
+	     (not (gnus-group-group-name)))
+    (forward-line -1))
+ (if (gnus-group-topic-p)
       (let ((gnus-group-list-mode
 	     (if all (cons (if (numberp all) all 7) t) gnus-group-list-mode)))
 	(gnus-topic-fold all)


Martin
-- 
"An ideal world is left as an exercise to the reader."
                                                 -Paul Graham, On Lisp




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

* Re: *Group* last line behavior
  2003-02-24  0:07 *Group* last line behavior Martin Thornquist
@ 2003-02-24  3:26 ` Jesper Harder
  2003-02-24 13:54 ` Kai Großjohann
  2003-02-24 21:54 ` Lars Magne Ingebrigtsen
  2 siblings, 0 replies; 4+ messages in thread
From: Jesper Harder @ 2003-02-24  3:26 UTC (permalink / raw)


Martin Thornquist <martint@ifi.uio.no> writes:

> Something that has bugged me for a while is that RET on the last
> (empty) line in *Group* signals an error

Nice.

> +  (when (and (= (point) (point-max))

Note that 

     (= (point) (point-max))

can be written more succintly as just `(eobp)' -- "end of buffer point".



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

* Re: *Group* last line behavior
  2003-02-24  0:07 *Group* last line behavior Martin Thornquist
  2003-02-24  3:26 ` Jesper Harder
@ 2003-02-24 13:54 ` Kai Großjohann
  2003-02-24 21:54 ` Lars Magne Ingebrigtsen
  2 siblings, 0 replies; 4+ messages in thread
From: Kai Großjohann @ 2003-02-24 13:54 UTC (permalink / raw)


Applied (with Jesper's suggestion).
-- 
A preposition is not a good thing to end a sentence with.



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

* Re: *Group* last line behavior
  2003-02-24  0:07 *Group* last line behavior Martin Thornquist
  2003-02-24  3:26 ` Jesper Harder
  2003-02-24 13:54 ` Kai Großjohann
@ 2003-02-24 21:54 ` Lars Magne Ingebrigtsen
  2 siblings, 0 replies; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-02-24 21:54 UTC (permalink / raw)


Martin Thornquist <martint@ifi.uio.no> writes:

> Something that has bugged me for a while is that RET on the last
> (empty) line in *Group* signals an error, while the same in *Summary*
> selects the last article. So I fixed it. The following patches gives
> *Group* (what I think is) consistent behavior with *Summary*, both in
> topic and non-topic view. I have been using these patches for about a
> week now without discovering any unforeseen consequences, but there
> could of course always be some.

The difference between the group buffer and the summary buffer is
that there are commands that can be done on the last (blank) line of
the group buffer, but can't be done on the last (blank) line of the
summary buffer.

`C-y', `C-k', etc.

Therefore other commands on the last line of the group buffer work
(and should work) differently than commands on the last line of the
summary buffer.

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



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

end of thread, other threads:[~2003-02-24 21:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-24  0:07 *Group* last line behavior Martin Thornquist
2003-02-24  3:26 ` Jesper Harder
2003-02-24 13:54 ` Kai Großjohann
2003-02-24 21:54 ` Lars Magne Ingebrigtsen

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 NNTP newsgroup(s).