From: "Jochen Küpper" <jochen-+It19tn3Rl9sbm7dSapR3bNAH6kLmebB@public.gmane.org>
Subject: Re: rrs opening from summary does not mark read
Date: Sun, 03 Jul 2005 11:44:59 +0200 [thread overview]
Message-ID: <m3oe9ki5pg.fsf@doze.jochen-kuepper.de> (raw)
In-Reply-To: <acl5q7p6.fsf@Guido-ykITjDcPGoLNLxjTenLetw@public.gmane.org> (Guido Van Hoecke's message of "Sat, 02 Jul 2005 22:22:29 +0200")
Guido Van Hoecke <Guido-ykITjDcPGoLNLxjTenLetw@public.gmane.org> writes:
> The "Gnus v5.10.7" info manual about RSS gives a lisp snippet to open
> an nnrss url directly from the summary buffer. This works as a charm,
> albeit that the summary buffer entry doesn't get marked as read.
>
> Does any gnus/lisp guru care to add this to the browse-nnrss-url
> defun?
The code in the manual (No Gnus v0.4) contains
,----
| (if url
| (progn
| (browse-url (cdr url))
| (gnus-summary-mark-as-read-forward 1))
| (gnus-summary-scroll-up arg))))
`----
Therefore the article should be marked read when a url is present.
,----[ C-h f gnus-summary-mark-as-read-forward RET ]
| gnus-summary-mark-as-read-forward is an interactive compiled Lisp function in `gnus-sum'.
| (gnus-summary-mark-as-read-forward N)
|
| Mark N articles as read forwards.
| If N is negative, mark backwards instead.
| The difference between N and the actual number of articles marked is
| returned.
|
| [back]
`----
Personally I use the following, which has some more from this list or
the Wiki or so. This works nicely (again: No Gnus v0.4):
,----
| (add-hook 'gnus-summary-mode-hook
| (lambda ()
| (if (string-match "nnrss:" gnus-newsgroup-name)
| (progn
| (make-local-variable 'gnus-show-threads)
| (make-local-variable 'gnus-article-sort-functions)
| (make-local-variable 'gnus-use-adaptive-scoring)
| (make-local-variable 'gnus-use-scoring)
| (make-local-variable 'gnus-score-find-score-files-function)
| (make-local-variable 'gnus-summary-line-format)
| (setq gnus-show-threads nil)
| (setq gnus-article-sort-functions 'gnus-article-sort-by-number)
| (setq gnus-use-adaptive-scoring nil)
| (setq gnus-use-scoring t)
| (setq gnus-score-find-score-files-function 'gnus-score-find-single)
| (setq gnus-summary-line-format "%U%R%z%[%d%] %I%( %s%)\n")))))
| (defun jk/browse-nnrss-url(arg)
| (interactive "p")
| (let ((url (assq nnrss-url-field
| (mail-header-extra
| (gnus-data-header
| (assq (gnus-summary-article-number)
| gnus-newsgroup-data))))))
| (if url
| (progn
| (browse-url (cdr url))
| (gnus-summary-mark-as-read-forward 1))
| (gnus-summary-scroll-up arg))))
| (add-to-list 'nnmail-extra-headers nnrss-url-field)
| (add-hook 'gnus-summary-mode-hook
| (lambda ()
| (if (string-match "nnrss" gnus-newsgroup-name)
| (define-key gnus-summary-mode-map (kbd "<RET>") 'jk/browse-nnrss-url))))
`----
However, the AFAICT the relevant piece of code is the same.
HTH
Greetings,
Jochen
--
Einigkeit und Recht und Freiheit http://www.Jochen-Kuepper.de
Liberté, Égalité, Fraternité GnuPG key: CC1B0B4D
(Part 3 you find in my messages before fall 2003.)
next parent reply other threads:[~2005-07-03 9:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <acl5q7p6.fsf@Guido@VanHoecke.org>
[not found] ` <acl5q7p6.fsf@Guido-ykITjDcPGoLNLxjTenLetw@public.gmane.org>
2005-07-03 9:44 ` Jochen Küpper [this message]
2005-07-02 20:22 Guido Van Hoecke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3oe9ki5pg.fsf@doze.jochen-kuepper.de \
--to=jochen-+it19tn3rl9sbm7dsapr3bnah6klmebb@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).