Re: (emacs) Parsing problems replying to encrypted html
[notmuch-archives.git] / f5 / a876c963976aaff70704510819da75985ba08f
1 Return-Path: <sshilovsky@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 0A0DE431FB6\r
6         for <notmuch@notmuchmail.org>; Tue,  7 Oct 2014 07:04:18 -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.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id EKLn6RV07Tl9 for <notmuch@notmuchmail.org>;\r
17         Tue,  7 Oct 2014 07:04:10 -0700 (PDT)\r
18 Received: from mail-oi0-f52.google.com (mail-oi0-f52.google.com\r
19         [209.85.218.52]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id B42D0431FAF\r
22         for <notmuch@notmuchmail.org>; Tue,  7 Oct 2014 07:04:10 -0700 (PDT)\r
23 Received: by mail-oi0-f52.google.com with SMTP id a3so5217253oib.11\r
24         for <notmuch@notmuchmail.org>; Tue, 07 Oct 2014 07:04:10 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
26         h=mime-version:reply-to:in-reply-to:references:date:message-id\r
27         :subject:from:to:cc:content-type:content-transfer-encoding;\r
28         bh=+AatGbCyyrCfWm9m+zgIozJNs8d4k+V0mYYoJ/LrpbQ=;\r
29         b=NV5G8ugAvX7FTLUZ25Q2P6OtWV3VwHPFKZs8Q18h65hW2EvF1Kyc6zOPpTUo8r7d/L\r
30         aVjWWcSmlQEZUKTy3MZr0MRfLhmm7UKv1HiPyx4JzhYhfmDECblA/ypE2O/1/dPLPxiK\r
31         QAsUJ27QqRmx09gK56WbUVdh0+bSI+SHONYKx41m33/df7Oo0Swdwdg19uG93oFb7F2d\r
32         h5eAWdyEfl4VXJUf4T7R99pNrIj6jzCrlHfiB+iGZixZa75mNNy6yZtsgRDO6kirb0IU\r
33         r/vTZc9izeUDvCwkWakYfTfvrLy2PJnhEOv6+5MDqS/WXajyNf6pCHs6/dBz8ted3NLB\r
34         Pong==\r
35 MIME-Version: 1.0\r
36 X-Received: by 10.182.236.65 with SMTP id us1mr4373287obc.38.1412690649854;\r
37         Tue, 07 Oct 2014 07:04:09 -0700 (PDT)\r
38 Received: by 10.76.41.3 with HTTP; Tue, 7 Oct 2014 07:04:09 -0700 (PDT)\r
39 In-Reply-To: <87lhos5duu.fsf@nikula.org>\r
40 References:\r
41  <CAHc2pO2_mQZzG7TqntSLEY78YEZSVEwDSesgpCn1ZbngJvM0dQ@mail.gmail.com>\r
42         <87lhos5duu.fsf@nikula.org>\r
43 Date: Tue, 7 Oct 2014 18:04:09 +0400\r
44 Message-ID:\r
45  <CAHc2pO2J6-UMVnLx3dSGns1z4aaxSZZdGfVNVtetcex9xbsCKQ@mail.gmail.com>\r
46 Subject: Re: Backward scrolling notmuch_messages_t and notmuch_threads_t\r
47 From: Sergei Shilovsky <sshilovsky@gmail.com>\r
48 To: Jani Nikula <jani@nikula.org>\r
49 Content-Type: text/plain; charset=UTF-8\r
50 Content-Transfer-Encoding: quoted-printable\r
51 Cc: notmuch@notmuchmail.org\r
52 X-BeenThere: notmuch@notmuchmail.org\r
53 X-Mailman-Version: 2.1.13\r
54 Precedence: list\r
55 Reply-To: sshilovsky@gmail.com\r
56 List-Id: "Use and development of the notmuch mail system."\r
57         <notmuch.notmuchmail.org>\r
58 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
59         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
60 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
61 List-Post: <mailto:notmuch@notmuchmail.org>\r
62 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
63 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
64         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
65 X-List-Received-Date: Tue, 07 Oct 2014 14:04:18 -0000\r
66 \r
67 notmuch search --offset` simply skips the number of threads/messages.\r
68 This is not so fast if the offset is large.\r
69 \r
70  98     for (i =3D 0;\r
71  99          notmuch_threads_valid (threads) && (limit < 0 || i <\r
72 offset + limit    );\r
73 100          notmuch_threads_move_to_next (threads), i++)\r
74 101     {\r
75 102         thread =3D notmuch_threads_get (threads);\r
76 103\r
77 104         if (i < offset) {\r
78 105             notmuch_thread_destroy (thread);\r
79 106             continue;\r
80 107         }\r
81 \r
82 On Tue, Oct 7, 2014 at 3:16 PM, Jani Nikula <jani@nikula.org> wrote:\r
83 > On Tue, 07 Oct 2014, Sergei Shilovsky <sshilovsky@gmail.com> wrote:\r
84 >> Lets consider messages first.\r
85 >>\r
86 >> As far as I get there is no straightforward\r
87 >> notmuch_messages_move_to_previous. One can usually implement such\r
88 >> behaviour with caching previous messages which is slightly inefficient\r
89 >> in memory consumption terms.\r
90 >>\r
91 >> But we can sort messages either date asc or date desc.\r
92 >>\r
93 >> Suppose, we're currently at the 1000th message in query "tag:whatever".\r
94 >>\r
95 >> So if we need to go to the previous message we could do something like\r
96 >>\r
97 >>     notmuch search --sort=3Doldest-first tag:whatever and \\r
98 >>         date:..<here is the date of the 1000th message>\r
99 >>\r
100 >> This query's result should start with our 1000th message following its\r
101 >> previous message (in terms of the original request). So backward\r
102 >> scrolling with no cache looks to be at least possible.\r
103 >>\r
104 >> Any idea of would that be fine? Is it possible to implement similar\r
105 >> thing at low-level?\r
106 >\r
107 > See notmuch search --offset=3DN and --limit=3DN options.\r
108 >\r
109 > BR,\r
110 > Jani.\r
111 >\r
112 >\r
113 >>\r
114 >> --\r
115 >> =D0=A1 =D1=83=D0=B2=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=D0=BC,\r
116 >> =D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9 =D0=A8=D0=B8=D0=BB=D0=BE=D0=B2=D1=\r
117 =81=D0=BA=D0=B8=D0=B9\r
118 >> Sergei Shilovsky\r
119 >> _______________________________________________\r
120 >> notmuch mailing list\r
121 >> notmuch@notmuchmail.org\r
122 >> http://notmuchmail.org/mailman/listinfo/notmuch\r
123 \r
124 \r
125 \r
126 --=20\r
127 =D0=A1 =D1=83=D0=B2=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=D0=BC,\r
128 =D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9 =D0=A8=D0=B8=D0=BB=D0=BE=D0=B2=D1=81=\r
129 =D0=BA=D0=B8=D0=B9\r
130 Sergei Shilovsky\r