unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] vim: skip trailing slash for g:notmuch_compose_temp_file_dir
@ 2011-07-10 19:42 Uwe Kleine-König
  2011-07-16 19:10 ` Felipe Contreras
  0 siblings, 1 reply; 2+ messages in thread
From: Uwe Kleine-König @ 2011-07-10 19:42 UTC (permalink / raw)
  To: notmuch

With the trailing slash I get

	Error detected while processing function <SNR>10_NM_new_mail..<SNR>10_NM_cmd_compose..<SNR>10_NM_newComposeBuffer..<SNR>10_NM_newFileBuffer:
	line    3:
	E739: Cannot create directory: /home/ukleinek/.notmuch/compose/

when hitting 'm' to compose a new mail. strace shows:

	stat("/home/ukleinek/.notmuch/compose/", 0x7fffee314a10) = -1 ENOENT (No such file or directory)
	stat("/home/ukleinek/.notmuch/compose/", 0x7fffee314e30) = -1 ENOENT (No such file or directory)
	stat("/home/ukleinek/.notmuch/compose", 0x7fffee315270) = -1 ENOENT (No such file or directory)
	stat("/home/ukleinek/.notmuch", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
	mkdir("/home/ukleinek/.notmuch/compose", 0755) = 0
	mkdir("/home/ukleinek/.notmuch/compose/", 0755) = -1 EEXIST (File exists)

so it seems vim's mkdir() isn't able to handle a trailing slash.
---
Hello,

is that a bug in vim? (BTW, I'm using vim 2:7.2.445+hg~cb94c42c0e1a-1 from Debian
squeeze)

Best regards
Uwe

 vim/plugin/notmuch.vim |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim
index 768a011..181e626 100644
--- a/vim/plugin/notmuch.vim
+++ b/vim/plugin/notmuch.vim
@@ -58,7 +58,7 @@ let s:notmuch_defaults = {
         \
         \ 'g:notmuch_compose_insert_mode_start':     1                            ,
         \ 'g:notmuch_compose_header_help':           1                            ,
-        \ 'g:notmuch_compose_temp_file_dir':         '~/.notmuch/compose/'        ,
+        \ 'g:notmuch_compose_temp_file_dir':         '~/.notmuch/compose'         ,
         \ }
 
 " defaults for g:notmuch_initial_search_words
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] vim: skip trailing slash for g:notmuch_compose_temp_file_dir
  2011-07-10 19:42 [PATCH] vim: skip trailing slash for g:notmuch_compose_temp_file_dir Uwe Kleine-König
@ 2011-07-16 19:10 ` Felipe Contreras
  0 siblings, 0 replies; 2+ messages in thread
From: Felipe Contreras @ 2011-07-16 19:10 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: notmuch

2011/7/10 Uwe Kleine-König <ukleinek@strlen.de>:
> With the trailing slash I get
>
>        Error detected while processing function <SNR>10_NM_new_mail..<SNR>10_NM_cmd_compose..<SNR>10_NM_newComposeBuffer..<SNR>10_NM_newFileBuffer:
>        line    3:
>        E739: Cannot create directory: /home/ukleinek/.notmuch/compose/
>
> when hitting 'm' to compose a new mail. strace shows:
>
>        stat("/home/ukleinek/.notmuch/compose/", 0x7fffee314a10) = -1 ENOENT (No such file or directory)
>        stat("/home/ukleinek/.notmuch/compose/", 0x7fffee314e30) = -1 ENOENT (No such file or directory)
>        stat("/home/ukleinek/.notmuch/compose", 0x7fffee315270) = -1 ENOENT (No such file or directory)
>        stat("/home/ukleinek/.notmuch", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
>        mkdir("/home/ukleinek/.notmuch/compose", 0755) = 0
>        mkdir("/home/ukleinek/.notmuch/compose/", 0755) = -1 EEXIST (File exists)
>
> so it seems vim's mkdir() isn't able to handle a trailing slash.
> ---
> Hello,
>
> is that a bug in vim? (BTW, I'm using vim 2:7.2.445+hg~cb94c42c0e1a-1 from Debian
> squeeze)

Weird, it works fine for me with vim from F15 (7.3).

Anyway, if it helps, I guess it should go in. Applied.

Thanks.

-- 
Felipe Contreras

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-07-16 19:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-10 19:42 [PATCH] vim: skip trailing slash for g:notmuch_compose_temp_file_dir Uwe Kleine-König
2011-07-16 19:10 ` Felipe Contreras

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).