Bug#249591: marked as done (vim-common: halts with E21 error when using :help)

Debian Bug Tracking System owner@bugs.debian.org
Mon, 21 Mar 2005 04:48:50 -0800


Your message dated Mon, 21 Mar 2005 13:33:13 +0100
with message-id <20050321123313.GA3946@amaretto.inria.fr>
and subject line Bug#249591: vim-common: halts with E21 error when using :help
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)

--------------------------------------
Received: (at submit) by bugs.debian.org; 18 May 2004 11:44:43 +0000
>From oystein@samfundet.no Tue May 18 04:44:43 2004
Return-path: <oystein@samfundet.no>
Received: from master.debian.org [146.82.138.7] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1BQ31W-0002sr-00; Tue, 18 May 2004 04:44:43 -0700
Received: from dhcp-103-252.idi.ntnu.no ([127.0.0.1]) [129.241.103.252] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1BQ31V-00027K-00; Tue, 18 May 2004 06:44:41 -0500
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: =?iso-8859-1?q?=D8ystein_Urdahl?= <oystein@samfundet.no>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: vim-common: halts with E21 error when using :help
X-Mailer: reportbug 2.59
Date: Tue, 18 May 2004 13:44:37 +0200
X-Debbugs-Cc: oystein@samfundet.no
Message-Id: <E1BQ31V-00027K-00@master.debian.org>
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-7.5 required=4.0 tests=BAYES_10,HAS_PACKAGE,
	OUR_MTA_MSGID,X_DEBBUGS_CC autolearn=ham 
	version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

Package: vim-common
Version: 1:6.2-532+3
Severity: normal

The help-files are opened with 'nomodifiable' and since they are .txt
files my BufRead Auto command triggers and tries to change the
fileencoding to iso-8859-1. This is disallowed by the 'nomodifiable'
flag and it halts displaying:

Error detected while processing BufRead Auto commands for "*.txt":
E21: Cannot make changes, 'modifiable' is off: fileencoding=iso-8859-1
Hit ENTER or type command to continue

Relevant extract from my .vimrc:

au BufNewFile,BufRead mutt*,*.txt,*/.followup    set tw=77 ai nocindent fileencoding=iso-8859-1


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.3.2004.02.29-1
Locale: LANG=en_US, LC_CTYPE=en_US

Versions of packages vim-common depends on:
ii  vim                          1:6.2-532+3 Vi IMproved - enhanced vi editor

-- no debconf information

---------------------------------------
Received: (at 249591-done) by bugs.debian.org; 21 Mar 2005 12:33:55 +0000
>From habouzit@amaretto.inria.fr Mon Mar 21 04:33:55 2005
Return-path: <habouzit@amaretto.inria.fr>
Received: from nez-perce.inria.fr [192.93.2.78] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1DDM6L-0007Ao-00; Mon, 21 Mar 2005 04:33:45 -0800
Received: from amaretto.inria.fr (amaretto.inria.fr [128.93.8.127])
	by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j2LCXE2f032209;
	Mon, 21 Mar 2005 13:33:14 +0100
Received: by amaretto.inria.fr (Postfix, from userid 12657)
	id E82AB12C6D; Mon, 21 Mar 2005 13:33:13 +0100 (CET)
Date: Mon, 21 Mar 2005 13:33:13 +0100
To: =?iso-8859-1?Q?=D8ystein?= Urdahl <oystein@samfundet.no>,
        249591-done@bugs.debian.org
Subject: Re: Bug#249591: vim-common: halts with E21 error when using :help
Message-ID: <20050321123313.GA3946@amaretto.inria.fr>
References: <20040518120638.GA21580@rollcage.inittab.de> <Pine.LNX.4.21.0405181554530.18709-100000@cassarossa.samfundet.no>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
In-Reply-To: <Pine.LNX.4.21.0405181554530.18709-100000@cassarossa.samfundet.no>
User-Agent: Mutt/1.5.6+20040907i
From: habouzit@amaretto.inria.fr (Pierre Habouzit)
X-Miltered: at nez-perce with ID 423EBF0A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)!
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by nez-perce.inria.fr id j2LCXE2f032209
Delivered-To: 249591-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

On Tue, May 18, 2004 at 04:44:36PM +0200, =D8ystein Urdahl wrote:
> On Tue, 18 May 2004, Norbert Tretkowski wrote:
>=20
> > * =D8ystein Urdahl wrote:
> > > The help-files are opened with 'nomodifiable' and since they are .t=
xt
> > > files my BufRead Auto command triggers and tries to change the
> > > fileencoding to iso-8859-1. This is disallowed by the 'nomodifiable=
'
> > > flag and it halts displaying:
> > >=20
> > > Error detected while processing BufRead Auto commands for "*.txt":
> > > E21: Cannot make changes, 'modifiable' is off: fileencoding=3Diso-8=
859-1
> > > Hit ENTER or type command to continue
> > >=20
> > > Relevant extract from my .vimrc:
> > >=20
> > > au BufNewFile,BufRead mutt*,*.txt,*/.followup set tw=3D77 ai nocind=
ent
> > > fileencoding=3Diso-8859-1
> >=20
> > I don't see the bug here. You try to modify a nomodifiable file.
> > That's not a bug, that's just PEBKAC.
>=20
> I'm not sure I agree with you there since this is a change in behaviour
> from earlier. Unfortunatly I can't tell exactly when this change happen=
d,
> but I _think_ it's quite recent.
>=20
> Since you don't consider this change in behaviour a bug I wrote a
> workaround to avoid getting the error every time I need the vim help. I
> includes it here in case someone else also is annoyed by it.
>=20
> " 'nomodifiable' disallows changes to 'fileformat' and 'fileencoding'
> " so remove those entries in the else clause
> function! Noma_workaround()
>   if exists("modifiable")
>     set tw=3D77 ai nocindent fileencoding=3Diso-8859-1
>   else
>     set tw=3D77 ai nocindent
>   endif
> endfunction
>=20
> au BufNewFile,BufRead mutt*,*.txt,*/.followup call Noma_workaround()
>=20
>=20
> I see now that I was a bit to fast when sending this bug report in and
> that it should have been filed against vim and not vim-common. So if yo=
u
> could move it over there before you close it that would be nice.

  well, IMHO, like norbert said, the bug is well in vim-common.  anyway,
I don't see the bug here, and I believe you were the one that made a bad
vimrc.  with your setting, if you open any read-only .txt file, then you
will have such errors.

  Like norbert said, your config file has always been buggy, but you
didn't triggered the bug with :help before since help file was
compressed and is not anymore.  but I assure you that if you edit any
/usr/**/foo.txt file, it would trigger the bug too.

  That's why I consider it not beeing a bug.  and I suggest you to
always use your function that checks if file is modifiable or not.

  btw you can use a try statement too.
--=20
=B7O=B7  Pierre Habouzit
=B7=B7O
OOO                                                http://www.madism.org