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 C2D84429E54 for ; Tue, 28 Jun 2011 00:31:47 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled 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 YKWC-XBdIzNI for ; Tue, 28 Jun 2011 00:31:47 -0700 (PDT) Received: from mail-qw0-f53.google.com (mail-qw0-f53.google.com [209.85.216.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 3D976429E4E for ; Tue, 28 Jun 2011 00:31:47 -0700 (PDT) Received: by mail-qw0-f53.google.com with SMTP id 7so3266915qwb.26 for ; Tue, 28 Jun 2011 00:31:47 -0700 (PDT) Received: by 10.224.190.130 with SMTP id di2mr5754220qab.177.1309246307047; Tue, 28 Jun 2011 00:31:47 -0700 (PDT) Received: from localhost (nikula.org [92.243.24.172]) by mx.google.com with ESMTPS id t21sm4631103qcs.26.2011.06.28.00.31.45 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 28 Jun 2011 00:31:46 -0700 (PDT) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [PATCH 2/4] emacs: Add option to make adding saved searches append, not prepend Date: Tue, 28 Jun 2011 07:31:30 +0000 Message-Id: <98912bf031b0a23a703db4be82b24d3d83d5ee9e.1309244829.git.jani@nikula.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: References: In-Reply-To: References: X-Mailman-Approved-At: Tue, 28 Jun 2011 10:59:27 -0700 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: Tue, 28 Jun 2011 07:31:47 -0000 Add new customization option notmuch-add-saved-search-appends to determine whether new saved searches should be appended to or inserted in front of saved searches. The default remains insert in front. --- emacs/notmuch-hello.el | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 65fde75..84bce3a 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -42,6 +42,11 @@ :type 'boolean :group 'notmuch) +(defcustom notmuch-add-saved-search-appends nil + "Should new saved searches be appended instead of inserted to saved searches?" + :type 'boolean + :group 'notmuch) + (defvar notmuch-hello-indent 4 "How much to indent non-headers.") @@ -168,8 +173,9 @@ Typically \",\" in the US and UK and \".\" in Europe." collect elem)) ;; Add the new one. (customize-save-variable 'notmuch-saved-searches - (push (cons name search) - notmuch-saved-searches)) + (add-to-list 'notmuch-saved-searches + (cons name search) + notmuch-add-saved-search-appends)) (message "Saved '%s' as '%s'." search name) (notmuch-hello-update))) -- 1.7.1