From: David Edmondson Date: Sat, 30 Apr 2016 06:51:48 +0000 (+0100) Subject: [PATCH v1 2/2] emacs: Tell `message-mode' that outgoing messages are email. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=17a10d860a8b4f540e78263f363b6b7002742d49;p=notmuch-archives.git [PATCH v1 2/2] emacs: Tell `message-mode' that outgoing messages are email. --- diff --git a/d3/450b4cae5476e2546de6ea1da0ff35bd763bb9 b/d3/450b4cae5476e2546de6ea1da0ff35bd763bb9 new file mode 100644 index 000000000..47d098c0b --- /dev/null +++ b/d3/450b4cae5476e2546de6ea1da0ff35bd763bb9 @@ -0,0 +1,110 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 289BF6DE0361 + for ; Fri, 29 Apr 2016 23:52:08 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.182 +X-Spam-Level: +X-Spam-Status: No, score=-0.182 tagged_above=-999 required=5 + tests=[AWL=-0.115, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, + RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, + RCVD_IN_MSPIKE_WL=-0.01, SPF_NEUTRAL=0.652, UNPARSEABLE_RELAY=0.001] + autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id vurnOEf-djhe for ; + Fri, 29 Apr 2016 23:52:00 -0700 (PDT) +Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com + [74.125.82.41]) by arlo.cworth.org (Postfix) with ESMTPS id 794356DE0352 for + ; Fri, 29 Apr 2016 23:51:54 -0700 (PDT) +Received: by mail-wm0-f41.google.com with SMTP id v200so13615112wmv.1 + for ; Fri, 29 Apr 2016 23:51:54 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=dme-org.20150623.gappssmtp.com; s=20150623; + h=from:to:subject:date:message-id:in-reply-to:references; + bh=fXnPH/khxsmjkRaxJh05LGDp16abDT56qjnyQfUn/dE=; + b=0v+l5b59AL4hETp02pdg2SqAWOMPFh29G1YMTXrKiScTsdY1CrVVr4hT/As23fH3Oq + M6PAu9GBsuVXKIkI5FwBCFg1v/6mgHwXTDuQAezm/OXQ8xwERMHnLcECQxJ8jewRENYi + MF9dFGAoYHLDhDrQlV6IAMCq1FCRy3ZIw3vwZ9acQHA/y+nXiQIlD8mlnub8Zy7N/6th + mxiFZTXSCsN0lwVboMvNbjxHXAHC7Z1ZMEBEs9lnPA1s4AP6dqoGHdiUc58u8wfEgqXM + /zr6yHNuQW3zPT2wcs1ZncOSHz6wVVRug/5dhrcECGkdhAjPNhxmSHVLqKA/5MdRO3Ia + m7xw== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to + :references; + bh=fXnPH/khxsmjkRaxJh05LGDp16abDT56qjnyQfUn/dE=; + b=jAn+q2Zk0z1TawRK+027qJVwb/jsZuUc/QxHdkVISVd1nC6mLaFtiJTd9RcBJHGIFc + XQgDAuUKuj/mN37pA5hph4PmGUJb0LCob8yM9egJTg7NBy0je1YaFLmy6RKabB3jo8EZ + QObeVTZDngm57pyUWW+oZfqFOPyzGXaK7xvIrHfH1pbOq6s9vy50sxC4eLgzhCIOjMD1 + 9HYGIMYS2sXnZGYT5S5dXtgbOhFNmVdEYI0ODwECiMattWPEbSYodJoOCXQRxW+wGrWi + kdpGU7RUlA7uNEyHrEoNjsLtboCF7+59VmvLTcQRg1oX8Dr2scWwJl+wiJ1p0nWqxfCo + kt0w== +X-Gm-Message-State: + AOPr4FU4GCeYLA4pD4cxC1CXfppftNd7bU0f+WHdMGTc3VcwVvitBiHQI9gcCuBZcRJWSQ== +X-Received: by 10.194.203.105 with SMTP id kp9mr158541wjc.70.1461999113181; + Fri, 29 Apr 2016 23:51:53 -0700 (PDT) +Received: from disaster-area.hh.sledj.net + ([2a01:348:1a2:1:ea39:35ff:fe2c:a227]) + by smtp.gmail.com with ESMTPSA id kj9sm18311685wjb.14.2016.04.29.23.51.51 + for + (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Fri, 29 Apr 2016 23:51:52 -0700 (PDT) +Received: from localhost (disaster-area.hh.sledj.net [local]) + by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id 55e1416d + for ; Sat, 30 Apr 2016 06:51:48 +0000 (UTC) +From: David Edmondson +To: notmuch@notmuchmail.org +Subject: [PATCH v1 2/2] emacs: Tell `message-mode' that outgoing messages are + email. +Date: Sat, 30 Apr 2016 07:51:48 +0100 +Message-Id: <1461999108-68582-3-git-send-email-dme@dme.org> +X-Mailer: git-send-email 2.7.1 +In-Reply-To: <1461999108-68582-1-git-send-email-dme@dme.org> +References: <1461999108-68582-1-git-send-email-dme@dme.org> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 30 Apr 2016 06:52:08 -0000 + +When composing messages (including replies, etc.), indicate to +`message-mode' definitively that the message is email (as opposed to +Usenet news) rather than having it attempt to determine this for itself. + +This causes `message-mode' to observe such variables as +`message-default-mail-headers', which previously happened haphazardly. +--- + emacs/notmuch-mua.el | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el +index 0445975..399e138 100644 +--- a/emacs/notmuch-mua.el ++++ b/emacs/notmuch-mua.el +@@ -338,7 +338,10 @@ modified. This function is notmuch addaptation of + ;; We need to convert any string input, eg from rmail-start-mail. + (dolist (h other-headers other-headers) + (if (stringp (car h)) (setcar h (intern (capitalize (car h)))))))) +- (args (list yank-action send-actions))) ++ (args (list yank-action send-actions)) ++ ;; Cause `message-setup-1' to do things relevant for mail, ++ ;; such as observe `message-default-mail-headers'. ++ (message-this-is-mail t)) + ;; message-setup-1 in Emacs 23 does not accept return-action + ;; argument. Pass it only if it is supplied by the caller. This + ;; will never be the case when we're called by `compose-mail' in +-- +2.7.1 +