Manuel Ortega wrote:

> On Saturday, June 14, 2014 at 11:51:59 AM UTC-4, Justin M. Keyes wrote:
> > With shelltemp=0, Vim automatically falls back to using temp files if
> > pipes don't work. So why isn't shelltemp=0 the default?
> > 
> > If I understand correctly, 'shelltemp' affects:
> > 
> > :!
> > :w !foo
> > :r !foo
> > 
> > But it does _not_ affect system(). Is that because it just hasn't been
> > implemented for system(), or is it a design decision? system() often
> > has temp file permissions issues on Windows[1][2][3][4], so using
> > pipes could make system() more reliable.
> > 
> > Another question. :help 'shelltemp' says:
> > 
> >         The advantage of using a temp file is that the file type and 
> > encoding
> >         can be detected.
> >         The FilterReadPre, FilterReadPost and FilterWritePre,
> >         FilterWritePost autocommands event are not triggered when
> >         'shelltemp' is off.
> > 
> > Is there a technical reason this can't be done?
> > 
> > Thanks!
> > 
> > [1] https://groups.google.com/forum/#!msg/vim_use/JSXaM9YjWKo/HtHn36WFb_kJ
> > [2] https://groups.google.com/forum/#!msg/vim_use/adD_-9yBCEU/Y0ul-OwXGpYJ
> > [3] https://github.com/mattn/gist-vim/issues/48#issuecomment-12916349
> > [4] https://groups.google.com/forum/#!msg/vim_use/oU7y-hmQoNc/2qQnkPl6aKkJ
> > 
> > Justin M. Keyes
> 
> I would very much like to know the answer to the OP's question, since
> I would like the ability to force system() to obey &noshelltemp.

It's implementation.  system() uses get_cmd_output(), which always uses
temp files.  Making it use pipes is going to be some work.  And it won't
be 100% the same, thus it should be enabled explicitly.

There are some subtle differences, but they may cause a hang, thus
changing defaults isn't a good idea.

-- 
hundred-and-one symptoms of being an internet addict:
268. You get up in the morning and go online before getting your coffee.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui