* [BUG] ox-odt.el overrides auto-mode-alist defaults [9.6.6 (release_9.6.6 @ /usr/share/emacs/29.1/lisp/org/)]
@ 2023-12-09 5:18 Peter Prevos
2023-12-09 10:49 ` Ihor Radchenko
0 siblings, 1 reply; 3+ messages in thread
From: Peter Prevos @ 2023-12-09 5:18 UTC (permalink / raw)
To: emacs-orgmode
Remember to cover the basics, that is, what you expected to happen
and
what in fact did happen. You don't know how to make a good
report? See
https://orgmode.org/manual/Feedback.html#Feedback
Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------
Hi,
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.
The test is to open a LibreOffice file in vanilla Emacs and when
ox-odt.el is activated.
Regards
P:)
Emacs : GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+
Version 3.24.38, cairo version 1.17.8)
Package: Org mode version 9.6.6 (release_9.6.6 @
/usr/share/emacs/29.1/lisp/org/)
current state:
==============
(setq
org-agenda-prefix-format '((dashboard-agenda . " %i %-12:c %s ")
(agenda . " %i %-12:c%?-12t% s")
(todo . " %i %-12:c")
(tags . " %i %-12:c")
(search . " %i %-12:c"))
org-archive-location
"~/Documents/notes/20230604T152600--gtd-archive__productivity.org::*
From %s"
org-link-elisp-confirm-function 'yes-or-no-p
org-directory "/home/peter/Documents/notes/"
org-cite-insert-processor 'citar
org-hide-emphasis-markers t
org-bibtex-headline-format-function #[257 "\300\236A\207"
[:title] 3 "\n\n(fn ENTRY)"]
org-log-done 'time
org-capture-bookmark nil
org-agenda-custom-commands '(("n" "Netherlands" ((tags-todo
"nl"))
((org-agenda-files
(denote-directory-files-matching-regexp
"_gtd")
)
)
)
("h" "Third Hemisphere"
((agenda ""
((org-agenda-span 3)
(org-agenda-start-on-weekday
nil))
)
(todo "NEXT"
((org-agenda-overriding-header
"Next Actions")
)
)
(todo "WAITING"
((org-agenda-overriding-header
"Waiting")
)
)
(stuck))
((org-agenda-files
(cl-remove-if
(lambda (f)
(string-match-p "_cw" f))
(denote-directory-files-matching-regexp
"_gtd")
)
)
)
)
("p" "Projects"
((todo "PROJECT")
(stuck ""
((org-agenda-sorting-strategy
'(alpha-up priority-down))
)
)
)
)
("c" "Work"
((agenda ""
((org-agenda-span 7)
(org-agenda-start-on-weekday 1))
)
(todo "NEXT") (todo "WAITING")
(stuck))
((org-agenda-files
(denote-directory-files-matching-regexp
"_cw.*_gtd")
)
)
)
)
org-log-into-drawer t
org-agenda-skip-scheduled-if-done t
org-agenda-files
'("/home/peter/Documents/notes/20220718T190010--notes-inbox__gtd.org"
"/home/peter/Documents/notes/20220719T125424--third-hemisphere-action-plan__gtd.org"
"/home/peter/Documents/notes/20230104T060726--lucid-manager-action-plan__gtd_lucidmanager.org"
"/home/peter/Documents/notes/20230104T193809--horizon-of-reason-action-plan__gtd.org"
"/home/peter/Documents/notes/20230115T083737--magic-perspectives-action-plan__gtd_magic.org"
"/home/peter/Documents/notes/20230821T094002--nederland__gjpc_gtd_nl.org"
"/home/peter/Documents/notes/20230925T150445--coliban-water-actions__cw_gtd.org")
org-capture-templates '(("f" "Fleeting note" item
(file+headline org-default-notes-file
"Notes")
"- %?")
("t" "New task" entry
(file+headline org-default-notes-file
"Tasks")
"* TODO %i%?")
("e" "Email task" entry
(file+headline org-default-notes-file
"Tasks")
"* TODO %:fromname: %a %?\nDEADLINE:
%(org-insert-time-stamp (org-read-date
nil t \"+2d\"))")
)
org-persist-after-read-hook
'(org-element--cache-persist-after-read)
org-export-before-parsing-hook '(org-attach-expand-links)
org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
org-startup-with-latex-preview t
org-default-notes-file
"/home/peter/Documents/notes/20220718T190010--notes-inbox__gtd.org"
org-archive-hook '(org-attach-archive-delete-maybe)
org-cite-follow-processor 'citar
org-odt-format-inlinetask-function
'org-odt-format-inlinetask-default-function
org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME
CONTENTS WIDTH)"]
org-cycle-hook '(org-cycle-hide-archived-subtrees
org-cycle-show-empty-lines
org-cycle-optimize-window-after-visibility-change
org-cycle-display-inline-images)
org-export-with-broken-links t
org-persist-before-read-hook
'(org-element--cache-persist-before-read)
org-link-from-user-regexp "\\<peter@xps9315\\>\\|\\<Peter
Prevos\\>"
org-image-actual-width '(450)
org-mode-hook '(org-autolist-mode writegood-mode citar-capf-setup
#[0 "\301\211\207"
[imenu-create-index-function
org-imenu-get-tree]
2]
org-fragtog-mode global-org-modern-mode
org-appear-mode mixed-pitch-mode
#[0 "\300\301\302\303\304$\207"
[add-hook change-major-mode-hook
org-fold-show-all append local]
5]
#[0 "\300\301\302\303\304$\207"
[add-hook change-major-mode-hook
org-babel-show-result-all append local]
5]
org-babel-result-hide-spec
org-babel-hide-all-hashes)
org-babel-load-languages '((emacs-lisp . t) (R . t) (python . t)
(julia . t) (shell . t) (latex . t))
org-agenda-skip-deadline-if-done t
org-cite-csl-styles-dir "~/Documents/library/csl/"
org-modern-timestamp nil
org-modern-checkbox nil
org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _
CONTENTS)"]
org-ellipsis " ↲"
org-latex-format-headline-function
'org-latex-format-headline-default-function
org-confirm-shell-link-function 'yes-or-no-p
org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME
CONTENTS)"]
outline-isearch-open-invisible-function
'outline-isearch-open-invisible
org-use-sub-superscripts "{}"
org-export-with-todo-keywords nil
org-stuck-projects '("/PROJECT" ("NEXT" "WAITING") nil
"SCHEDULED\\|DEADLINE")
org-log-repeat nil
org-startup-indented t
org-fold-catch-invisible-edits 'error
org-latex-classes '(("apa6"
"\\documentclass[a4paper, jou,
11pt]{apa6}\n\\usepackage[nodoi]{apacite}\n\\usepackage[british]{babel}\n\\usepackage{inputenc}\n\\usepackage{amsmath}\n\\usepackage{graphicx}\n\\usepackage{csquotes}\n\\usepackage[hyphens]{url}\n\\usepackage[T1]{fontenc}\n\\usepackage{lmodern}\n\\usepackage{hyperref}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}"))
("trade"
"\\documentclass[11pt, twoside]{memoir}\n
\\setstocksize{9in}{6in}\n
\\settrimmedsize{\\stockheight}{\\stockwidth}{*}\n
\\setlrmarginsandblock{2cm}{2cm}{*} % Left
and right margin\n
\\setulmarginsandblock{2cm}{2cm}{*} % Upper
and lower margin\n
\\checkandfixthelayout\n
\\setcounter{tocdepth}{0}\n
\\OnehalfSpacing\n \\usepackage{times}\n
\\chapterstyle{bianchi}\n
\\setsecheadstyle{\\normalfont \\raggedright
\\textbf}\n
\\setsubsecheadstyle{\\normalfont
\\raggedright \\emph}\n
\\setsubsubsecheadstyle{\\normalfont\\centering}\n
\\usepackage[font={small, it}]{caption}\n
\\usepackage{subcaption}\n
\\captionsetup[subfigure]{justification=centering}\n
\\usepackage{pdfpages}\n
\\pagestyle{myheadings}\n
\\usepackage{ccicons}\n
\\usepackage{nicefrac}\n
\\usepackage[authoryear]{natbib}\n
\\bibliographystyle{apalike}\n
\\usepackage{nohyperref}\n
\\usepackage{tikz}\n
\\usetikzlibrary{shapes.geometric, calc,
knots}\n \\usepackage{svg}"
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" .
"\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}"
. "\\subparagraph*{%s}"))
("crc"
"\\documentclass[krantz2]{krantz}\n
\\usepackage{lmodern}\n
\\usepackage[authoryear]{natbib}\n
\\usepackage{nicefrac}\n
\\usepackage[bf,singlelinecheck=off]{caption}\n
\\captionsetup[table]{labelsep=space}\n
\\captionsetup[figure]{labelsep=space}\n
\\usepackage{Alegreya}\n
\\usepackage[scale=.8]{sourcecodepro}\n
\\usepackage[breaklines=true]{minted}\n
\\usepackage{rotating}\n
\\usepackage[notbib,
nottoc,notlot,notlof]{tocbibind}\n
\\usepackage{amsfonts, tikz, tikz-layers}\n
\\usetikzlibrary{fadings, quotes, shapes,
calc, decorations.markings}\n
\\usetikzlibrary{patterns, shadows.blur}\n
\\usetikzlibrary{shapes,shapes.geometric,positioning}\n
\\usetikzlibrary{arrows, arrows.meta,
backgrounds}\n \\usepackage{imakeidx}
\\makeindex[intoc]\n
\\renewcommand{\\textfraction}{0.05}\n
\\renewcommand{\\topfraction}{0.8}\n
\\renewcommand{\\bottomfraction}{0.8}\n
\\renewcommand{\\floatpagefraction}{0.75}\n
\\renewcommand{\\eqref}[1]{(Equation
\\ref{#1})}\n
\\renewcommand{\\LaTeX}{LaTeX}"
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}"
. "\\paragraph*{%s}"))
("magictrick"
"\\documentclass[11pt, a4paper, twocolumn,
twoside]{article}\n\\usepackage{ccicons}\n\\usepackage{pdfpages}\n\\usepackage{times}\n\\usepackage{helvet}\n\\usepackage{geometry}\n\\geometry{a4paper,
total={170mm,250mm}, left=20mm, top=30mm}\n%
header 2008 x 332
px\n\\usepackage{titlesec}\n\\titleformat{\\section}\n
{\\bfseries}{\\thesection}{1em}{}\n\\titleformat{\\subsection}\n
{\\itshape}{\\thesection}{1em}{}\n\\usepackage{fancyhdr}\n\\usepackage[font={small,
it},
labelformat=empty]{caption}\n\\usepackage[hidelinks]{hyperref}\n\\pagestyle{fancy}\n\\renewcommand{\\headrulewidth}{0pt}\n\\renewcommand{\\footrulewidth}{0pt}\n\\setlength{\\parskip}{1em}\n\\renewcommand{\\baselinestretch}{1.1}\n\\setlength\\headheight{100.0pt}\n\\addtolength{\\textheight}{-100.0pt}\n\\fancyhead[LO]{\\Large{\\textsf{Magic
Perspectives Presents}}
\\includegraphics[width=\\textwidth]{header}}\n\\fancyhead[LE]{\\includegraphics[width=0.5\\textwidth]{header}}\n\\lfoot{Peter
Prevos}\n\\rfoot{\\href{https://magicperspectives.net}{magicperspectives.net}}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}"))
("ebook"
"\\documentclass[11pt,
oneside]{memoir}\n\\setstocksize{9in}{6in}\n\\settrimmedsize{\\stockheight}{\\stockwidth}{*}\n\\setlrmarginsandblock{2cm}{2cm}{*}
% Left and right
margin\n\\setulmarginsandblock{2cm}{2cm}{*}
% Upper and lower
margin\n\\checkandfixthelayout\n\\usepackage{times}\n\\OnehalfSpacing\n\\usepackage[authoryear]{natbib}\n\\bibliographystyle{apalike}\n\\setlength{\\bibsep}{1pt}\n\\usepackage[raggedright]{sidecap}\n\\setsecheadstyle{\\normalfont
\\raggedright
\\textbf}\n\\setsubsecheadstyle{\\normalfont
\\raggedright
\\emph}\n\\usepackage{subcaption}
\n\\usepackage[font={small,
it}]{caption}\n\\captionsetup[subfigure]{justification=centering}\n\\usepackage{pdfpages}\n\\usepackage[unicode=true,\n
bookmarks=true,bookmarksnumbered=false,bookmarksopen=true,\n
bookmarksopenlevel=1,
breaklinks=true,pdfborder={0 0
0},backref=false,colorlinks=false,pdfborderstyle={/S/U/W
.5}, allbordercolors={.8 .8
.8}]{hyperref}\n\\pagestyle{myheadings}\n\\setcounter{tocdepth}{0}\n\\usepackage{ccicons}\n\\usepackage{nicefrac}\n"
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" .
"\\subsubsection*{%s}")
)
("article"
"\\documentclass[10pt]{article}\n
\\usepackage{tgpagella,eulervm}\n
\\usepackage{nicefrac}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" .
"\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}"
. "\\subparagraph*{%s}"))
("article" "\\documentclass[11pt]{article}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" .
"\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}"
. "\\subparagraph*{%s}"))
("report" "\\documentclass[11pt]{report}"
("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" .
"\\subsubsection*{%s}")
)
("book" "\\documentclass[11pt]{book}"
("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" .
"\\subsubsection*{%s}")
)
)
org-odt-format-headline-function
'org-odt-format-headline-default-function
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-cycle-hide-block-startup t
org-babel-tangle-lang-exts '(("latex" . "tex") ("julia" . "jl")
("python" . "py")
("emacs-lisp" . "el") ("elisp"
. "el"))
org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
org-confirm-elisp-link-function 'yes-or-no-p
org-agenda-window-setup 'current-window
org-latex-src-block-backend 'minted
org-cycle-separator-lines 0
org-cite-activate-processor 'citar
org-todo-keywords '((sequence "TODO(t)" "NEXT(n)" "WAITING(w@/!)"
"PROJECT(p)" "GOAL(g)" "|" "DONE(d/!)"
"CANCELLED(c@/!)")
)
org-latex-logfiles-extensions '("lof" "lot" "tex~" "aux" "idx"
"log" "out" "toc" "nav" "snm"
"vrb"
"dvi" "fdb_latexmk" "blg" "brf"
"fls" "entoc" "ps" "spl" "bbl"
"tex" "bcf")
org-structure-template-alist '(("ss" . "src shell\n")
("sr" . "src R\n")
("sp" . "src python\n")
("se" . "src elisp\n")
("a" . "export ascii")
("c" . "center") ("C" . "comment")
("e" . "example") ("E" . "export")
("h" . "export html")
("l" . "export latex")
("q" . "quote") ("s" . "src")
("v" . "verse"))
org-pretty-entities t
org-modern-block-name nil
org-speed-command-hook '(org-speed-command-activate
org-babel-speed-command-activate)
org-html-format-inlinetask-function
'org-html-format-inlinetask-default-function
org-ascii-format-inlinetask-function
'org-ascii-format-inlinetask-default
org-modern-mode-hook '(org-modern-mode-set-explicitly)
org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME
CONTENTS)"]
org-confirm-babel-evaluate nil
org-fold-core-isearch-open-function
'org-fold-core--isearch-reveal
org-export-with-smart-quotes t
org-modern-keyword nil
org-cite-export-processors '((latex natbib "apalike2"
"authoryear")
(t csl "apa6.csl"))
org-preview-latex-default-process 'dvisvgm
org-latex-format-inlinetask-function
'org-latex-format-inlinetask-default-function
org-persist-before-write-hook
'(org-element--cache-persist-before-write)
org-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
org-export-with-toc nil
org-link-shell-confirm-function 'yes-or-no-p
org-agenda-finalize-hook '(org-modern-agenda)
org-babel-pre-tangle-hook '(save-buffer)
org-agenda-loop-over-headlines-in-active-region nil
org-cite-global-bibliography
'("/home/peter/Documents/library/horizon-of-reason.bib"
"/home/peter/Documents/library/lucidmanager.bib"
"/home/peter/Documents/library/magic-science.bib"
"/home/peter/Documents/library/magic-tricks.bib"
"/home/peter/Documents/library/third-hemisphere.bib"
"/home/peter/Documents/library/zotero.bib")
org-occur-hook '(org-first-headline-recenter)
org-capture-after-finalize-hook
'(denote-org-capture-delete-empty-file)
org-export-with-drawers nil
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-odt-preferred-output-format "doc"
org-link-parameters '(("attachment" :follow org-attach-follow
:complete org-attach-complete-link)
("mu4e" :follow mu4e-org-open :store
mu4e-org-store-link)
("helpful" :store helpful--org-link-store)
("eww" :follow org-eww-open :store
org-eww-store-link)
("rmail" :follow org-rmail-open :store
org-rmail-store-link)
("mhe" :follow org-mhe-open :store
org-mhe-store-link)
("irc" :follow org-irc-visit :store
org-irc-store-link :export org-irc-export)
("info" :follow org-info-open :export
org-info-export :store org-info-store-link
:insert-description
org-info-description-as-command)
("gnus" :follow org-gnus-open :store
org-gnus-store-link)
("docview" :follow org-docview-open :export
org-docview-export :store
org-docview-store-link)
("bbdb" :follow org-bbdb-open :export
org-bbdb-export :complete
org-bbdb-complete-link :store
org-bbdb-store-link)
("w3m" :store org-w3m-store-link)
("doi" :follow org-link-doi-open :export
org-link-doi-export)
("hugo" :complete
(lambda nil
(concat "{{% ref "
(file-name-nondirectory
(read-file-name "File: "))
" %}}")
)
:follow org-hugo-followlink)
("bibtex" :follow org-bibtex-open :store
org-bibtex-store-link)
("id" :follow org-id-open)
("nov" :follow nov-org-link-follow :store
nov-org-link-store)
("denote" :follow denote-link-ol-follow
:face
denote-faces-link :complete
denote-link-ol-complete :store
denote-link-ol-store :export
denote-link-ol-export)
("elfeed" :follow elfeed-link-open :store
elfeed-link-store-link)
("file+sys") ("file+emacs")
("shell" :follow org-link--open-shell)
("news" :follow
#[514 "\301\300\302Q\"\207"
["news" browse-url ":"] 6
"\n\n(fn URL ARG)"]
)
("mailto" :follow
#[514 "\301\300\302Q\"\207"
["mailto" browse-url ":"] 6
"\n\n(fn URL ARG)"]
)
("https" :follow
#[514 "\301\300\302Q\"\207"
["https" browse-url ":"] 6
"\n\n(fn URL ARG)"]
)
("http" :follow
#[514 "\301\300\302Q\"\207"
["http" browse-url ":"] 6
"\n\n(fn URL ARG)"]
)
("ftp" :follow
#[514 "\301\300\302Q\"\207"
["ftp" browse-url ":"] 6
"\n\n(fn URL ARG)"]
)
("help" :follow helpful--org-link-follow
:store org-link--store-help)
("file" :complete org-link-complete-file)
("elisp" :follow org-link--open-elisp))
org-html-format-headline-function
'org-html-format-headline-default-function
org-agenda-start-with-follow-mode t
org-metaup-hook '(org-babel-load-in-session-maybe)
org-modern-table nil
org-agenda-restore-windows-after-quit t
org-agenda-remove-tags t
org-num-format-function 'org-num-default-format
org-agenda-include-diary t
org-modern-table-horizontal nil
org-startup-with-inline-images t
org-latex-pdf-process '(“pdflatex -interaction nonstopmode
-output-directory %o %f” "bibtex %b"
“pdflatex -shell-escape -interaction
nonstopmode -output-directory %o %f”
“pdflatex -shell-escape -interaction
nonstopmode -output-directory %o %f”)
org-list-allow-alphabetical t
)
--
Dr Peter Prevos
---------------
peterprevos.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [BUG] ox-odt.el overrides auto-mode-alist defaults [9.6.6 (release_9.6.6 @ /usr/share/emacs/29.1/lisp/org/)]
2023-12-09 5:18 [BUG] ox-odt.el overrides auto-mode-alist defaults [9.6.6 (release_9.6.6 @ /usr/share/emacs/29.1/lisp/org/)] Peter Prevos
@ 2023-12-09 10:49 ` Ihor Radchenko
2023-12-29 15:36 ` Ihor Radchenko
0 siblings, 1 reply; 3+ messages in thread
From: Ihor Radchenko @ 2023-12-09 10:49 UTC (permalink / raw)
To: Peter Prevos; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1056 bytes --]
Peter Prevos <peter@prevos.net> 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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-ox-odt.el-Do-not-open-the-generated-exported-fi.patch --]
[-- Type: text/x-patch, Size: 2083 bytes --]
From f60b3b4f2d9159ac367c08bfb7e024d0faeb1d3b Mon Sep 17 00:00:00 2001
Message-ID: <f60b3b4f2d9159ac367c08bfb7e024d0faeb1d3b.1702118852.git.yantar92@posteo.net>
From: Ihor Radchenko <yantar92@posteo.net>
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-<lang>-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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-lisp-ox-odt.el-Do-not-alter-auto-mode-alist.patch --]
[-- Type: text/x-patch, Size: 1144 bytes --]
From 3508ed0df8cf28e8f5d74cc1c9e232f027055356 Mon Sep 17 00:00:00 2001
Message-ID: <3508ed0df8cf28e8f5d74cc1c9e232f027055356.1702118852.git.yantar92@posteo.net>
In-Reply-To: <f60b3b4f2d9159ac367c08bfb7e024d0faeb1d3b.1702118852.git.yantar92@posteo.net>
References: <f60b3b4f2d9159ac367c08bfb7e024d0faeb1d3b.1702118852.git.yantar92@posteo.net>
From: Ihor Radchenko <yantar92@posteo.net>
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 <peter@prevos.net>
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
[-- Attachment #4: Type: text/plain, Size: 224 bytes --]
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [BUG] ox-odt.el overrides auto-mode-alist defaults [9.6.6 (release_9.6.6 @ /usr/share/emacs/29.1/lisp/org/)]
2023-12-09 10:49 ` Ihor Radchenko
@ 2023-12-29 15:36 ` Ihor Radchenko
0 siblings, 0 replies; 3+ messages in thread
From: Ihor Radchenko @ 2023-12-29 15:36 UTC (permalink / raw)
To: Peter Prevos; +Cc: emacs-orgmode
Ihor Radchenko <yantar92@posteo.net> writes:
> 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.
Applied, onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=69e746c1e
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=996441fd5
Fixed.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-12-29 15:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-09 5:18 [BUG] ox-odt.el overrides auto-mode-alist defaults [9.6.6 (release_9.6.6 @ /usr/share/emacs/29.1/lisp/org/)] Peter Prevos
2023-12-09 10:49 ` Ihor Radchenko
2023-12-29 15:36 ` Ihor Radchenko
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).