From: Mark Walters Date: Sat, 5 Apr 2014 21:24:20 +0000 (+0100) Subject: [PATCH 0/5] emacs: hello: convert saved-searches to plists X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bc29db2ec8dc48354b119b04af84e94e239e5d64;p=notmuch-archives.git [PATCH 0/5] emacs: hello: convert saved-searches to plists --- diff --git a/dd/7851b4c114b41c34aa9c06b081aed1610e1516 b/dd/7851b4c114b41c34aa9c06b081aed1610e1516 new file mode 100644 index 000000000..28d46a3ed --- /dev/null +++ b/dd/7851b4c114b41c34aa9c06b081aed1610e1516 @@ -0,0 +1,102 @@ +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 4A2DD431FCB + for ; Sat, 5 Apr 2014 14:24:53 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.201 +X-Spam-Level: +X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, + 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 nXzMfPvcDSgD for ; + Sat, 5 Apr 2014 14:24:47 -0700 (PDT) +Received: from mail-we0-f181.google.com (mail-we0-f181.google.com + [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 9BB15431FBF + for ; Sat, 5 Apr 2014 14:24:47 -0700 (PDT) +Received: by mail-we0-f181.google.com with SMTP id q58so4886166wes.26 + for ; Sat, 05 Apr 2014 14:24:45 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:cc:subject:date:message-id; + bh=Un8HpP+q0MF6Ale6GR8bNvxYHV7N9PWrb6Dl7vlVWas=; + b=qS497JEUJdyJ+LzK6p7muUO3Sg2u+zcskZZNyu3UaEeN6pLl7GX2audc9bch0K825e + URiYAPVBlzyt+DZ5djWyVWfHWU+uhKRvlTQ20R+Y9FiQob13czHrIJlf7644odGs13u3 + ltUk9lh5BBh9CLO7iNaYwA9cUZOzEOzbM1+mq1VHbpd3GOOquMlsTP35uygCWx4qUye6 + rQX8RZ7a2LpWtH9NaTtTvXYznNxos71mz9/Kv+G+tbG+4D5jCsfoKUX8DF6ksIa6OV4/ + r4EVZ4a3S44bq0TmYqrCUl5oSlhRrMLRdHzKzqE080IR+ZnaAIcYdVLD4n/6fow0nmXr + Hyug== +X-Received: by 10.194.89.168 with SMTP id bp8mr30286551wjb.73.1396733083580; + Sat, 05 Apr 2014 14:24:43 -0700 (PDT) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPSA id + eq8sm13041953wib.16.2014.04.05.14.24.42 for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Sat, 05 Apr 2014 14:24:43 -0700 (PDT) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH 0/5] emacs: hello: convert saved-searches to plists +Date: Sat, 5 Apr 2014 22:24:20 +0100 +Message-Id: <1396733065-32602-1-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.10.4 +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: Sat, 05 Apr 2014 21:24:53 -0000 + +This series converts the saved-search format to plists. This should +make it much easier to extend their functionality. The final patch +illustrates this by adding a sort-order option to the saved +searches. It also exposes the count-query functionality that is +already present internally, and could be used to store keyboard +shortcuts for searches. + +The series tries hard to be backwardly compatible and seems to work in +most cases. However, notmuch-hello is very interconnected so some +corner cases may fail: for example if people are doing strange things +with notmuch-saved-search-sort-function then it may break. + +Also note that the functions used for saved-searches are also used for +the "all tags" section: I have not converted them as they are purely +internal. Since we have backwards compatibility they still work. + +Best wishes + +Mark + + + + + + + +Mark Walters (5): + emacs: hello: add helper functions for saved-searches + emacs: hello: use the saved-search helper functions + emacs: hello: add a customize for saved-searches + emacs: hello: switch notmuch-hello-insert-buttons to plists + emacs: Add a sort-order option to saved-searches + + emacs/notmuch-hello.el | 129 +++++++++++++++++++++++++++++++++--------------- + emacs/notmuch-lib.el | 33 +++++++++++-- + emacs/notmuch.el | 6 +-- + 3 files changed, 122 insertions(+), 46 deletions(-) + +-- +1.7.10.4 +