tags 271338 + patch pending thanks I finally discovered the source of the bug you reported. Since you use ipython as your shell, your environment variable SHELL is set to /usr/bin/ipython.
Vim inherits that setting and when it invokes system("/bin/cat
/etc/papersize") it does it using ipython as shell. Unfortunately for a
shell command to be valid for ipython it must be prepended with "!".
The attached patch for /etc/vim/vimrc solves the problem not using
system() at all to read /etc/papersize. It is applied in the pkg-vim svn
and will be part of the next vim upload.
Cheers.
--
Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy
[EMAIL PROTECTED],debian.org,bononia.it} -%- http://www.bononia.it/zack/
If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. -!-
Index: debian/runtime/vimrc
===================================================================
--- debian/runtime/vimrc (revision 369)
+++ debian/runtime/vimrc (working copy)
@@ -52,16 +52,15 @@
augroup END
" Set paper size from /etc/papersize if available (Debian-specific)
-try
- if filereadable('/etc/papersize')
- let s:papersize = matchstr(system('/bin/cat /etc/papersize'), '\p*')
- if strlen(s:papersize)
- let &printoptions = "paper:" . s:papersize
- endif
- unlet! s:papersize
+if filereadable("/etc/papersize")
+ silent exec "view /etc/papersize"
+ let s:t = getline(".")
+ silent exec "bd!"
+ let s:papersize = matchstr(s:t, "\\p*")
+ if strlen(s:papersize)
+ let &printoptions = "paper:" . s:papersize
endif
-catch /E145/
-endtry
+endif
" The following are commented out as they cause vim to behave a lot
" different from regular vi. They are highly recommended though.
signature.asc
Description: Digital signature

