Am 2000-07-12, um 17:26:08 (+0200) schrieb Pablo Saratxaga:
> > This macro is great, but it uses current locales, so it gives me french
> > date in my spec file.
> > Having also english locales installed, i tried to change this, but even
> > unsetting LANG and LANGUAGE environment variables doesn't change
> > anything. What is the correct way to do this ?
> [...]
> change it to:
> 
> map ,ch /^%changelog/<C-m>o* <C-R>=system("LC_ALL=C date +'%a %b %d %Y'")<C-m>
> 
> and it will work correctly evne on non English locales.

It is a good first approatch, but replaces one bug by two others:

  1) date ends with a "\n"
  2) We have (t)csh users out there (like me) which can't run sh code

so I propose (NOTE : it has to be in one line) :

map ,ch /^%changelog/<C-m>o* <C-R>=system("echo -n `/bin/sh -c \"LC_ALL=C 
date +'%a %b %d %Y'\"`")<C-m>

... slowly it gets an ugly hack ;-)

-- 
                                                        _     
Tsch�ss und bis demn�chst/� bient�t,                  _|_|_   
                                                       (")   *
                                    Stefan             /v\  / 
                                                     /(   )X  Penguin Powered!
+------------------------------------+----------------(m-m)------------------+
| Stefan Siegel                      | http://www.student.uni-kl.de/~siegel/ |
| Kurt-Schumacher-Str. 34 / App. 144 | mailto:[EMAIL PROTECTED]      |
| D-67663 Kaiserslautern             | PGP Public Key:                       |
| Tel.: +49-631-18269                |   finger -l [EMAIL PROTECTED]   |
+------------------------------------+---------------------------------------+

Reply via email to