From: deskpot@myrealbox.com (Vasily Korytov)
Subject: message-(news|mail)-p in (gnus-)?message-setup-hook
Date: Fri, 28 Feb 2003 17:33:37 +0300 [thread overview]
Message-ID: <87lm00cw5a.fsf@unix.home> (raw)
[-- Attachment #1: Type: text/plain, Size: 971 bytes --]
Hi,
I have two variants of a function. It's suited for signing only the
mail messages (as opposed to the news postings).
(defun mml-vk-maybe-sign ()
(unless (message-news-p)
(mml-secure-message-sign-pgpmime)))
(defun mml-vk-maybe-sign ()
(if (message-mail-p)
(mml-secure-message-sign-pgpmime)))
They both work for new and replied messages in message-setup-hook. But
not in gnus-message-setup-hook. Well, they both work OK when composing
replies and followups, when called from that hook too. But not when
composing new messages. The if/unless condition is always false then.
Actually, it's not surprising, because when I evaluate (message-mail-p)
or (message-news-p) in a new message buffer, they're both nil. But I
didn't get, why do they work in message-setup-hook. Can anyone help me?
--
I accept RFC3156 and RFC1991-compatible encrypted mail.
PGP key fingerprint: 123A 7CCE 6E26 6233 0D87 E01A A0F8 3524 FCD8 1841
[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]
next reply other threads:[~2003-02-28 14:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-28 14:33 Vasily Korytov [this message]
2003-03-31 17:59 ` Lars Magne Ingebrigtsen
2003-03-31 18:50 ` Vasily Korytov
2003-04-01 2:40 ` Lars Magne Ingebrigtsen
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=87lm00cw5a.fsf@unix.home \
--to=deskpot@myrealbox.com \
/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).