[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: image.el doesn't associate image-mode with .JPG files
From: |
Juanma Barranquero |
Subject: |
Re: image.el doesn't associate image-mode with .JPG files |
Date: |
Wed, 13 Dec 2006 16:58:13 +0100 |
On 12/13/06, Jason Rumney <address@hidden> wrote:
The only problem with this method is that the actual regexp you need is
more complex
Yes, I downloaded the spec; I was just being sloppy in discussing it.
I'm not sure I like adding that to `magic-mode-alist'; why not PNG,
GIF, TIFF and other easily recognizable formats?
image-jpeg-p has a much more
relaxed check, basically "^\xFF\xD8\xFF[\xE0-\xEF]..+(JFIF|Exif)", but
with the search for JFIF|Exif limited based on the first two bytes of
the ..+ portion - which indicate the length of the file header.
Post-22.1, perhaps `magic-mode-alist' could be extended to also allow
(MATCHER . FUNCTION) pairs (MATCHER being a predicate on the text of
the current buffer, starting from the point) in addition to the
current (REGEXP . FUNCTION). That would allow reusing `image-jpeg-p'
(once suitable adapted).
/L/e/k/t/u
- image.el doesn't associate image-mode with .JPG files, Chris Moore, 2006/12/12
- Re: image.el doesn't associate image-mode with .JPG files, Juanma Barranquero, 2006/12/12
- Re: image.el doesn't associate image-mode with .JPG files, Miles Bader, 2006/12/12
- Re: image.el doesn't associate image-mode with .JPG files, Juanma Barranquero, 2006/12/12
- Re: image.el doesn't associate image-mode with .JPG files, Chris Moore, 2006/12/12
- Re: image.el doesn't associate image-mode with .JPG files, Richard Stallman, 2006/12/12
- Re: image.el doesn't associate image-mode with .JPG files, Mathias Dahl, 2006/12/13
- Re: image.el doesn't associate image-mode with .JPG files, Jason Rumney, 2006/12/13
- Re: image.el doesn't associate image-mode with .JPG files,
Juanma Barranquero <=
- Re: image.el doesn't associate image-mode with .JPG files, Chris Moore, 2006/12/13
- Re: image.el doesn't associate image-mode with .JPG files, Juanma Barranquero, 2006/12/13
- Re: image.el doesn't associate image-mode with .JPG files, Chris Moore, 2006/12/13
- Re: image.el doesn't associate image-mode with .JPG files, Juanma Barranquero, 2006/12/13
- Re: image.el doesn't associate image-mode with .JPG files, Miles Bader, 2006/12/13
- Re: image.el doesn't associate image-mode with .JPG files, Jason Rumney, 2006/12/14
- Re: image.el doesn't associate image-mode with .JPG files, Kevin Rodgers, 2006/12/14
- Re: image.el doesn't associate image-mode with .JPG files, Richard Stallman, 2006/12/15
- Re: image.el doesn't associate image-mode with .JPG files, Jason Rumney, 2006/12/15
- Re: image.el doesn't associate image-mode with .JPG files, Kim F. Storm, 2006/12/15