Gnus development mailing list
 help / color / mirror / Atom feed
* [PATCH] cvs 2005-10-29 gnus-sum.el::gnus-article-sort-by-date-reverse (NEW)
@ 2005-10-29  8:05 Jari Aalto
  2006-04-13  8:01 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Jari Aalto @ 2005-10-29  8:05 UTC (permalink / raw)



To put newest articles first is quite common for RSS feeds, so I though this
function would come handy. Then you can simply do this inside
`gnus-summary-mode-hook' for certain groups. 

    (setq 'gnus-article-sort-functions 'gnus-article-sort-by-date-reverse)

I'll send patch for gnus.texi in separate mail.

- - - - - - - - - - - - - - - - - - - - - - - -

2005-10-29 Sat  Jari Aalto  <jari dot aalto A T cante dot net>

        (gnus-article-sort-by-date-reverse): 7.101 New function.

=== modified file 'gnus-sum.el'
--- gnus-sum.el
+++ gnus-sum.el
@@ -4630,6 +4630,10 @@
    (gnus-date-get-time (mail-header-date h1))
    (gnus-date-get-time (mail-header-date h2))))
 
+(defsubst gnus-article-sort-by-date-reverse (h1 h2)
+  "Sort articles in reverse order by root article date."
+  (gnus-article-sort-by-date h2 h1))
+
 (defun gnus-thread-sort-by-date (h1 h2)
   "Sort threads by root article date."
   (gnus-article-sort-by-date





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

* Re: [PATCH] cvs 2005-10-29 gnus-sum.el::gnus-article-sort-by-date-reverse (NEW)
  2005-10-29  8:05 [PATCH] cvs 2005-10-29 gnus-sum.el::gnus-article-sort-by-date-reverse (NEW) Jari Aalto
@ 2006-04-13  8:01 ` Lars Magne Ingebrigtsen
  2006-04-13  8:05   ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Magne Ingebrigtsen @ 2006-04-13  8:01 UTC (permalink / raw)


Jari Aalto <jari.aalto@cante.net> writes:

> 2005-10-29 Sat  Jari Aalto  <jari dot aalto A T cante dot net>
>
>         (gnus-article-sort-by-date-reverse): 7.101 New function.

`-reverse' versions of functions really aren't necessary, because you
can specify `(not gnus-article-sort-by-date)' in
`gnus-thread-sort-functions' to get the desired effect.

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




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

* Re: [PATCH] cvs 2005-10-29 gnus-sum.el::gnus-article-sort-by-date-reverse (NEW)
  2006-04-13  8:01 ` Lars Magne Ingebrigtsen
@ 2006-04-13  8:05   ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Magne Ingebrigtsen @ 2006-04-13  8:05 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> `-reverse' versions of functions really aren't necessary

Oops.  The preceding thread already pointed this out.

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




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

end of thread, other threads:[~2006-04-13  8:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-29  8:05 [PATCH] cvs 2005-10-29 gnus-sum.el::gnus-article-sort-by-date-reverse (NEW) Jari Aalto
2006-04-13  8:01 ` Lars Magne Ingebrigtsen
2006-04-13  8:05   ` 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).