From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#20891: emacs: Back off if .doc is not an Office document Date: Wed, 06 Nov 2019 02:53:21 +0100 Message-ID: <87pni54vou.fsf@marxist.se> References: <1435144758.2326415.306422097.2EE346E7@webmail.messagingengine.com> <875zngd2v4.fsf@mouse.gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="208818"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: era+emacs@iki.fi, 20891@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 06 02:54:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iSAWR-000sBq-Nv for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Nov 2019 02:54:11 +0100 Original-Received: from localhost ([::1]:52272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSAWP-0007Xy-Vf for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Nov 2019 20:54:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35582) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSAWJ-0007Xm-6u for bug-gnu-emacs@gnu.org; Tue, 05 Nov 2019 20:54:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iSAWI-0007i1-5e for bug-gnu-emacs@gnu.org; Tue, 05 Nov 2019 20:54:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58764) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iSAWH-0007hX-U8 for bug-gnu-emacs@gnu.org; Tue, 05 Nov 2019 20:54:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iSAWH-00075V-QE for bug-gnu-emacs@gnu.org; Tue, 05 Nov 2019 20:54:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Nov 2019 01:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20891 X-GNU-PR-Package: emacs Original-Received: via spool by 20891-submit@debbugs.gnu.org id=B20891.157300521227190 (code B ref 20891); Wed, 06 Nov 2019 01:54:01 +0000 Original-Received: (at 20891) by debbugs.gnu.org; 6 Nov 2019 01:53:32 +0000 Original-Received: from localhost ([127.0.0.1]:39352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSAVo-00074U-Hm for submit@debbugs.gnu.org; Tue, 05 Nov 2019 20:53:32 -0500 Original-Received: from host.gofardesign.uk ([208.79.239.190]:36070) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSAVm-00074B-NM for 20891@debbugs.gnu.org; Tue, 05 Nov 2019 20:53:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=RyhJAmHYQyYNM5reOOQY9TctoJ5eAtBbBKbSK+OHtVM=; b=XWEMYzclpnuTi6C9hZQGLUX4DH ZTrqIHhAfsV/BY0o43qq82AikRRD674kdadmFvLG7yjaxfFBA4y8Hi/CCGioAko4NIC2uJD5AUXMl phISn/g+bf3GHV8s8w3CKD6sB0IeWTbTpMAbXjdS9BaZRrun8Pf+fv//0g+hvBh+3v4w=; Original-Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:42656 helo=localhost) by host.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1iSAVf-0004mb-QR; Tue, 05 Nov 2019 19:53:24 -0600 In-Reply-To: <875zngd2v4.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Thu, 01 Aug 2019 22:53:19 +0200") X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: host.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: host.gofardesign.uk: stefan@marxist.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:171009 Archived-At: Lars Ingebrigtsen writes: > era+emacs@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