From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#33140: 27.0.50; `gnus-posting-styles' sees nil =?UTF-8?Q?=E2=80=98message-reply-headers=E2=80=99?= variable Date: Wed, 05 Dec 2018 12:54:06 -0800 Message-ID: <87y393y9sh.fsf@ericabrahamsen.net> References: <8736svz614.fsf@moondust.localdomain> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1544043194 22199 195.159.176.226 (5 Dec 2018 20:53:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 5 Dec 2018 20:53:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: 33140@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 05 21:53:09 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gUeAO-0005cl-U5 for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Dec 2018 21:53:09 +0100 Original-Received: from localhost ([::1]:36783 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gUeCV-00064X-HJ for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Dec 2018 15:55:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56003) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gUeCJ-00062B-Jd for bug-gnu-emacs@gnu.org; Wed, 05 Dec 2018 15:55:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gUeCE-0005At-AS for bug-gnu-emacs@gnu.org; Wed, 05 Dec 2018 15:55:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58649) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gUeCE-0005Af-4f for bug-gnu-emacs@gnu.org; Wed, 05 Dec 2018 15:55:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gUeCE-00058a-2G for bug-gnu-emacs@gnu.org; Wed, 05 Dec 2018 15:55:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <8736svz614.fsf@moondust.localdomain> Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Dec 2018 20:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33140 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.154404327319710 (code B ref -1); Wed, 05 Dec 2018 20:55:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Dec 2018 20:54:33 +0000 Original-Received: from localhost ([127.0.0.1]:34674 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gUeBl-00057o-Cl for submit@debbugs.gnu.org; Wed, 05 Dec 2018 15:54:33 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:45865) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gUeBk-00057W-07 for submit@debbugs.gnu.org; Wed, 05 Dec 2018 15:54:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gUeBd-0004TN-KI for submit@debbugs.gnu.org; Wed, 05 Dec 2018 15:54:26 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:36602) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gUeBd-0004T3-FC for submit@debbugs.gnu.org; Wed, 05 Dec 2018 15:54:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55449) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gUeBc-0005fd-Hb for bug-gnu-emacs@gnu.org; Wed, 05 Dec 2018 15:54:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gUeBX-0004MP-Il for bug-gnu-emacs@gnu.org; Wed, 05 Dec 2018 15:54:24 -0500 Original-Received: from [195.159.176.226] (port=39508 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gUeBX-0004L9-AX for bug-gnu-emacs@gnu.org; Wed, 05 Dec 2018 15:54:19 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1gUe9M-0004FR-EL for bug-gnu-emacs@gnu.org; Wed, 05 Dec 2018 21:52:04 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 39 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:wSJ4gPVUmHGu3evwYMaZU/PCov4= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:153127 Archived-At: "N. Jackson" writes: > I'm trying to set up a Gnus posting style that makes use of the > ‘message-reply-headers’ variable, but the behaviour I see indicates that > this variable is always nil (in the context where the posting styles are > evaluated). > > It seems (this is a wild guess) that the function > `gnus-configure-posting-styles' that applies the posting styles that > match, and which is called from `message-mode-hook' (I believe), is > called before `message-reply-headers' is set. > > Either that, or `gnus-configure-posting-styles' is evaluated in the > context of the wrong buffer (`message-reply-headers' is buffer local to > the *unsent reply...* buffer). So far as I can tell, the problem is the former -- `gnus-configure-posting-styles' is called before `message-reply-headers' is set. Both `message-reply' and `message-followup' first call `message-pop-to-buffer' (which ends up calling `message-mode' and thus the `message-mode-hooks', and thus `gnus-configure-posting-styles'). Then they set `message-reply-headers'. Then they call `message-setup', which calls `message-setup-1', which runs the `message-setup-hook', which would be a spot where `message-reply-headers' would be accessible. I will check and see if this changed sometime recently. I would say that posting-style configuration could be moved to the `message-setup-hook', except that that would be guaranteed to wreck all manner of existing configurations and get us lots of angry emails. But... I think that's the issue. E