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