From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id mATNCaBFdGWQIAAAauVa8A:P1 (envelope-from ) for ; Sat, 09 Dec 2023 11:46:56 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id mATNCaBFdGWQIAAAauVa8A (envelope-from ) for ; Sat, 09 Dec 2023 11:46:56 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 178695EBE0 for ; Sat, 9 Dec 2023 11:46:55 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=asyL1DKM; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1702118815; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=GgPaRW+Ep5SQ1JkCPoonfVbW+q+8/mICJ0BX2H5x8FA=; b=m7ROA25Kle+ycLsQrynl/S7+83O2F6xapVA+Dlu/OSRcqGHRgzLxcHTiyoD8MxYTiyRCZA XaEc0Wny9yl6iDVjSvrweuSp5Umx7MFrMLQp29w8BhY7PUUFev1ju4fFSUHmlYZslKYMm5 NQJPjYnH1orOtomuSXfg/ZFhAhxXp+7BoQ1Z7/ChxKuCeKIsgEmHA+0nwynSqtjKcoDNUm HqAK3kRPmDpWQoUFOxq+4wiqMN+81uYIqKaBnflfyyjBpM99dGzi3XNmNev8vyisk4ZlRd frrcNJSfzrnPn9qBm9Pyr8y+//aHbvfh7NG1gghN3ZDaYEIgKe0121HTJxHd/A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=asyL1DKM; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1702118815; a=rsa-sha256; cv=none; b=KR8H3dfcmS4C6qtXzLfOgRROw3MeVgrMDwTTeERI3XKxDaKPU2FYmfgXnq6CY/85O21xUd B8QvoRNHbTjLyI/L63eMe5K+ISgtL/VMep+Ym/4fHHUcgcDil70lhvX5tl4KhTJVc01brK sZyx7cVZZPlsoRh3ANxzi4jY+Y/Pft/s7O3AwsO/HS/FPzz5JQLgydROCX7P3tI/nY1a1R a+riS+wk76hCwMbxkj2Wm+Pbcnc+FVJuzJGPvxbjUcFe5s1FJi/UbJGyfq/HBNhoiW/Cfk yaoNOBVKkkrTBjdkA09RX0bHLEcgIKpKWw1dSG5eISfvi5Ca354y7sprBFjpxQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rBuqV-0006k9-P3; Sat, 09 Dec 2023 05:46:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rBuqT-0006jk-FD for emacs-orgmode@gnu.org; Sat, 09 Dec 2023 05:46:05 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rBuqO-0005qO-Sl for emacs-orgmode@gnu.org; Sat, 09 Dec 2023 05:46:05 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 8AAA0240027 for ; Sat, 9 Dec 2023 11:45:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1702118756; bh=mWUHSthnwZjgyGqK8o6FQIFZJ2MmPy0aEYHkjqsusnQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=asyL1DKM/0WWSat+hvWLnCDXIBq9wiB114bodJTcIVs7V6dBjRHo6RUpphdM3sB1g v9c6HoM9qRzYRFx+/Z1mdzxE9nNEtNRFmifS4FjzJC3BalWAKQafcENpCcZsYynMz9 GBSVJWG5UGM4KxBG7ouPiXxhXGcKKb1AF2z3BoyHgqR1qsrOLX/EYt2UeQXa1aDe2M wCF8Xs1Bzg9MkhD5d4B7xBuKJ+PI1RcPjMcUZpKBoGwOqzj+ABfAexiS9XlbWPmrt7 O2XOQMkUiF3f7JgXItZkqZV6uHdxqaacsjBN/1ztL865ttFsZP9cOUX/J9KrZ/eeLt ttk6D57XFcR2A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SnPn01Kr3z6tw2; Sat, 9 Dec 2023 11:45:56 +0100 (CET) From: Ihor Radchenko To: Peter Prevos Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] ox-odt.el overrides auto-mode-alist defaults [9.6.6 (release_9.6.6 @ /usr/share/emacs/29.1/lisp/org/)] In-Reply-To: <87wmtoosru.fsf@prevos.net> References: <87wmtoosru.fsf@prevos.net> Date: Sat, 09 Dec 2023 10:49:04 +0000 Message-ID: <87plzfslb3.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -2.31 X-Spam-Score: -2.31 X-Migadu-Queue-Id: 178695EBE0 X-TUID: Wch1x7yZKcTl --=-=-= Content-Type: text/plain Peter Prevos writes: > ox-odt.el overrides the auto-mode-alist settings and instructs > Emacs to open od[fgpst] files in archive-mode instead of > doc-view-mode. > > This line can be removed because it prevents Emacs from opening > LibreOffice files. Confirmed. AFAIU, the reason that change is made is a line in `org-odt--export-wrap' where the exporter "Open the OpenDocument file in archive-mode for examination." However, most users probably don't have a chance for "examination" as the file is opened in the background without notice in the message buffer or manual. It is also a side effect no other export backend has. So, I am inclined to remove that code in `org-odt--export-wrap' and then remove the code altering `auto-mode-alist' (which is definitely something we must not do). See the attached patch set. I am not applying the patches yet just in case if some users are relying on the removed behaviour. If anyone reading this does use this undocumented feature, please reply, and we will discuss how to retain it. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-lisp-ox-odt.el-Do-not-open-the-generated-exported-fi.patch >From f60b3b4f2d9159ac367c08bfb7e024d0faeb1d3b Mon Sep 17 00:00:00 2001 Message-ID: From: Ihor Radchenko Date: Sat, 9 Dec 2023 11:37:02 +0100 Subject: [PATCH 1/2] lisp/ox-odt.el: Do not open the generated exported file in the background * lisp/ox-odt.el (org-odt--export-wrap): Do not open the exported file in the background. Such behavior is not consistent with the other export backends and is not documented (users don't know about it). * etc/ORG-NEWS (ODT export no longer opens the exported file in the background): Document the breaking change. --- etc/ORG-NEWS | 7 +++++++ lisp/ox-odt.el | 3 --- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 59c45b2aa..439323f00 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -13,6 +13,13 @@ Please send Org bug reports to mailto:emacs-orgmode@gnu.org. * Version 9.7 (not released yet) ** Important announcements and breaking changes +*** ODT export no longer opens the exported file in the background + +ODT exporter used to open the exported file in ~archive-mode~ "for +examination". This was not documented, was done in the background, +and is not consistent with all other export backends. Now, this +feature is removed. + *** ~org-src-associate-babel-session~ and ~org-babel--associate-session~ are now obsolete This functionality is not documented, rarely used and can be achieved diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el index 8d3a48394..e51547f48 100644 --- a/lisp/ox-odt.el +++ b/lisp/ox-odt.el @@ -4081,9 +4081,6 @@ (defmacro org-odt--export-wrap (out-file &rest body) (message "Created %s" (expand-file-name target)) ;; Cleanup work directory and work files. (funcall --cleanup-xml-buffers) - ;; Open the OpenDocument file in archive-mode for - ;; examination. - (find-file-noselect target t) ;; Return exported file. (cond ;; Case 1: Conversion desired on exported file. Run the -- 2.42.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-lisp-ox-odt.el-Do-not-alter-auto-mode-alist.patch >From 3508ed0df8cf28e8f5d74cc1c9e232f027055356 Mon Sep 17 00:00:00 2001 Message-ID: <3508ed0df8cf28e8f5d74cc1c9e232f027055356.1702118852.git.yantar92@posteo.net> In-Reply-To: References: From: Ihor Radchenko Date: Sat, 9 Dec 2023 11:38:22 +0100 Subject: [PATCH 2/2] lisp/ox-odt.el: Do not alter `auto-mode-alist' Reported-by: Peter Prevos Link: https://orgmode.org/list/87wmtoosru.fsf@prevos.net --- lisp/ox-odt.el | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el index e51547f48..c209e01a6 100644 --- a/lisp/ox-odt.el +++ b/lisp/ox-odt.el @@ -4349,11 +4349,6 @@ (defun org-odt-convert (&optional in-file out-fmt open) ;;; Library Initializations -(dolist (desc org-odt-file-extensions) - ;; Let Emacs open all OpenDocument files in archive mode. - (add-to-list 'auto-mode-alist - (cons (concat "\\." (car desc) "\\'") 'archive-mode))) - (provide 'ox-odt) ;; Local variables: -- 2.42.0 --=-=-= Content-Type: text/plain -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at --=-=-=--