From: Steinar Bang <sb@dod.no>
Subject: Re: Find tick state from gnus-article-prepare-hook?
Date: Sat, 09 Oct 2004 18:10:20 +0200 [thread overview]
Message-ID: <87k6tzswib.fsf@dod.no> (raw)
In-Reply-To: <87oejbsyaq.fsf@dod.no>
>>>>> Steinar Bang <sb@dod.no>:
> Is it possible to find the tick state of the current article, from a
> function called from gnus-article-prepare-hook?
> I need to check whether the article is unread, or not. I wish to
> use u-appt.el to parse messages for Outlook appointment invitations,
> and I only want to be prompted for if I wish to save the appointment
> in the diary, the first time I read the message.
I tried using gnus-mark-article-hook instead, since this hook is
called from the summary buffer, in what seems to be the appropriate
moment.
But with the code below, I am asked if I wish to save the diary
entry on an unread article. But the article is never marked read.
Looks like my-gnus-check-outlook interfers with
gnus-summary-mark-read-and-unread-as-read, which is the other member
of gnus-mark-article-hook. Hm...
(defun my-gnus-check-outlook ()
"Run from a hook to check new messages in Gnus for Outlook appointment
invitations, and offer to save them in the diary."
(save-excursion
(let ((mark (gnus-summary-article-mark)))
(when (gnus-unread-mark-p mark)
(set-buffer gnus-article-buffer)
(u-appt-check-outlook)))))
(add-hook 'gnus-mark-article-hook 'my-gnus-check-outlook)
next prev parent reply other threads:[~2004-10-09 16:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-09 15:31 Steinar Bang
2004-10-09 16:10 ` Steinar Bang [this message]
2004-10-09 16:42 ` Steinar Bang
2004-10-10 21:13 ` Steinar Bang
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=87k6tzswib.fsf@dod.no \
--to=sb@dod.no \
/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).