Error detected while processing modelines

649 views
Skip to first unread message

Cesar Romani

unread,
Nov 16, 2010, 7:30:23 PM11/16/10
to vim...@googlegroups.com
I'm using the latest release of vim 7.3 on Win XP.
When I load the following text test.txt:

--------------------
From: unknownmail.com
Subject: Re: vim: how to use set indentexpr
Date: Sat, 11 Aug 2007 12:50:31 -0500

...
--------------------

I get the following error:
--------------------
Error detected while processing modelines:
line 2:
E518: Unknown option: how
--------------------

No matter where I put the second line on the text I get always the same
error with different 'line'.

Many thanks in advance.

--
Cesar

AK

unread,
Nov 16, 2010, 7:46:14 PM11/16/10
to vim...@googlegroups.com

Vim thinks it's a modeline because it's in the top 5 lines and it's
' vim: ..'. It's probably best to just ignore this since it will only
happen very rarely, or you can do ':set nomodeline' when editing emails.
(for example by detecting that file extension is .eml or something). -ak

John Beckett

unread,
Nov 16, 2010, 11:19:30 PM11/16/10
to vim...@googlegroups.com
AK wrote:
>> Subject: Re: vim: how to use set indentexpr
>
> Vim thinks it's a modeline because it's in the top 5 lines
> and it's ' vim: ..'. It's probably best to just ignore this
> since it will only happen very rarely, or you can do ':set
> nomodeline' when editing emails.
> (for example by detecting that file extension is .eml or
> something). -ak

Modelines present a potential (and in the past, actual) security
vulnerability. The standard plugin vim73/ftplugin/mail.vim
disables modelines because when reading mail anything could be
present in the text. So my advice to the OP would be to ensure
modelines are disabled before reading mail.

John

Reply all
Reply to author
Forward
0 new messages