From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/84723 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus-posting-styles vs compose-mail Date: Thu, 31 Jul 2014 10:10:56 +0800 Message-ID: <8738diz39r.fsf@ericabrahamsen.net> References: <87mwbssfqu.fsf@blah.blah> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1406772470 16133 80.91.229.3 (31 Jul 2014 02:07:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Jul 2014 02:07:50 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M32966@lists.math.uh.edu Thu Jul 31 04:07:39 2014 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XCfmH-0001yc-GA for ding-account@gmane.org; Thu, 31 Jul 2014 04:07:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1XCflo-0001CA-Un; Wed, 30 Jul 2014 21:07:04 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1XCflm-0001C0-FF for ding@lists.math.uh.edu; Wed, 30 Jul 2014 21:07:02 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) (envelope-from ) id 1XCfll-00076A-3o for ding@lists.math.uh.edu; Wed, 30 Jul 2014 21:07:01 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1XCfli-00029F-Lt for ding@gnus.org; Thu, 31 Jul 2014 04:06:58 +0200 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XCflh-0001Nz-Jn for ding@gnus.org; Thu, 31 Jul 2014 04:06:57 +0200 Original-Received: from 111.197.159.241 ([111.197.159.241]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 31 Jul 2014 04:06:57 +0200 Original-Received: from eric by 111.197.159.241 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 31 Jul 2014 04:06:57 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 36 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 111.197.159.241 User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.50 (gnu/linux) Cancel-Lock: sha1:WfTAEiAPY3i2C3/FffxYsGOuL1E= X-Spam-Score: -0.7 (/) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:84723 Archived-At: Kevin Ryde writes: > Does gnus-posting-styles rules have anything to notice when a message > has been started by `compose-mail', and perhaps the parameters on that > compose-mail? > > I see dynamic bindings of the compose-mail args are visible as variables > `to', `subject', etc, but I wonder if that should be relied on. > > I thought to suppress Gcc on some semi-automated mails. I got the > effect I wanted from code in gnus-message-archive-group like below, and > then wondered if it too already had anything to notice compose-mail or > match headers. (At the gnus-message-archive-group stage the buffer has > headers ready to consult, I believe.) > > (setq gnus-message-archive-group > '((if (equal (message-fetch-field "To") "query@example.com") > nil > "sent"))) I think no, posting styles won't look at the headers of messages you compose. My understanding is the styles are only in effect for a) group names, when you're composing a message to a specific group, and b) messages you're replying to, in which case the styles match on the headers of the original (received) message. I don't think you can do it based on outgoing message headers. How would gnus know which of the gnus-posting-style entries were meant to match on outgoing messages, and which meant to match on replied messages? I've thought off and on about a wrapper for mail composition, which would first query you for a few headers, and then set up the message accordingly. That would provide a place to run hooks like what you want, but until someone writes that wrapper... Yours, Eric