bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14188: 24.3.50; ODF files and auto-mode-alist


From: Tassilo Horn
Subject: bug#14188: 24.3.50; ODF files and auto-mode-alist
Date: Thu, 18 Apr 2013 08:34:18 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

Stephen Berman <address@hidden> writes:

Hi Stephen,

>> Hm, I think for OpenDocument files, the alternatives of a user
>> wanting to view the file using archive-mode and doc-view-mode are
>> equally likely.
>
> That's not the case for me, and I'd be surprised if it were for most
> users.  I virtually always want to simply view the document's content
> in Emacs.  I guess the only reason to want to open it in archive-mode
> is to edit one of the XML source files, but since most or all of these
> are formatted as one line, it isn't fun to edit the source.  Usually I
> edit ODF files with LibreOffice.

Ok, that makes sense.

>> So how about using the PS (PostScript) approach also here?  That is,
>> we remove the ODF regexes for doc-view-mode-maybe from
>> auto-mode-alist, and in archive-mode we check if the current archive
>> is an ODF file, and if so, enable doc-view-minor-mode.
>>
>> This would message
>>
>>   Type M-x doc-view-toggle-display to toggle between editing or viewing
>>   the document.
>>
>> thus indicating to the user how he can view the document with doc-view
>> instead of editing it as an archive.
>>
>> Does that sound reasonable?
>
> If the message really were what you wrote, I would find that
> unacceptable.  But when I enable doc-view-minor-mode in archive-mode,
> I see the message
>
>   Type C-c C-c to toggle between editing or viewing the document.

Hm, I see the message with M-x when I open some file for the first time.
Thereafter, it shows the key binding instead...

> Whichever decision you make, I do think you should do the same with MS
> OpenXML (.docx, .xlsx) files, too.  (These are currently only paired
> with doc-view-mode-maybe.)

I've now committed the change you suggested initially, that is, I've
removed the OpenDocument and StarOffice file extensions from the
archive-mode entry.  One exception is *.OXT which is an OpenOffice
extension pack that has no visual representation.

So now doc-view-mode-maybe is the default for StarOffice/MSOffice/
OpenDocument files instead of archive-mode with the possibility of
falling back to that with a simple C-c C-c.

I'm closing this bug now.

Thanks,
Tassilo





reply via email to

[Prev in Thread] Current Thread [Next in Thread]