Re: Vim plugins
authorAnton Khirnov <anton@khirnov.net>
Fri, 10 Aug 2012 08:13:55 +0000 (10:13 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:49:01 +0000 (09:49 -0800)
81/0900bd941fd92206a0b2176b8fae91417adf18 [new file with mode: 0644]

diff --git a/81/0900bd941fd92206a0b2176b8fae91417adf18 b/81/0900bd941fd92206a0b2176b8fae91417adf18
new file mode 100644 (file)
index 0000000..a5636d7
--- /dev/null
@@ -0,0 +1,142 @@
+Return-Path: <anton@khirnov.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 9286C431FAF\r
+       for <notmuch@notmuchmail.org>; Fri, 10 Aug 2012 01:14:30 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id 4vA1JvIY54-y for <notmuch@notmuchmail.org>;\r
+       Fri, 10 Aug 2012 01:14:29 -0700 (PDT)\r
+Received: from lain.khirnov.net (lain.khirnov.net [176.97.15.12])\r
+       by olra.theworths.org (Postfix) with ESMTP id D511F431FAE\r
+       for <notmuch@notmuchmail.org>; Fri, 10 Aug 2012 01:14:28 -0700 (PDT)\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by lain.khirnov.net (Postfix) with ESMTP id 32E59C2C4C;\r
+       Fri, 10 Aug 2012 10:14:27 +0200 (CEST)\r
+Received: from lain.khirnov.net ([127.0.0.1])\r
+       by localhost (mail.khirnov.net [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id R+A7jgaMfUWh; Fri, 10 Aug 2012 10:14:25 +0200 (CEST)\r
+Received: from daenerys.khirnov.net (unknown\r
+       [IPv6:2002:b061:f0a:1:52e5:49ff:fe3d:a3f2])\r
+       by lain.khirnov.net (Postfix) with ESMTP id B45F7C1513;\r
+       Fri, 10 Aug 2012 10:14:25 +0200 (CEST)\r
+Received: from daenerys.khirnov.net (localhost [127.0.0.1])\r
+       by daenerys.khirnov.net (Postfix) with ESMTP id 78FBA122CBF;\r
+       Fri, 10 Aug 2012 10:13:55 +0200 (CEST)\r
+Content-Type: text/plain; charset="utf-8"\r
+MIME-Version: 1.0\r
+Content-Transfer-Encoding: quoted-printable\r
+User-Agent: notmuch-vimpy\r
+Message-ID: <20120810081355.5861.36559@daenerys.khirnov.net>\r
+Date: Fri, 10 Aug 2012 10:13:55 +0200\r
+References: <1344174764.11525.YahooMailNeo@web171404.mail.ir2.yahoo.com>\r
+       <20120806161738.7080.82028@daenerys.khirnov.net>\r
+       <1344292148.78234.YahooMailNeo@web171405.mail.ir2.yahoo.com>\r
+       <20120807044234.29222.72622@daenerys.khirnov.net>\r
+       <1344328502.63480.YahooMailNeo@web171406.mail.ir2.yahoo.com>\r
+       <20120807093905.29222.57092@daenerys.khirnov.net>\r
+       <1344502159.57334.YahooMailNeo@web171405.mail.ir2.yahoo.com>\r
+To: Sepp Tannhuber <sepp.tannhuber@yahoo.de>,\r
+       "notmuch@notmuchmail.org" <notmuch@notmuchmail.org>\r
+In-Reply-To: <1344502159.57334.YahooMailNeo@web171405.mail.ir2.yahoo.com>\r
+From: Anton Khirnov <anton@khirnov.net>\r
+Subject: Re: Vim plugins\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 10 Aug 2012 08:14:30 -0000\r
+\r
+\r
+On Thu, 9 Aug 2012 09:49:19 +0100 (BST), Sepp Tannhuber <sepp.tannhuber@yah=\r
+oo.de> wrote:\r
+> Dear Anton,\r
+> =\r
+\r
+> for some reason the file did not exist here. Perhaps I deleted it acciden=\r
+tally. So I cloned the\r
+> repository again. And there it is.\r
+> Now I'm trying=C2=A0if it is useful for me. I changed some code that I ca=\r
+n use python-ranger to\r
+> attach files:\r
+> ##########\r
+> function! s:NM_compose_attach()\r
+> =\r
+\r
+> if filereadable('/tmp/chosendir')\r
+> silent !ranger --choosefiles=3D/tmp/chosenfiles --choosedir=3D/tmp/chosen=\r
+dir "$(cat /tmp/chosendir)"\r
+> else\r
+> silent !ranger --choosefiles=3D/tmp/chosenfiles --choosedir=3D/tmp/chosen=\r
+dir\r
+> endif\r
+> if filereadable('/tmp/chosenfiles')\r
+> let attachments =3D readfile('/tmp/chosenfiles')\r
+> call system('rm /tmp/chosenfiles')\r
+> for attach in attachments\r
+> python nm_vim.get_current_buffer().attach(vim.eval('attach'))\r
+> endfor\r
+> call append(10, map(attachments, '"Attach: ".escape(v:val," \t\\")'))\r
+> redraw!\r
+> endif\r
+> endfunction\r
+> ##########\r
+> It's even possible to mark and attach multiple files at once.\r
+> =\r
+\r
+\r
+Looks useful, but needs more work I think.\r
+First, I think it should be a new function, so there are separate\r
+'attach one file'/'attach multiple files' commands.\r
+Second, using hardcoded filenames would break horribly with multiple\r
+instances of the client running.\r
+\r
+> Is it possible suppress the message returned by\r
+> =C2=A0 =C2=A0 python nm_vim.get_current_buffer()?\r
+> =C2=A0\r
+\r
+What message?\r
+\r
+> And do you have=C2=A0an idea=C2=A0what's the reason for the following mes=\r
+sage?\r
+> =\r
+\r
+> ##########\r
+> :call <SNR>33_NM_folders_show_search('') =C2=A0 =C2=A0 =C2=A0 Exception i=\r
+n thread Thread-1: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =\r
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\r
+> Traceback (most recent call last):\r
+> =C2=A0 File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_i=\r
+nner\r
+> =C2=A0 =C2=A0 self.run()\r
+> =C2=A0 File "/usr/lib/python2.7/threading.py", line 504, in run\r
+> =C2=A0 =C2=A0 self.__target(*self.__args, **self.__kwargs)\r
+> =C2=A0 File "/home/sepp/.vim/plugin/nm_vim.py", line 195, in _refresh_thr=\r
+ead\r
+> =C2=A0 =C2=A0 authors, subj, tags)).encode('utf-8')\r
+> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: o=\r
+rdinal not in range(128)\r
+> ##########\r
+> =\r
+\r
+\r
+Should be fixed now.\r
+\r
+-- =\r
+\r
+Anton Khirnov\r