GNU bug report logs - #14188
24.3.50; ODF files and auto-mode-alist

Previous Next

Package: emacs;

Reported by: Stephen Berman <stephen.berman <at> gmx.net>

Date: Thu, 11 Apr 2013 20:00:02 UTC

Severity: normal

Found in version 24.3.50

Done: Tassilo Horn <tsdh <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 14188 <at> debbugs.gnu.org
Subject: Re: bug#14188: 24.3.50; ODF files and auto-mode-alist
Date: Thu, 11 Apr 2013 22:51:34 +0200
On Thu, 11 Apr 2013 23:14:05 +0300 Eli Zaretskii <eliz <at> gnu.org> wrote:

>> From: Stephen Berman <stephen.berman <at> gmx.net>
>> Date: Thu, 11 Apr 2013 21:55:24 +0200
>> 
>> The extension .od[fgpst] for ODF files occurs twice as part of a key in
>> the default value of auto-mode-alist, paired first with archive-mode and
>> later with doc-view-mode-maybe.  As a result, visiting such a file shows
>> the directory-style listing of the archive instead of the files content.
>> To see the latter, you have to explicitly invoke doc-view-mode.  But if
>> .od[fgpst] is removed from the key paired with archive-mode, then
>> visiting such a file shows the content after conversion, and when you
>> type C-c C-c, it switches to the archive listing, due to
>> magic-fallback-mode-alist.[1]  I think this is better behavior.  I can't
>> test files with the other extensions in the problematic entry
>> ("\\.\\(sx[dmicw]\\|od[fgpst]\\|oxt\\)\\'" . archive-mode), so I don't
>> know if the whole entry should be deleted or only "od[fgpst]\\|".
>
> doc-view-mode requires additional programs.  What if they are not
> available?

The second pairing of ODF files in auto-mode-alist is not with
doc-view-mode but with doc-view-mode-maybe, whose doc string says
"Switch to `doc-view-mode' if possible.  If the required external tools
are not available, then fallback to the next best mode."  In this case
the next best mode is archive-mode, due to magic-fallback-mode-alist.
That's why the first pairing is dispensable.

Steve Berman




This bug report was last modified 12 years and 96 days ago.

Previous Next


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