From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/50452 Path: main.gmane.org!not-for-mail From: deskpot@myrealbox.com (Vasily Korytov) Newsgroups: gmane.emacs.gnus.general Subject: message-(news|mail)-p in (gnus-)?message-setup-hook Date: Fri, 28 Feb 2003 17:33:37 +0300 Sender: owner-ding@hpc.uh.edu Message-ID: <87lm00cw5a.fsf@unix.home> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: main.gmane.org 1046442971 9760 80.91.224.249 (28 Feb 2003 14:36:11 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 28 Feb 2003 14:36:11 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18olcO-0002Wz-00 for ; Fri, 28 Feb 2003 15:36:09 +0100 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 18olbp-0004go-00; Fri, 28 Feb 2003 08:35:33 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 28 Feb 2003 08:36:31 -0600 (CST) Original-Received: from sclp3.sclp.com (sclp3.sclp.com [66.230.238.2]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id IAA19496 for ; Fri, 28 Feb 2003 08:36:20 -0600 (CST) Original-Received: (qmail 47563 invoked by alias); 28 Feb 2003 14:35:17 -0000 Original-Received: (qmail 47558 invoked from network); 28 Feb 2003 14:35:16 -0000 Original-Received: from ns1.telekom.ru (root@194.190.195.83) by 66.230.238.6 with SMTP; 28 Feb 2003 14:35:16 -0000 Original-Received: from unix.home (h30.37.elnet.msk.ru [195.58.37.30]) by ns1.telekom.ru (8.12.7/8.12.7) with SMTP id h1SEYuqH005299 for ; Fri, 28 Feb 2003 17:35:01 +0300 Original-Received: (qmail 1000 invoked from network); 28 Feb 2003 14:38:38 -0000 Original-Received: from localhost (alias@127.0.0.1) by localhost with QMTP; 28 Feb 2003 14:38:38 -0000 Original-Received: (qmail 886 invoked by uid 1000); 28 Feb 2003 14:33:39 -0000 Original-To: ding@gnus.org X-Attribution: VK Mail-Copies-To: never User-Agent: Gnus/5.090016 (Oort Gnus v0.16) XEmacs/21.4 (Portable Code) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:50452 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:50452 --=-=-= Content-Transfer-Encoding: quoted-printable 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? =2D-=20 I accept RFC3156 and RFC1991-compatible encrypted mail. PGP key fingerprint: 123A 7CCE 6E26 6233 0D87 E01A A0F8 3524 FCD8 1841 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+X3NDoPg1JPzYGEERAnUKAKDvd+T0QDUKK5MabpUNXwUolqvgTwCfVQHd hqeTxQ7MhULeIgauD8N4Yt8= =Q1DT -----END PGP SIGNATURE----- --=-=-=--