GNU bug report logs - #9044
24.0.50; File mode specification error: (error "Malformed -*- line")

Previous Next

Package: emacs;

Reported by: Peter Dyballa <Peter_Dyballa <at> Freenet.DE>

Date: Sun, 10 Jul 2011 23:37:02 UTC

Severity: minor

Found in version 24.0.50

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 9044 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: Glenn Morris <rgm <at> gnu.org>, Peter Dyballa <Peter_Dyballa <at> Freenet.DE>,
	9044 <at> debbugs.gnu.org
Subject: Re: bug#9044: 24.0.50;
	File mode specification error: (error "Malformed -*- line")
Date: Thu, 15 Sep 2011 21:37:37 +0300
> Well, it would make sense to have the "-*-" parser try to be a bit more
> intelligent, wouldn't it?  But I don't really have a good idea what to
> do.
>
> Having Emacs error totally out and refuse to show the image sounds like
> a bad idea, though.

This can be fixed by limiting the search for "-*-" with some reasonable value,
e.g. modifying `set-auto-mode-1' to use: `(min (line-end-position) 1024)'.

Another solution is to add file extensions of binary image formats to
`inhibit-first-line-modes-regexps' or `inhibit-first-line-modes-suffixes'.
But a list of image formats supported by ImageMagick is too long:
(length (imagemagick-types)) => 206.  Perhaps this is not a problem.




This bug report was last modified 13 years and 253 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.