help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Gnus: moving to the latest article in a thread


From: Ralf Wachinger
Subject: Re: Gnus: moving to the latest article in a thread
Date: 11 Mar 2009 01:11:24 GMT
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (windows-nt)

* Reiner Steib wrote:

> On Sun, Mar 08 2009, Francis Moreau wrote:
> 
>> I'm looking for a magic thread command which allows me to go to latest
>> article in the current thread.
> 
> Something like `9999 T d'?
> 
> ,----[ (info "(gnus)Thread Commands") ]
> | `T d'
> |      Descend the thread (`gnus-summary-down-thread').
> | 
> | `T u'
> |      Ascend the thread (`gnus-summary-up-thread').
> `----
> 
>> It would be really cool if that command understand numeric prefix, so
>> giving '2' as prefix would move the second most recent article.
> 
> (defun rs-gnus-summary-down-thread-max (&optional back)
>   "Go to the lastest article in the current thread.
> With prefix, go up BACK articles from the lastest."
>   (interactive "P")
>   (while (/= 1 (gnus-summary-down-thread 1))
>     t)
>   (gnus-message 7 "End of thread reached.")
>   (when back
>     (gnus-summary-up-thread back)
>     (gnus-message 7 "Went back %d articles." back))
>   (gnus-summary-show-article))

--8<---------------cut here---------------start------------->8---

(defun rs-gnus-summary-down-thread-max (&optional back)
  "Go to the lastest article in the current thread and show article.
With prefix, go up BACK articles from the lastest."
  (interactive "P")
  (gnus-summary-show-thread)
  (while (/= 1 (gnus-summary-down-thread 1))
    t)
  (gnus-message 7 "End of thread reached.")
  (when back
    (gnus-summary-up-thread back)
    (gnus-message 7 "Went back %d articles." back))
  (gnus-summary-show-article))

--8<---------------cut here---------------end--------------->8---

If the thread is hidden, an endless loop happens. Therefore i have added
(gnus-summary-show-thread) to show the thread first.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]