Your message dated Wed, 3 May 2006 10:25:32 +0200
with message-id <[EMAIL PROTECTED]>
and subject line Bug#365811: vim: setting eol does not mark the buffer modified
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--- Begin Message ---
Package: vim
Version: 1:6.4-007+1
Severity: minor
Setting the eol option does not mark the buffer modified, even when it
would cause a change in the contents of the file:
% echo -n hello > out
% ls -l out
-rw-rw-r-- 1 andrew andrew 5 2006-04-06 15:46 out
% vim out
Note the [noeol].
:set eol
Note no [+].
:set modified?
nomodfiied
:wq
% ls -l out
-rw-rw-r-- 1 andrew andrew 6 2006-04-06 15:48 out
Andrew
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-1-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Versions of packages vim-perl depends on:
ii libatk1.0-0 1.11.3-1 The ATK accessibility toolkit
ii libc6 2.3.6-4 GNU C Library: Shared libraries an
ii libcairo2 1.0.2-3 The Cairo 2D vector graphics libra
ii libfontconfig1 2.3.2-5 generic font configuration library
ii libglib2.0-0 2.10.1-2 The GLib library of C routines
ii libgpmg1 1.19.6-22 General Purpose Mouse - shared lib
ii libgtk2.0-0 2.8.16-1 The GTK+ graphical user interface
ii libice6 6.9.0.dfsg.1-5 Inter-Client Exchange library
ii libncurses5 5.5-1 Shared libraries for terminal hand
ii libpango1.0-0 1.12.0-2 Layout and rendering of internatio
ii libperl5.8 5.8.8-3 Shared Perl library
ii libsm6 6.9.0.dfsg.1-5 X Window System Session Management
ii libx11-6 6.9.0.dfsg.1-5 X Window System protocol client li
ii libxcursor1 1.1.3-1 X cursor management library
ii libxext6 6.9.0.dfsg.1-5 X Window System miscellaneous exte
ii libxi6 6.9.0.dfsg.1-5 X Window System Input extension li
ii libxinerama1 6.9.0.dfsg.1-5 X Window System multi-head display
ii libxrandr2 6.9.0.dfsg.1-5 X Window System Resize, Rotate and
ii libxrender1 1:0.9.0.2-1 X Rendering Extension client libra
ii libxt6 6.9.0.dfsg.1-5 X Toolkit Intrinsics
ii vim-gui-common 1:6.4-007+1 Vi IMproved - Common GUI files
ii vim-runtime 1:6.4-007+1 Vi IMproved - Runtime files
vim-perl recommends no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
Le Mer 3 Mai 2006 07:51, Andrew Pimlott a écrit :
> Package: vim
> Version: 1:6.4-007+1
> Severity: minor
>
> Setting the eol option does not mark the buffer modified, even when
> it would cause a change in the contents of the file:
>
> % echo -n hello > out
> % ls -l out
> -rw-rw-r-- 1 andrew andrew 5 2006-04-06 15:46 out
> % vim out
>
> Note the [noeol].
>
> :set eol
>
> Note no [+].
>
> :set modified?
>
> nomodfiied
>
> :wq
>
> % ls -l out
> -rw-rw-r-- 1 andrew andrew 6 2006-04-06 15:48 out
this is the intended way, please re-read :help 'eol' carefully.
eol does not modify the buffer at all, it *only* ensure that at write
time the last char of the file is an <EOL>.
IIRC (but I may be wrong), The way vim handles the last <EOL> is tricky:
in fact, when you open the file, it remembers if there was one or not.
and at write time, it looks if there was a final <EOL> or not, and
maintain that state (except if you modified the last line, in that case
it always adds one).
So basically, seting eol does not modify the buffer, only its on-disk
representation.
I hope you'll see the subtle distinction.
Cheers,
--
·O· Pierre Habouzit
··O [EMAIL PROTECTED]
OOO http://www.madism.org
pgpKSnTkTY6wH.pgp
Description: PGP signature
--- End Message ---