Re: [PATCH v6 4/6] emacs/mua: Generate improved cited text for replies
[notmuch-archives.git] / bb / f6e964673797a9ca3d90b77cd1ac9665ff94d8
1 Return-Path: <tomi.ollila@iki.fi>\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 arlo.cworth.org (Postfix) with ESMTP id B2FB96DE19CD\r
6  for <notmuch@notmuchmail.org>; Mon,  6 Apr 2015 04:53:54 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 1.226\r
10 X-Spam-Level: *\r
11 X-Spam-Status: No, score=1.226 tagged_above=-999 required=5 tests=[AWL=0.574, \r
12  SPF_NEUTRAL=0.652] autolearn=disabled\r
13 Received: from arlo.cworth.org ([127.0.0.1])\r
14  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
15  with ESMTP id akUPbNz8k2E5 for <notmuch@notmuchmail.org>;\r
16  Mon,  6 Apr 2015 04:53:52 -0700 (PDT)\r
17 X-Greylist: delayed 572 seconds by postgrey-1.35 at arlo;\r
18  Mon, 06 Apr 2015 04:53:52 PDT\r
19 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
20  by arlo.cworth.org (Postfix) with ESMTP id 27F3C6DE19C7\r
21  for <notmuch@notmuchmail.org>; Mon,  6 Apr 2015 04:53:52 -0700 (PDT)\r
22 Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
23  by guru.guru-group.fi (Postfix) with ESMTP id 4639210019F;\r
24  Mon,  6 Apr 2015 14:43:55 +0300 (EEST)\r
25 From: Tomi Ollila <tomi.ollila@iki.fi>\r
26 To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
27 Subject: Re: [PATCH] nmbug-status: add support for specifying sort order for\r
28  each view\r
29 In-Reply-To: <1428047832-14922-1-git-send-email-jani@nikula.org>\r
30 References: <1428047832-14922-1-git-send-email-jani@nikula.org>\r
31 User-Agent: Notmuch/0.19+107~gab55bdb (http://notmuchmail.org) Emacs/24.3.1\r
32  (x86_64-unknown-linux-gnu)\r
33 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
34  $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
35  !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
36 Date: Mon, 06 Apr 2015 14:43:54 +0300\r
37 Message-ID: <m2wq1pa3d1.fsf@guru.guru-group.fi>\r
38 MIME-Version: 1.0\r
39 Content-Type: text/plain\r
40 X-BeenThere: notmuch@notmuchmail.org\r
41 X-Mailman-Version: 2.1.18\r
42 Precedence: list\r
43 List-Id: "Use and development of the notmuch mail system."\r
44  <notmuch.notmuchmail.org>\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
46  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
48 List-Post: <mailto:notmuch@notmuchmail.org>\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
51  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
52 X-List-Received-Date: Mon, 06 Apr 2015 11:53:54 -0000\r
53 \r
54 On Fri, Apr 03 2015, Jani Nikula <jani@nikula.org> wrote:\r
55 \r
56 > Let each view have "sort" key with possible values "oldest-first",\r
57 > "newest-first", and "unsorted", and sort the results\r
58 > accordingly. Oldest first remains the default.\r
59 > ---\r
60 \r
61 lgtm.\r
62 \r
63 Tomi\r
64 \r
65 >  devel/nmbug/nmbug-status | 10 +++++++++-\r
66 >  1 file changed, 9 insertions(+), 1 deletion(-)\r
67 >\r
68 > diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status\r
69 > index 19dc48abf557..e1abf4db15ba 100755\r
70 > --- a/devel/nmbug/nmbug-status\r
71 > +++ b/devel/nmbug/nmbug-status\r
72 > @@ -156,11 +156,19 @@ class Page (object):\r
73 >              stream.write(self.footer)\r
74 >  \r
75 >      def _write_view(self, database, view, stream):\r
76 > +        sort = {\r
77 > +            'oldest-first': notmuch.Query.SORT.OLDEST_FIRST,\r
78 > +            'newest-first': notmuch.Query.SORT.NEWEST_FIRST,\r
79 > +            'unsorted': notmuch.Query.SORT.UNSORTED\r
80 > +        }\r
81 >          if 'query-string' not in view:\r
82 >              query = view['query']\r
83 >              view['query-string'] = ' and '.join(query)\r
84 >          q = notmuch.Query(database, view['query-string'])\r
85 > -        q.set_sort(notmuch.Query.SORT.OLDEST_FIRST)\r
86 > +        if 'sort' in view and view['sort'] in sort:\r
87 > +            q.set_sort(sort[view['sort']])\r
88 > +        else:\r
89 > +            q.set_sort(notmuch.Query.SORT.OLDEST_FIRST)\r
90 >          threads = self._get_threads(messages=q.search_messages())\r
91 >          self._write_view_header(view=view, stream=stream)\r
92 >          self._write_threads(threads=threads, stream=stream)\r
93 > -- \r
94 > 2.1.4\r
95 >\r
96 > _______________________________________________\r
97 > notmuch mailing list\r
98 > notmuch@notmuchmail.org\r
99 > http://notmuchmail.org/mailman/listinfo/notmuch\r