Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 53437 - vim-6.3 doesn't work with crontab
Summary: vim-6.3 doesn't work with crontab
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Vim Maintainers
Depends on:
Reported: 2004-06-09 10:52 UTC by Marcin Kryczek (RETIRED)
Modified: 2004-06-14 10:00 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Kryczek (RETIRED) gentoo-dev 2004-06-09 10:52:53 UTC
i'm not sure why, but i think it's connected with mtime of edited files. crontab always writes, that no changes have been made in file. 

Reproducible: Always
Steps to Reproduce:
1. crontab -e
2. make some changes in file
3. save end exit vim (:wq)

Actual Results:  
crontab: no changes made to crontab

Expected Results:  
crontab should be actualized

i've found on google this: maybe helpfull
Comment 1 Ciaran McCreesh 2004-06-09 10:57:33 UTC
I can't reproduce this. Could you paste your emerge info output please? 
Comment 2 Marcin Kryczek (RETIRED) gentoo-dev 2004-06-09 11:02:28 UTC
sure, here it is:
Portage 2.0.50-r8 (default-x86-1.4, gcc-3.3.3, glibc-, 2.6.5)
System uname: 2.6.5 i686 AMD Athlon(tm) XP 1700+
Gentoo Base System version 1.4.16
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5
CFLAGS="-march=athlon-xp -O3 -mfpmath=sse -pipe -ffast-math -DNDEBUG  -DG_DISABLE_ASSERT -fomit-frame-pointer"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O2 -mfpmath=sse -pipe -ffast-math -DNDEBUG -DG_DISABLE_ASSERT"
FEATURES="autoaddcvs ccache sandbox"
USE="3dnow X aalib apache2 avi crypt cups dvd encode esd fbcon flash gif glut gpm gtk gtk2 imlib imlib2 java javascript jikes jpeg lcms libwww maildir mbox memlimit mikmod mmx motif moznocompose moznoirc moznomail mpeg mysql ncurses nls nocardbus nvidia oggvorbis opengl oss pam pda pdflib perl png ppds python quicktime readline samba sasl sdl serial slang spell sse ssl tcltk tcpd tiff truetype v4l v4l2 videos vim-with-x wmf x86 xmms xv xvid zlib"

i'm sure it's vim's fault, couse everything works just fine if i use nano 
(EDITOR=nano crontab -e) 
Comment 3 Ciaran McCreesh 2004-06-09 11:48:41 UTC
:help crontab sheds some light on this. What do you have set for backupcopy?
Comment 4 Aron Griffis (RETIRED) gentoo-dev 2004-06-09 12:12:08 UTC
Probably a dup of bug 32938
Comment 5 Marcin Kryczek (RETIRED) gentoo-dev 2004-06-09 12:28:42 UTC
that's help indeed. i hadn't set that variable and it was automatically set to 'auto'. i've change it to 'yes' and it works fine. don't know why it worked on previous versions, but anyway thanks for help
Comment 6 Ciaran McCreesh 2004-06-09 12:57:01 UTC
Hrm, maybe we should add something like "autocmd FileType crontab :set backupcopy=yes" to /etc/vim/vimrc inside our augroup gentoo section. Aron, Ryan -- opinions?
Comment 7 Ryan Phillips (RETIRED) gentoo-dev 2004-06-09 16:33:36 UTC
What I find strange is that :help backupcopy mentions that that 'yes' is the default on unix platforms.
Comment 8 Ciaran McCreesh 2004-06-09 17:01:31 UTC
That's just really unclear wording in the docs. What is says is:

'backupcopy' 'bkc'	string	(Vi default for Unix: "yes", otherwise: "auto")

What it means is "if you're on Unix, *and* you're using vi behaviour rather than vim behaviour, then it is 'yes', otherwise it is 'auto'". The relevant code is in src/option.c:405-412:

    {"backupcopy",  "bkc",  P_STRING|P_VIM|P_COMMA|P_NODUP,
			    (char_u *)&p_bkc, PV_NONE,
#ifdef UNIX
			    {(char_u *)"yes", (char_u *)"auto"}
			    {(char_u *)"auto", (char_u *)"auto"}

So if you do vi -u NONE -U NONE -c 'set compatible' , it'll give you "yes".
Comment 9 Ciaran McCreesh 2004-06-14 10:00:18 UTC
Added in an autocmd to the default vimrc that'll stop this from affecting anyone else. No revbump, it's not a significant change.