Re: [PATCH] Fix typo in Message.maildir_flags_to_tags
[notmuch-archives.git] / 81 / 0900bd941fd92206a0b2176b8fae91417adf18
1 Return-Path: <anton@khirnov.net>\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 9286C431FAF\r
6         for <notmuch@notmuchmail.org>; Fri, 10 Aug 2012 01:14:30 -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\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id 4vA1JvIY54-y for <notmuch@notmuchmail.org>;\r
16         Fri, 10 Aug 2012 01:14:29 -0700 (PDT)\r
17 Received: from lain.khirnov.net (lain.khirnov.net [176.97.15.12])\r
18         by olra.theworths.org (Postfix) with ESMTP id D511F431FAE\r
19         for <notmuch@notmuchmail.org>; Fri, 10 Aug 2012 01:14:28 -0700 (PDT)\r
20 Received: from localhost (localhost [127.0.0.1])\r
21         by lain.khirnov.net (Postfix) with ESMTP id 32E59C2C4C;\r
22         Fri, 10 Aug 2012 10:14:27 +0200 (CEST)\r
23 Received: from lain.khirnov.net ([127.0.0.1])\r
24         by localhost (mail.khirnov.net [127.0.0.1]) (amavisd-new, port 10024)\r
25         with ESMTP id R+A7jgaMfUWh; Fri, 10 Aug 2012 10:14:25 +0200 (CEST)\r
26 Received: from daenerys.khirnov.net (unknown\r
27         [IPv6:2002:b061:f0a:1:52e5:49ff:fe3d:a3f2])\r
28         by lain.khirnov.net (Postfix) with ESMTP id B45F7C1513;\r
29         Fri, 10 Aug 2012 10:14:25 +0200 (CEST)\r
30 Received: from daenerys.khirnov.net (localhost [127.0.0.1])\r
31         by daenerys.khirnov.net (Postfix) with ESMTP id 78FBA122CBF;\r
32         Fri, 10 Aug 2012 10:13:55 +0200 (CEST)\r
33 Content-Type: text/plain; charset="utf-8"\r
34 MIME-Version: 1.0\r
35 Content-Transfer-Encoding: quoted-printable\r
36 User-Agent: notmuch-vimpy\r
37 Message-ID: <20120810081355.5861.36559@daenerys.khirnov.net>\r
38 Date: Fri, 10 Aug 2012 10:13:55 +0200\r
39 References: <1344174764.11525.YahooMailNeo@web171404.mail.ir2.yahoo.com>\r
40         <20120806161738.7080.82028@daenerys.khirnov.net>\r
41         <1344292148.78234.YahooMailNeo@web171405.mail.ir2.yahoo.com>\r
42         <20120807044234.29222.72622@daenerys.khirnov.net>\r
43         <1344328502.63480.YahooMailNeo@web171406.mail.ir2.yahoo.com>\r
44         <20120807093905.29222.57092@daenerys.khirnov.net>\r
45         <1344502159.57334.YahooMailNeo@web171405.mail.ir2.yahoo.com>\r
46 To: Sepp Tannhuber <sepp.tannhuber@yahoo.de>,\r
47         "notmuch@notmuchmail.org" <notmuch@notmuchmail.org>\r
48 In-Reply-To: <1344502159.57334.YahooMailNeo@web171405.mail.ir2.yahoo.com>\r
49 From: Anton Khirnov <anton@khirnov.net>\r
50 Subject: Re: Vim plugins\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: Fri, 10 Aug 2012 08:14:30 -0000\r
64 \r
65 \r
66 On Thu, 9 Aug 2012 09:49:19 +0100 (BST), Sepp Tannhuber <sepp.tannhuber@yah=\r
67 oo.de> wrote:\r
68 > Dear Anton,\r
69 > =\r
70 \r
71 > for some reason the file did not exist here. Perhaps I deleted it acciden=\r
72 tally. So I cloned the\r
73 > repository again. And there it is.\r
74 > Now I'm trying=C2=A0if it is useful for me. I changed some code that I ca=\r
75 n use python-ranger to\r
76 > attach files:\r
77 > ##########\r
78 > function! s:NM_compose_attach()\r
79 > =\r
80 \r
81 > if filereadable('/tmp/chosendir')\r
82 > silent !ranger --choosefiles=3D/tmp/chosenfiles --choosedir=3D/tmp/chosen=\r
83 dir "$(cat /tmp/chosendir)"\r
84 > else\r
85 > silent !ranger --choosefiles=3D/tmp/chosenfiles --choosedir=3D/tmp/chosen=\r
86 dir\r
87 > endif\r
88 > if filereadable('/tmp/chosenfiles')\r
89 > let attachments =3D readfile('/tmp/chosenfiles')\r
90 > call system('rm /tmp/chosenfiles')\r
91 > for attach in attachments\r
92 > python nm_vim.get_current_buffer().attach(vim.eval('attach'))\r
93 > endfor\r
94 > call append(10, map(attachments, '"Attach: ".escape(v:val," \t\\")'))\r
95 > redraw!\r
96 > endif\r
97 > endfunction\r
98 > ##########\r
99 > It's even possible to mark and attach multiple files at once.\r
100 > =\r
101 \r
102 \r
103 Looks useful, but needs more work I think.\r
104 First, I think it should be a new function, so there are separate\r
105 'attach one file'/'attach multiple files' commands.\r
106 Second, using hardcoded filenames would break horribly with multiple\r
107 instances of the client running.\r
108 \r
109 > Is it possible suppress the message returned by\r
110 > =C2=A0 =C2=A0 python nm_vim.get_current_buffer()?\r
111 > =C2=A0\r
112 \r
113 What message?\r
114 \r
115 > And do you have=C2=A0an idea=C2=A0what's the reason for the following mes=\r
116 sage?\r
117 > =\r
118 \r
119 > ##########\r
120 > :call <SNR>33_NM_folders_show_search('') =C2=A0 =C2=A0 =C2=A0 Exception i=\r
121 n thread Thread-1: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =\r
122 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\r
123 > Traceback (most recent call last):\r
124 > =C2=A0 File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_i=\r
125 nner\r
126 > =C2=A0 =C2=A0 self.run()\r
127 > =C2=A0 File "/usr/lib/python2.7/threading.py", line 504, in run\r
128 > =C2=A0 =C2=A0 self.__target(*self.__args, **self.__kwargs)\r
129 > =C2=A0 File "/home/sepp/.vim/plugin/nm_vim.py", line 195, in _refresh_thr=\r
130 ead\r
131 > =C2=A0 =C2=A0 authors, subj, tags)).encode('utf-8')\r
132 > UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: o=\r
133 rdinal not in range(128)\r
134 > ##########\r
135 > =\r
136 \r
137 \r
138 Should be fixed now.\r
139 \r
140 -- =\r
141 \r
142 Anton Khirnov\r