Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / f7 / 7551c8ff0d5e07d8b54f33c86a825473e633c2
1 Return-Path: <markwalters1009@gmail.com>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id CED80431FBC\r
6         for <notmuch@notmuchmail.org>; Sat, 12 Apr 2014 05:46:40 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.201\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
14         RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id RWiRCvMglkE7 for <notmuch@notmuchmail.org>;\r
18         Sat, 12 Apr 2014 05:46:35 -0700 (PDT)\r
19 Received: from mail-we0-f175.google.com (mail-we0-f175.google.com\r
20         [74.125.82.175]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
21         (No client certificate requested)\r
22         by olra.theworths.org (Postfix) with ESMTPS id 29E2D431FBD\r
23         for <notmuch@notmuchmail.org>; Sat, 12 Apr 2014 05:46:35 -0700 (PDT)\r
24 Received: by mail-we0-f175.google.com with SMTP id q58so6384751wes.20\r
25         for <notmuch@notmuchmail.org>; Sat, 12 Apr 2014 05:46:32 -0700 (PDT)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=from:to:cc:subject:date:message-id:in-reply-to:references;\r
28         bh=sxRiQvKJda8s9Z4WJiICJ3mLVGnRaMtSJpHFkjadIWM=;\r
29         b=jACjchaHibXqJESNuMBB/5sDafsLyZSQRgMjlxPEsNflkTFvHplMRk9F87DcZqLJL1\r
30         hfmjB8CvLI/0hOfXwU/ET3Xuv/NVaysiW/w0VXTTd0rtPjD/j6IMjqkfM4j9nielAG1k\r
31         UfqMJd9rVCaOIBrjTTCTyjx5IH4KO73mHujgZTKV4cLt6oSVWrT5aVpeJeQ6OmQEn8Qc\r
32         bfrnZLvwzHCCSh+ffktIyDSV6wuchAov7avtS7iqLB96ed3i1X31vxt53GVSH1no0Hy5\r
33         EnYRwS/fIWGenS4NiwQoUmOZkZR7WI72ChuO+oecjnwe8wX7t792resua5aGyhDUzLg5\r
34         8E9g==\r
35 X-Received: by 10.180.188.134 with SMTP id ga6mr2352399wic.58.1397306792624;\r
36         Sat, 12 Apr 2014 05:46:32 -0700 (PDT)\r
37 Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162])\r
38         by mx.google.com with ESMTPSA id\r
39         h19sm10434121wiw.17.2014.04.12.05.46.31 for <multiple recipients>\r
40         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
41         Sat, 12 Apr 2014 05:46:31 -0700 (PDT)\r
42 From: Mark Walters <markwalters1009@gmail.com>\r
43 To: notmuch@notmuchmail.org\r
44 Subject: [PATCH v2 1/2] emacs: hello: bugfix: make alphabetically sorted saved\r
45         searches work\r
46 Date: Sat, 12 Apr 2014 13:46:26 +0100\r
47 Message-Id: <1397306787-12207-2-git-send-email-markwalters1009@gmail.com>\r
48 X-Mailer: git-send-email 1.7.10.4\r
49 In-Reply-To: <1397306787-12207-1-git-send-email-markwalters1009@gmail.com>\r
50 References: <1397306787-12207-1-git-send-email-markwalters1009@gmail.com>\r
51 X-BeenThere: notmuch@notmuchmail.org\r
52 X-Mailman-Version: 2.1.13\r
53 Precedence: list\r
54 List-Id: "Use and development of the notmuch mail system."\r
55         <notmuch.notmuchmail.org>\r
56 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
57         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
58 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
59 List-Post: <mailto:notmuch@notmuchmail.org>\r
60 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
61 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
63 X-List-Received-Date: Sat, 12 Apr 2014 12:46:41 -0000\r
64 \r
65 My recent changes to the saved search format broke the alphabetically\r
66 sorted saved sort option. This makes it work again.\r
67 \r
68 Also update docs for saved-search sort defcustom to match the new\r
69 format.\r
70 \r
71 Finally, since the saved-search list is no longer an alist change the\r
72 names in the sort function to avoid confusion.\r
73 ---\r
74  emacs/notmuch-hello.el |   15 ++++++++++-----\r
75  1 file changed, 10 insertions(+), 5 deletions(-)\r
76 \r
77 diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
78 index 4900a24..b8ec665 100644\r
79 --- a/emacs/notmuch-hello.el\r
80 +++ b/emacs/notmuch-hello.el\r
81 @@ -39,9 +39,12 @@ (defcustom notmuch-show-empty-saved-searches nil\r
82    :type 'boolean\r
83    :group 'notmuch-hello)\r
84  \r
85 -(defun notmuch-sort-saved-searches (alist)\r
86 -  "Generate an alphabetically sorted saved searches alist."\r
87 -  (sort (copy-sequence alist) (lambda (a b) (string< (car a) (car b)))))\r
88 +(defun notmuch-sort-saved-searches (saved-searches)\r
89 +  "Generate an alphabetically sorted saved searches list."\r
90 +  (sort (copy-sequence saved-searches)\r
91 +       (lambda (a b)\r
92 +         (string< (notmuch-saved-search-get a :name)\r
93 +                  (notmuch-saved-search-get b :name)))))\r
94  \r
95  (defcustom notmuch-saved-search-sort-function nil\r
96    "Function used to sort the saved searches for the notmuch-hello view.\r
97 @@ -51,8 +54,10 @@ (defcustom notmuch-saved-search-sort-function nil\r
98  stored in `notmuch-saved-searches'. Sort alphabetically sorts the\r
99  saved searches in alphabetical order. Custom sort function should\r
100  be a function or a lambda expression that takes the saved\r
101 -searches alist as a parameter, and returns a new saved searches\r
102 -alist to be used."\r
103 +searches list as a parameter, and returns a new saved searches\r
104 +list to be used. For compatibility with the various saved-search\r
105 +formats it should use notmuch-saved-search-get to access the\r
106 +fields of the search."\r
107    :type '(choice (const :tag "No sorting" nil)\r
108                  (const :tag "Sort alphabetically" notmuch-sort-saved-searches)\r
109                  (function :tag "Custom sort function"\r
110 -- \r
111 1.7.10.4\r
112 \r