Vim plugins

2012-08-16 Thread Sepp Tannhuber
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


Re: Vim plugins

2012-08-16 Thread Sepp Tannhuber
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
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Vim plugins

2012-08-10 Thread Anton Khirnov

On Thu, 9 Aug 2012 09:49:19 +0100 (BST), Sepp Tannhuber  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 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


Re: Vim plugins

2012-08-10 Thread Anton Khirnov

On Thu, 9 Aug 2012 09:49:19 +0100 (BST), Sepp Tannhuber 
sepp.tannhu...@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 SNR33_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
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Vim plugins

2012-08-09 Thread Sepp Tannhuber
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 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


Re: Vim plugins

2012-08-09 Thread Sepp Tannhuber
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 SNR33_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
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Vim plugins

2012-08-07 Thread Anton Khirnov

On Tue, 7 Aug 2012 09:35:02 +0100 (BST), Sepp Tannhuber  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


Vim plugins

2012-08-07 Thread Sepp Tannhuber
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 
An: Sepp Tannhuber ; "notmuch at 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  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



Vim plugins

2012-08-07 Thread Anton Khirnov

On Mon, 6 Aug 2012 23:29:08 +0100 (BST), Sepp Tannhuber  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


Vim plugins

2012-08-07 Thread Sepp Tannhuber
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



Re: Vim plugins

2012-08-07 Thread Sepp Tannhuber
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 an...@khirnov.net
An: Sepp Tannhuber sepp.tannhu...@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.tannhu...@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

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: Vim plugins

2012-08-07 Thread Anton Khirnov

On Tue, 7 Aug 2012 09:35:02 +0100 (BST), Sepp Tannhuber 
sepp.tannhu...@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
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Vim plugins

2012-08-06 Thread Anton Khirnov

Hi,

On Sun, 5 Aug 2012 14:52:44 +0100 (BST), Sepp Tannhuber  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


Re: Vim plugins

2012-08-06 Thread Sepp Tannhuber
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

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: Vim plugins

2012-08-06 Thread Anton Khirnov

On Mon, 6 Aug 2012 23:29:08 +0100 (BST), Sepp Tannhuber 
sepp.tannhu...@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
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Vim plugins

2012-08-05 Thread Sepp Tannhuber
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