[PATCH 3/5] Use message-field-value instead of message-fetch-field.
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Thu, 1 Jul 2010 16:08:25 +0000 (20:08 +0400)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:37:10 +0000 (09:37 -0800)
8c/78334d74469f5f039cc6bca000308e005aa287 [new file with mode: 0644]

diff --git a/8c/78334d74469f5f039cc6bca000308e005aa287 b/8c/78334d74469f5f039cc6bca000308e005aa287
new file mode 100644 (file)
index 0000000..5935226
--- /dev/null
@@ -0,0 +1,96 @@
+Return-Path: <dmitry.kurochkin@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 318BA40B945\r
+       for <notmuch@notmuchmail.org>; Thu,  1 Jul 2010 09:09:27 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.999\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5\r
+       tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,\r
+       DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001] autolearn=ham\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id EJh2GJ6luIvV for <notmuch@notmuchmail.org>;\r
+       Thu,  1 Jul 2010 09:09:14 -0700 (PDT)\r
+Received: from mail-fx0-f53.google.com (mail-fx0-f53.google.com\r
+       [209.85.161.53])\r
+       by olra.theworths.org (Postfix) with ESMTP id 88BCE49F192\r
+       for <notmuch@notmuchmail.org>; Thu,  1 Jul 2010 09:09:01 -0700 (PDT)\r
+Received: by mail-fx0-f53.google.com with SMTP id 19so1776530fxm.26\r
+       for <notmuch@notmuchmail.org>; Thu, 01 Jul 2010 09:09:01 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=domainkey-signature:received:received:from:to:cc:subject:date\r
+       :message-id:x-mailer:in-reply-to:references;\r
+       bh=8BMPRlPTJS2Lk8FIx4b8iGAe2P2nNEX4mWHe8Za0UQ0=;\r
+       b=Av4zNFnLxlN0DSbPfqevTzi92OuFRa/G9ZAnufKAhJamKNjKjfmo3D+2DFcXLyEUHs\r
+       F2xPYBJQD5Zd55oUXF3MN12HMjFQl52C0HraKXgO92kVnR4B44ZO9sni2VqV7yQIfpr9\r
+       YLnJhSo2CaqPtKBfpcn94kEZIe0GgI3YDYGSI=\r
+DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
+       h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
+       b=eZh1Zn0nR83ZEfkm3KJrtXgLYei+bqGranDflNQAoh7Nsk8Xc/alqQzr7HOEPNzPeP\r
+       UoFmYyCFQ2mds/FcZKxuJSQT0L29erG138H5/dPCDkxZKCTEObYNvX3eqzCt9S/BYwFF\r
+       zDyGhDtCOc773M4cpghg4G1+RAnO0M9y+sLRI=\r
+Received: by 10.223.20.73 with SMTP id e9mr9768254fab.103.1278000541258;\r
+       Thu, 01 Jul 2010 09:09:01 -0700 (PDT)\r
+Received: from localhost ([91.144.186.21])\r
+       by mx.google.com with ESMTPS id l26sm7739482fam.15.2010.07.01.09.09.00\r
+       (version=TLSv1/SSLv3 cipher=RC4-MD5);\r
+       Thu, 01 Jul 2010 09:09:00 -0700 (PDT)\r
+From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 3/5] Use message-field-value instead of message-fetch-field.\r
+Date: Thu,  1 Jul 2010 20:08:25 +0400\r
+Message-Id: <1278000507-22290-4-git-send-email-dmitry.kurochkin@gmail.com>\r
+X-Mailer: git-send-email 1.7.1\r
+In-Reply-To: <1278000507-22290-1-git-send-email-dmitry.kurochkin@gmail.com>\r
+References: <1278000507-22290-1-git-send-email-dmitry.kurochkin@gmail.com>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 01 Jul 2010 16:09:27 -0000\r
+\r
+---\r
+ emacs/notmuch-maildir-fcc.el |    6 +++---\r
+ 1 files changed, 3 insertions(+), 3 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-maildir-fcc.el b/emacs/notmuch-maildir-fcc.el\r
+index 8bb41a8..c3e4505 100644\r
+--- a/emacs/notmuch-maildir-fcc.el\r
++++ b/emacs/notmuch-maildir-fcc.el\r
+@@ -83,18 +83,18 @@\r
+           ;; notmuch-fcc-dirs is a string, just use it as subdir\r
+           (setq subdir notmuch-fcc-dirs)\r
+         ;; else: it's a list of alists (("sent") ("name1" . "sent1"))\r
+-        (setq subdir (cdr (assoc-string (message-fetch-field "from") notmuch-fcc-dirs t)))\r
++        (setq subdir (cdr (assoc-string (message-field-value "from") notmuch-fcc-dirs t)))\r
+          ;; if we found no hit, use the first entry as default fallback\r
+          (unless subdir (setq subdir (car (car notmuch-fcc-dirs)))))\r
\r
+   ;; if there is no fcc header yet, add ours\r
+-  (unless (message-fetch-field "fcc")\r
++  (unless (message-field-value "fcc")\r
+     (message-add-header (concat "Fcc: "\r
+                                 (file-name-as-directory message-directory)\r
+                                 subdir)))\r
\r
+   ;; finally test if fcc points to a valid maildir\r
+-  (let ((fcc-header (message-fetch-field "fcc")))\r
++  (let ((fcc-header (message-field-value "fcc")))\r
+     (unless (notmuch-maildir-fcc-dir-is-maildir-p fcc-header)\r
+       (cond ((not (file-writable-p fcc-header))\r
+              (error (format "%s is not a maildir, but you don't have permission to create one." fcc-header)))\r
+-- \r
+1.7.1\r
+\r