GNU bug report logs - #20891
emacs: Back off if .doc is not an Office document

Previous Next

Package: emacs;

Reported by: era+emacs <at> iki.fi

Date: Wed, 24 Jun 2015 11:20:03 UTC

Severity: minor

Tags: fixed

Found in version 24.4+1-4ubuntu5

Fixed in version 27.1

Done: Robert Pluim <rpluim <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Stefan Kangas <stefan <at> marxist.se>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: era+emacs <at> iki.fi, 20891 <at> debbugs.gnu.org
Subject: Re: bug#20891: emacs: Back off if .doc is not an Office document
Date: Wed, 06 Nov 2019 02:53:21 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> era+emacs <at> iki.fi writes:
>
>> It is not uncommon for *.doc files to contain plain ASCII text. In this
>> case, the default behavior of Emacs is less than ideal, as described in
>> more detail in the problem report below. Perhaps the .doc file name
>> mapping should contain some additional heuristics, and fall back to
>> plain text if the file is not an Office document.
>
> (I'm going through old bug reports that have unfortunately not gotten
> any responses.)
>
> I think this makes sense.  A fix in Emacs would mean moving the .doc
> recognition from `auto-mode-alist' to...  `magic-fallback-mode-alist', I
> guess.
>
> According to the interwebs, the magic sequence for Word .doc files is:
>
> D0 CF 11 E0 A1 B1 1A E1
>
> Does anybody have an opinion here?

I wasn't aware of the practice to name plain text files *.doc; I can't
remember having encountered any file like that.  Perhaps this practice
is rare.

Would implementing this risk make opening *.doc files slower for most
users?  Perhaps that could make the trade-off not worth it.  Other
than that, I see no problem with the proposal.

Best regards,
Stefan Kangas




This bug report was last modified 5 years and 191 days ago.

Previous Next


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