From unknown Mon Aug 18 04:45:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14188: 24.3.50; ODF files and auto-mode-alist Resent-From: Stephen Berman Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Apr 2013 20:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 14188 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 14188@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.136571037317664 (code B ref -1); Thu, 11 Apr 2013 20:00:02 +0000 Received: (at submit) by debbugs.gnu.org; 11 Apr 2013 19:59:33 +0000 Received: from localhost ([127.0.0.1]:46133 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UQNed-0004ah-Nq for submit@debbugs.gnu.org; Thu, 11 Apr 2013 15:59:32 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36416) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UQNeb-0004aJ-5e for submit@debbugs.gnu.org; Thu, 11 Apr 2013 15:59:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQNap-0006TK-B7 for submit@debbugs.gnu.org; Thu, 11 Apr 2013 15:55:38 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:46561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQNap-0006TG-7c for submit@debbugs.gnu.org; Thu, 11 Apr 2013 15:55:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQNam-0003GE-9s for bug-gnu-emacs@gnu.org; Thu, 11 Apr 2013 15:55:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQNaj-0006Rn-57 for bug-gnu-emacs@gnu.org; Thu, 11 Apr 2013 15:55:32 -0400 Received: from mout.gmx.net ([212.227.15.18]:51469) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQNai-0006RX-QU for bug-gnu-emacs@gnu.org; Thu, 11 Apr 2013 15:55:29 -0400 Received: from mailout-de.gmx.net ([10.1.76.29]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0LqXNf-1V3p0x1db7-00e8sX for ; Thu, 11 Apr 2013 21:55:26 +0200 Received: (qmail invoked by alias); 11 Apr 2013 19:55:26 -0000 Received: from i59F574F1.versanet.de (EHLO rosalinde.fritz.box) [89.245.116.241] by mail.gmx.net (mp029) with SMTP; 11 Apr 2013 21:55:26 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX1/p98MOZenpP8SUxzAJCYvHeFr+oyHMZ4qvWYDW4n 29fYPcVHlEwdnC From: Stephen Berman Date: Thu, 11 Apr 2013 21:55:24 +0200 Message-ID: <87a9p4deqb.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) 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]\\|". In GNU Emacs 24.3.50.1 (x86_64-suse-linux-gnu, GTK+ Version 3.4.4) of 2013-04-09 on rosalinde Bzr revision: 112253 rgm@gnu.org-20130409101736-f1vzgrwt88suqqis Windowing system distributor `The X.Org Foundation', version 11.0.11203000 System Description: openSUSE 12.2 (x86_64) Configured using: `configure --without-toolkit-scroll-bars CFLAGS=-g3 -O0' Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=local locale-coding-system: utf-8-unix default enable-multibyte-characters: t Footnotes: [1] Actually, it only switches to the archive listing if the global value of major-mode is fundamental-mode. I don't know if this is a bug, so I'll ask about it on emacs-devel. From unknown Mon Aug 18 04:45:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14188: 24.3.50; ODF files and auto-mode-alist Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Apr 2013 20:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14188 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stephen Berman Cc: 14188@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 14188-submit@debbugs.gnu.org id=B14188.136571147823248 (code B ref 14188); Thu, 11 Apr 2013 20:18:01 +0000 Received: (at 14188) by debbugs.gnu.org; 11 Apr 2013 20:17:58 +0000 Received: from localhost ([127.0.0.1]:46158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UQNwU-00062t-EJ for submit@debbugs.gnu.org; Thu, 11 Apr 2013 16:17:58 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]:59572) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UQNwR-00062S-1A for 14188@debbugs.gnu.org; Thu, 11 Apr 2013 16:17:56 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0ML300C00XHL5000@a-mtaout23.012.net.il> for 14188@debbugs.gnu.org; Thu, 11 Apr 2013 23:13:47 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0ML300BPLXIYYS80@a-mtaout23.012.net.il>; Thu, 11 Apr 2013 23:13:47 +0300 (IDT) Date: Thu, 11 Apr 2013 23:14:05 +0300 From: Eli Zaretskii In-reply-to: <87a9p4deqb.fsf@rosalinde.fritz.box> X-012-Sender: halo1@inter.net.il Message-id: <83obdkakqa.fsf@gnu.org> References: <87a9p4deqb.fsf@rosalinde.fritz.box> X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > From: Stephen Berman > 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? From unknown Mon Aug 18 04:45:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14188: 24.3.50; ODF files and auto-mode-alist Resent-From: Stephen Berman Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Apr 2013 20:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14188 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 14188@debbugs.gnu.org Received: via spool by 14188-submit@debbugs.gnu.org id=B14188.13657137414221 (code B ref 14188); Thu, 11 Apr 2013 20:56:02 +0000 Received: (at 14188) by debbugs.gnu.org; 11 Apr 2013 20:55:41 +0000 Received: from localhost ([127.0.0.1]:46228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UQOWx-00015w-SN for submit@debbugs.gnu.org; Thu, 11 Apr 2013 16:55:40 -0400 Received: from mout.gmx.net ([212.227.17.22]:56693) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UQOWu-00015K-Ka for 14188@debbugs.gnu.org; Thu, 11 Apr 2013 16:55:38 -0400 Received: from mailout-de.gmx.net ([10.1.76.34]) by mrigmx.server.lan (mrigmx002) with ESMTP (Nemesis) id 0Llbtx-1Uxo990GDX-00bItS for <14188@debbugs.gnu.org>; Thu, 11 Apr 2013 22:51:44 +0200 Received: (qmail invoked by alias); 11 Apr 2013 20:51:43 -0000 Received: from i59F574F1.versanet.de (EHLO rosalinde.fritz.box) [89.245.116.241] by mail.gmx.net (mp034) with SMTP; 11 Apr 2013 22:51:43 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX1+Q0s8dCjmQOv2PZOkRAExYQGZnIm+bd+cqaRHJuZ i6ujZD3Tb0Jxgm From: Stephen Berman References: <87a9p4deqb.fsf@rosalinde.fritz.box> <83obdkakqa.fsf@gnu.org> Date: Thu, 11 Apr 2013 22:51:34 +0200 In-Reply-To: <83obdkakqa.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 11 Apr 2013 23:14:05 +0300") Message-ID: <8738uwdc4p.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Y-GMX-Trusted: 0 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.0 (-----) On Thu, 11 Apr 2013 23:14:05 +0300 Eli Zaretskii wrote: >> From: Stephen Berman >> 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 From unknown Mon Aug 18 04:45:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14188: 24.3.50; ODF files and auto-mode-alist Resent-From: Tassilo Horn Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 17 Apr 2013 13:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14188 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stephen Berman Cc: 14188@debbugs.gnu.org Received: via spool by 14188-submit@debbugs.gnu.org id=B14188.13662064628107 (code B ref 14188); Wed, 17 Apr 2013 13:48:02 +0000 Received: (at 14188) by debbugs.gnu.org; 17 Apr 2013 13:47:42 +0000 Received: from localhost ([127.0.0.1]:56495 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1USSi4-00026c-Du for submit@debbugs.gnu.org; Wed, 17 Apr 2013 09:47:41 -0400 Received: from deliver.uni-koblenz.de ([141.26.64.15]:60831) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1USSi0-00026I-JG for 14188@debbugs.gnu.org; Wed, 17 Apr 2013 09:47:38 -0400 Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 222231A8552; Wed, 17 Apr 2013 15:43:13 +0200 (CEST) X-Virus-Scanned: amavisd-new at uni-koblenz.de Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aPVhF0s3EPYD; Wed, 17 Apr 2013 15:43:12 +0200 (CEST) X-CHKRCPT: Envelopesender noch tsdh@gnu.org Received: from thinkpad.tsdh.de (tsdh.uni-koblenz.de [141.26.67.142]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by deliver.uni-koblenz.de (Postfix) with ESMTPSA id AFD7B1A8550; Wed, 17 Apr 2013 15:43:12 +0200 (CEST) From: Tassilo Horn References: <87a9p4deqb.fsf@rosalinde.fritz.box> Date: Wed, 17 Apr 2013 15:43:11 +0200 In-Reply-To: <87a9p4deqb.fsf@rosalinde.fritz.box> (Stephen Berman's message of "Thu, 11 Apr 2013 21:55:24 +0200") Message-ID: <87k3o1i87k.fsf@thinkpad.tsdh.de> User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.8 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) Stephen Berman writes: > 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]\\|". 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. doc-view-mode is arguably more heavy-weight, so probably archive-mode should stay the default. But it should be easier and obvious to start doc-view-mode from there. 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? Bye, Tassilo From unknown Mon Aug 18 04:45:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14188: 24.3.50; ODF files and auto-mode-alist Resent-From: Stephen Berman Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 17 Apr 2013 18:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14188 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tassilo Horn Cc: 14188@debbugs.gnu.org Received: via spool by 14188-submit@debbugs.gnu.org id=B14188.136622368120283 (code B ref 14188); Wed, 17 Apr 2013 18:35:01 +0000 Received: (at 14188) by debbugs.gnu.org; 17 Apr 2013 18:34:41 +0000 Received: from localhost ([127.0.0.1]:57105 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1USXBo-0005H4-6l for submit@debbugs.gnu.org; Wed, 17 Apr 2013 14:34:40 -0400 Received: from mout.gmx.net ([212.227.15.18]:57686) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1USXBl-0005Gq-Ab for 14188@debbugs.gnu.org; Wed, 17 Apr 2013 14:34:39 -0400 Received: from mailout-de.gmx.net ([10.1.76.31]) by mrigmx.server.lan (mrigmx002) with ESMTP (Nemesis) id 0MckQB-1UB8rK2Zyz-00HyUj for <14188@debbugs.gnu.org>; Wed, 17 Apr 2013 20:30:11 +0200 Received: (qmail invoked by alias); 17 Apr 2013 18:30:10 -0000 Received: from i59F54C07.versanet.de (EHLO rosalinde.fritz.box) [89.245.76.7] by mail.gmx.net (mp031) with SMTP; 17 Apr 2013 20:30:10 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX1/WgBtEOXXWCJy/KQUt3+OEl+r0YFtXrDKcUW3f5U LQ2rJ6yyXe1XIp From: Stephen Berman References: <87a9p4deqb.fsf@rosalinde.fritz.box> <87k3o1i87k.fsf@thinkpad.tsdh.de> Date: Wed, 17 Apr 2013 20:30:08 +0200 In-Reply-To: <87k3o1i87k.fsf@thinkpad.tsdh.de> (Tassilo Horn's message of "Wed, 17 Apr 2013 15:43:11 +0200") Message-ID: <87fvypqabz.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Y-GMX-Trusted: 0 X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Wed, 17 Apr 2013 15:43:11 +0200 Tassilo Horn wrote: > Stephen Berman writes: > >> 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]\\|". > > 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. > doc-view-mode is arguably more heavy-weight, so probably > archive-mode should stay the default. This is a strong argument, though not a knock-out argument, since if most users are like me, they would toggle to the image anyway, so it would be an extra step if archive-mode remained the default. With doc-view-mode-maybe the default, it's just as easy to toggle to archive-mode, should you want to (which again, I seldom do). > But it should be easier and > obvious to start doc-view-mode from there. > > 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. This is acceptable (i.e., the key binding is IMO a must). But again, even better IMO would be to just have doc-view-mode-maybe, falling back to archive-mode when you type C-c C-c. 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.) Steve Berman From unknown Mon Aug 18 04:45:20 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Stephen Berman Subject: bug#14188: closed (Re: bug#14188: 24.3.50; ODF files and auto-mode-alist) Message-ID: References: <87ppxsmjo5.fsf@thinkpad.tsdh.de> <87a9p4deqb.fsf@rosalinde.fritz.box> X-Gnu-PR-Message: they-closed 14188 X-Gnu-PR-Package: emacs Reply-To: 14188@debbugs.gnu.org Date: Thu, 18 Apr 2013 06:39:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1366267142-19699-1" This is a multi-part message in MIME format... ------------=_1366267142-19699-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #14188: 24.3.50; ODF files and auto-mode-alist which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 14188@debbugs.gnu.org. --=20 14188: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D14188 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1366267142-19699-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 14188-done) by debbugs.gnu.org; 18 Apr 2013 06:38:52 +0000 Received: from localhost ([127.0.0.1]:57885 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1USiUd-00057M-EF for submit@debbugs.gnu.org; Thu, 18 Apr 2013 02:38:51 -0400 Received: from deliver.uni-koblenz.de ([141.26.64.15]:40901) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1USiUZ-00057A-Da for 14188-done@debbugs.gnu.org; Thu, 18 Apr 2013 02:38:49 -0400 Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 073113D600B; Thu, 18 Apr 2013 08:34:20 +0200 (CEST) X-Virus-Scanned: amavisd-new at uni-koblenz.de Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Oxu_DCl-qpLg; Thu, 18 Apr 2013 08:34:19 +0200 (CEST) X-CHKRCPT: Envelopesender noch tsdh@gnu.org Received: from thinkpad.tsdh.de (tsdh.uni-koblenz.de [141.26.67.142]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by deliver.uni-koblenz.de (Postfix) with ESMTPSA id 8905E1A8627; Thu, 18 Apr 2013 08:34:19 +0200 (CEST) From: Tassilo Horn To: Stephen Berman Subject: Re: bug#14188: 24.3.50; ODF files and auto-mode-alist References: <87a9p4deqb.fsf@rosalinde.fritz.box> <87k3o1i87k.fsf@thinkpad.tsdh.de> <87fvypqabz.fsf@rosalinde.fritz.box> Date: Thu, 18 Apr 2013 08:34:18 +0200 In-Reply-To: <87fvypqabz.fsf@rosalinde.fritz.box> (Stephen Berman's message of "Wed, 17 Apr 2013 20:30:08 +0200") Message-ID: <87ppxsmjo5.fsf@thinkpad.tsdh.de> User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 14188-done Cc: 14188-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) Stephen Berman 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 ------------=_1366267142-19699-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 11 Apr 2013 19:59:33 +0000 Received: from localhost ([127.0.0.1]:46133 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UQNed-0004ah-Nq for submit@debbugs.gnu.org; Thu, 11 Apr 2013 15:59:32 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36416) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UQNeb-0004aJ-5e for submit@debbugs.gnu.org; Thu, 11 Apr 2013 15:59:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQNap-0006TK-B7 for submit@debbugs.gnu.org; Thu, 11 Apr 2013 15:55:38 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:46561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQNap-0006TG-7c for submit@debbugs.gnu.org; Thu, 11 Apr 2013 15:55:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQNam-0003GE-9s for bug-gnu-emacs@gnu.org; Thu, 11 Apr 2013 15:55:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQNaj-0006Rn-57 for bug-gnu-emacs@gnu.org; Thu, 11 Apr 2013 15:55:32 -0400 Received: from mout.gmx.net ([212.227.15.18]:51469) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQNai-0006RX-QU for bug-gnu-emacs@gnu.org; Thu, 11 Apr 2013 15:55:29 -0400 Received: from mailout-de.gmx.net ([10.1.76.29]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0LqXNf-1V3p0x1db7-00e8sX for ; Thu, 11 Apr 2013 21:55:26 +0200 Received: (qmail invoked by alias); 11 Apr 2013 19:55:26 -0000 Received: from i59F574F1.versanet.de (EHLO rosalinde.fritz.box) [89.245.116.241] by mail.gmx.net (mp029) with SMTP; 11 Apr 2013 21:55:26 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX1/p98MOZenpP8SUxzAJCYvHeFr+oyHMZ4qvWYDW4n 29fYPcVHlEwdnC From: Stephen Berman To: bug-gnu-emacs@gnu.org Subject: 24.3.50; ODF files and auto-mode-alist Date: Thu, 11 Apr 2013 21:55:24 +0200 Message-ID: <87a9p4deqb.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) 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]\\|". In GNU Emacs 24.3.50.1 (x86_64-suse-linux-gnu, GTK+ Version 3.4.4) of 2013-04-09 on rosalinde Bzr revision: 112253 rgm@gnu.org-20130409101736-f1vzgrwt88suqqis Windowing system distributor `The X.Org Foundation', version 11.0.11203000 System Description: openSUSE 12.2 (x86_64) Configured using: `configure --without-toolkit-scroll-bars CFLAGS=-g3 -O0' Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=local locale-coding-system: utf-8-unix default enable-multibyte-characters: t Footnotes: [1] Actually, it only switches to the archive listing if the global value of major-mode is fundamental-mode. I don't know if this is a bug, so I'll ask about it on emacs-devel. ------------=_1366267142-19699-1-- From unknown Mon Aug 18 04:45:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14188: 24.3.50; ODF files and auto-mode-alist Resent-From: Stephen Berman Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Apr 2013 08:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14188 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tassilo Horn Cc: 14188-done@debbugs.gnu.org Received: via spool by 14188-done@debbugs.gnu.org id=D14188.1366272078385 (code D ref 14188); Thu, 18 Apr 2013 08:02:02 +0000 Received: (at 14188-done) by debbugs.gnu.org; 18 Apr 2013 08:01:18 +0000 Received: from localhost ([127.0.0.1]:57984 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1USjmO-000065-Uy for submit@debbugs.gnu.org; Thu, 18 Apr 2013 04:01:18 -0400 Received: from mout.gmx.net ([212.227.15.15]:62694) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1USjmL-00005x-UP for 14188-done@debbugs.gnu.org; Thu, 18 Apr 2013 04:01:15 -0400 Received: from mailout-de.gmx.net ([10.1.76.16]) by mrigmx.server.lan (mrigmx002) with ESMTP (Nemesis) id 0M5JXV-1UkYnk3HZv-00zWxV for <14188-done@debbugs.gnu.org>; Thu, 18 Apr 2013 09:56:43 +0200 Received: (qmail invoked by alias); 18 Apr 2013 07:56:43 -0000 Received: from i59F544D8.versanet.de (EHLO rosalinde.fritz.box) [89.245.68.216] by mail.gmx.net (mp016) with SMTP; 18 Apr 2013 09:56:43 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX1+TXQpClriTYTQ5jyDCPaiospSUst5RK7RqJOsVdE /ch6MCKxu4hY45 From: Stephen Berman References: <87a9p4deqb.fsf@rosalinde.fritz.box> <87k3o1i87k.fsf@thinkpad.tsdh.de> <87fvypqabz.fsf@rosalinde.fritz.box> <87ppxsmjo5.fsf@thinkpad.tsdh.de> Date: Thu, 18 Apr 2013 09:56:41 +0200 In-Reply-To: <87ppxsmjo5.fsf@thinkpad.tsdh.de> (Tassilo Horn's message of "Thu, 18 Apr 2013 08:34:18 +0200") Message-ID: <87bo9cuv9i.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Y-GMX-Trusted: 0 X-Spam-Score: -3.3 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.3 (---) On Thu, 18 Apr 2013 08:34:18 +0200 Tassilo Horn wrote: > 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. Thanks! Steve Berman