* Vim plugins @ 2012-08-05 13:52 Sepp Tannhuber 2012-08-06 16:17 ` Anton Khirnov 0 siblings, 1 reply; 9+ messages in thread From: Sepp Tannhuber @ 2012-08-05 13:52 UTC (permalink / raw) To: notmuch@notmuchmail.org Dear all, I would like to check the available vim plugins. At least I found three: - the original one - Felipe's ruby plugin - Anton's python plugin First of all can you tell me where I find the files of the python plugin? I tried $ git clone git://git.khirnov.net/git/notmuch But I cannot find the python files in the vim directory. What am I doing wrong? Then I found some information that the ruby plugin should be able to deal with attachments. I could not find a way to attach files. Is there any additional information how these scripts can be used? The screencast which was mentioned in this mailing list is interesting. But it does not show how these actions can be done. I am not very familiar with coding. So any further information would be helpful. Thanks in advance ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Vim plugins 2012-08-05 13:52 Vim plugins Sepp Tannhuber @ 2012-08-06 16:17 ` Anton Khirnov 2012-08-06 22:29 ` Sepp Tannhuber 0 siblings, 1 reply; 9+ messages in thread From: Anton Khirnov @ 2012-08-06 16:17 UTC (permalink / raw) To: Sepp Tannhuber, notmuch@notmuchmail.org Hi, On Sun, 5 Aug 2012 14:52:44 +0100 (BST), Sepp Tannhuber <sepp.tannhuber@yahoo.de> wrote: > Dear all, > > I would like to check the available vim plugins. At least I found three: > - the original one > - Felipe's ruby plugin > - Anton's python plugin > > First of all can you tell me where I find the files of the python plugin? > I tried > $ git clone git://git.khirnov.net/git/notmuch > But I cannot find the python files in the vim directory. What am I doing wrong? > you have to checkout the vim branch, then the files are in vim/plugin I deleted all other branches from my repo now so nobody else gets confused like this. -- Anton Khirnov ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Vim plugins 2012-08-06 16:17 ` Anton Khirnov @ 2012-08-06 22:29 ` Sepp Tannhuber 2012-08-07 4:42 ` Anton Khirnov 0 siblings, 1 reply; 9+ messages in thread From: Sepp Tannhuber @ 2012-08-06 22:29 UTC (permalink / raw) To: Anton Khirnov, notmuch@notmuchmail.org Hi Anton, thanks for answering. Finally I found it. My next problem is that I have absolutely no idea how to use it. I followed the instructions I have found in this mailing list and copied the syntax files into my ~/.vim/syntax and the two plugin files into my ~/.vim/plugin folders. Then I called vi -c 'NMVimpy()' The result is E492: Not an editor command: NMVimpy() I tried vi -c ':nm_vimpy()' as well. And vi answers No mapping found Is there a README file or any other kind of documentation for your script? Best regards Joseph ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Vim plugins 2012-08-06 22:29 ` Sepp Tannhuber @ 2012-08-07 4:42 ` Anton Khirnov 2012-08-07 8:35 ` Sepp Tannhuber 0 siblings, 1 reply; 9+ messages in thread From: Anton Khirnov @ 2012-08-07 4:42 UTC (permalink / raw) To: Sepp Tannhuber, notmuch@notmuchmail.org On Mon, 6 Aug 2012 23:29:08 +0100 (BST), Sepp Tannhuber <sepp.tannhuber@yahoo.de> wrote: > Hi Anton, > > thanks for answering. Finally I found it. My next problem is that I have absolutely no idea how to use it. > I followed the instructions I have found in this mailing list and copied the syntax files into my ~/.vim/syntax > and the two plugin files into my ~/.vim/plugin folders. > > Then I called > vi -c 'NMVimpy()' > The result is > E492: Not an editor command: NMVimpy() > > I tried > vi -c ':nm_vimpy()' > as well. And vi answers > No mapping found > I invoke it as vim -c :NMVimpy > Is there a README file or any other kind of documentation for your script? > I wish. Patches welcome ;) -- Anton Khirnov ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Vim plugins 2012-08-07 4:42 ` Anton Khirnov @ 2012-08-07 8:35 ` Sepp Tannhuber 2012-08-07 9:39 ` Anton Khirnov 0 siblings, 1 reply; 9+ messages in thread From: Sepp Tannhuber @ 2012-08-07 8:35 UTC (permalink / raw) To: Anton Khirnov, notmuch@notmuchmail.org That's strange. I suppose there must be a function called NMVimpy in one of your scripts. But grep -R NMVimpy * in your notmuch directory does not find anything. I am completely at a loss. ----- Ursprüngliche Message ----- Von: Anton Khirnov <anton@khirnov.net> An: Sepp Tannhuber <sepp.tannhuber@yahoo.de>; "notmuch@notmuchmail.org" <notmuch@notmuchmail.org> CC: Gesendet: 6:42 Dienstag, 7.August 2012 Betreff: Re: Vim plugins On Mon, 6 Aug 2012 23:29:08 +0100 (BST), Sepp Tannhuber <sepp.tannhuber@yahoo.de> wrote: > Hi Anton, > > thanks for answering. Finally I found it. My next problem is that I have absolutely no idea how to use it. > I followed the instructions I have found in this mailing list and copied the syntax files into my ~/.vim/syntax > and the two plugin files into my ~/.vim/plugin folders. > > Then I called > vi -c 'NMVimpy()' > The result is > E492: Not an editor command: NMVimpy() > > I tried > vi -c ':nm_vimpy()' > as well. And vi answers > No mapping found > I invoke it as vim -c :NMVimpy > Is there a README file or any other kind of documentation for your script? > I wish. Patches welcome ;) -- Anton Khirnov ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Vim plugins 2012-08-07 8:35 ` Sepp Tannhuber @ 2012-08-07 9:39 ` Anton Khirnov 2012-08-09 8:49 ` Sepp Tannhuber 0 siblings, 1 reply; 9+ messages in thread From: Anton Khirnov @ 2012-08-07 9:39 UTC (permalink / raw) To: Sepp Tannhuber, notmuch@notmuchmail.org On Tue, 7 Aug 2012 09:35:02 +0100 (BST), Sepp Tannhuber <sepp.tannhuber@yahoo.de> wrote: > That's strange. I suppose there must be a function called > NMVimpy > in one of your scripts. But > grep -R NMVimpy * > in your notmuch directory does not find anything. I am completely at a loss. > vim/plugin/notmuch-vimpy.vim, line 817 -- Anton Khirnov ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Vim plugins 2012-08-07 9:39 ` Anton Khirnov @ 2012-08-09 8:49 ` Sepp Tannhuber 2012-08-10 8:13 ` Anton Khirnov 0 siblings, 1 reply; 9+ messages in thread From: Sepp Tannhuber @ 2012-08-09 8:49 UTC (permalink / raw) To: Anton Khirnov, notmuch@notmuchmail.org Dear Anton, for some reason the file did not exist here. Perhaps I deleted it accidentally. So I cloned the repository again. And there it is. Now I'm trying if it is useful for me. I changed some code that I can use python-ranger to attach files: ########## function! s:NM_compose_attach() if filereadable('/tmp/chosendir') silent !ranger --choosefiles=/tmp/chosenfiles --choosedir=/tmp/chosendir "$(cat /tmp/chosendir)" else silent !ranger --choosefiles=/tmp/chosenfiles --choosedir=/tmp/chosendir endif if filereadable('/tmp/chosenfiles') let attachments = readfile('/tmp/chosenfiles') call system('rm /tmp/chosenfiles') for attach in attachments python nm_vim.get_current_buffer().attach(vim.eval('attach')) endfor call append(10, map(attachments, '"Attach: ".escape(v:val," \t\\")')) redraw! endif endfunction ########## It's even possible to mark and attach multiple files at once. Is it possible suppress the message returned by python nm_vim.get_current_buffer()? And do you have an idea what's the reason for the following message? ########## :call <SNR>33_NM_folders_show_search('') Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 504, in run self.__target(*self.__args, **self.__kwargs) File "/home/sepp/.vim/plugin/nm_vim.py", line 195, in _refresh_thread authors, subj, tags)).encode('utf-8') UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128) ########## Thanks for your great work and support Joseph ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Vim plugins 2012-08-09 8:49 ` Sepp Tannhuber @ 2012-08-10 8:13 ` Anton Khirnov 2012-08-16 17:20 ` Sepp Tannhuber 0 siblings, 1 reply; 9+ messages in thread From: Anton Khirnov @ 2012-08-10 8:13 UTC (permalink / raw) To: Sepp Tannhuber, notmuch@notmuchmail.org On Thu, 9 Aug 2012 09:49:19 +0100 (BST), Sepp Tannhuber <sepp.tannhuber@yahoo.de> wrote: > Dear Anton, > > for some reason the file did not exist here. Perhaps I deleted it accidentally. So I cloned the > repository again. And there it is. > Now I'm trying if it is useful for me. I changed some code that I can use python-ranger to > attach files: > ########## > function! s:NM_compose_attach() > > if filereadable('/tmp/chosendir') > silent !ranger --choosefiles=/tmp/chosenfiles --choosedir=/tmp/chosendir "$(cat /tmp/chosendir)" > else > silent !ranger --choosefiles=/tmp/chosenfiles --choosedir=/tmp/chosendir > endif > if filereadable('/tmp/chosenfiles') > let attachments = readfile('/tmp/chosenfiles') > call system('rm /tmp/chosenfiles') > for attach in attachments > python nm_vim.get_current_buffer().attach(vim.eval('attach')) > endfor > call append(10, map(attachments, '"Attach: ".escape(v:val," \t\\")')) > redraw! > endif > endfunction > ########## > It's even possible to mark and attach multiple files at once. > Looks useful, but needs more work I think. First, I think it should be a new function, so there are separate 'attach one file'/'attach multiple files' commands. Second, using hardcoded filenames would break horribly with multiple instances of the client running. > Is it possible suppress the message returned by > python nm_vim.get_current_buffer()? > What message? > And do you have an idea what's the reason for the following message? > > ########## > :call <SNR>33_NM_folders_show_search('') Exception in thread Thread-1: > Traceback (most recent call last): > File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner > self.run() > File "/usr/lib/python2.7/threading.py", line 504, in run > self.__target(*self.__args, **self.__kwargs) > File "/home/sepp/.vim/plugin/nm_vim.py", line 195, in _refresh_thread > authors, subj, tags)).encode('utf-8') > UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128) > ########## > Should be fixed now. -- Anton Khirnov ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Vim plugins 2012-08-10 8:13 ` Anton Khirnov @ 2012-08-16 17:20 ` Sepp Tannhuber 0 siblings, 0 replies; 9+ messages in thread From: Sepp Tannhuber @ 2012-08-16 17:20 UTC (permalink / raw) To: Anton Khirnov, notmuch@notmuchmail.org Dear Anton, >> Is it possible suppress the message returned by >> python nm_vim.get_current_buffer()? > What message? Something like this: Notmuch-Attachment: filename.pdf:application/pdf > [...] > Should be fixed now. Thanks a lot! I am back from holidays right now and will test it during the next weeks. Cheers Joseph ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-08-16 17:21 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-08-05 13:52 Vim plugins Sepp Tannhuber 2012-08-06 16:17 ` Anton Khirnov 2012-08-06 22:29 ` Sepp Tannhuber 2012-08-07 4:42 ` Anton Khirnov 2012-08-07 8:35 ` Sepp Tannhuber 2012-08-07 9:39 ` Anton Khirnov 2012-08-09 8:49 ` Sepp Tannhuber 2012-08-10 8:13 ` Anton Khirnov 2012-08-16 17:20 ` Sepp Tannhuber
Code repositories for project(s) associated with this public inbox https://yhetil.org/notmuch.git/ This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).