Re: [O] Bug: C-u M-x org-footnote-action sort deletes footnotes used in #+include:’d files [8.2.10 (release_8.2.10 @ /usr/share/emacs/25.3/lisp/org/)]
> Arne Babenhauserheide writes: > > > In my setup, it deletes footnote [fn:2]. > > > > Damn, I missed one important part in the ECM: Set > > > > org-footnote-section > > > > to nil. Does it still leave them untouched? > > I still cannot reproduce it. Then I’ll need to test this in org 9. Does it at least move footnote [fn:1] out from the Footnotes section? If not, then the call org-footnote-action does not actually work. > > It does not reference between included files, but references from > > included files to the main file actually work. > > I'm positively sure this cannot be. Indeed "ox.el" has a comment about > it: > > ;; Append ID to all footnote references and definitions, so they > ;; become file specific and cannot collide with footnotes in other > ;; included files. I’m sure that this works, because I’m creating a PDF via ox-latex using those footnotes. Here’s the source with a full autotools setup: https://bitbucket.org/ArneBab/1w6/src/default/Hauptdokument/ews30/ Main file: https://bitbucket.org/ArneBab/1w6/src/cd0a985945e46389d2690b759869706df572e65f/Hauptdokument/ews30/ews.org You can test this with the latest release: https://www.1w6.org/releases/ews30eb1.tar.gz Build it with ./configure; make distcheck I hope that org 9 does not break this. Best wishes, Arne
Re: [O] Bug: C-u M-x org-footnote-action sort deletes footnotes used in #+include:’d files [8.2.10 (release_8.2.10 @ /usr/share/emacs/25.3/lisp/org/)]
Hello, Arne Babenhauserheide writes: > In my setup, it deletes footnote [fn:2]. > > Damn, I missed one important part in the ECM: Set > > org-footnote-section > > to nil. Does it still leave them untouched? I still cannot reproduce it. > It does not reference between included files, but references from > included files to the main file actually work. I'm positively sure this cannot be. Indeed "ox.el" has a comment about it: ;; Append ID to all footnote references and definitions, so they ;; become file specific and cannot collide with footnotes in other ;; included files. Regards, -- Nicolas Goaziou
Re: [O] Bug: C-u M-x org-footnote-action sort deletes footnotes used in #+include:’d files [8.2.10 (release_8.2.10 @ /usr/share/emacs/25.3/lisp/org/)]
Nicolas Goaziou writes: >> here’s a minimal release. Add it into an org-file, then create main.org >> and sub.org with M-x org-babel-tangle. Finally run the code-block in >> main.org. >> >> #+BEGIN_SRC org :tangle main.org >> ,#+include: sub.org >> >> Here is a footnote[fn:1] >> >> run the following code block with C-c C-c and answer with =s= >> ,#+BEGIN_SRC elisp >> (org-footnote-action t) >> ,#+END_SRC >> >> ,* Footnotes >> >> [fn:1] footnote referenced in main >> >> [fn:2] footnote referenced in sub >> >> #+END_SRC >> >> #+BEGIN_SRC org :tangle sub.org >> This footnote will get lost[fn:2] >> #+END_SRC > > `org-footnote-action' does nothing. In my setup, it deletes footnote [fn:2]. Damn, I missed one important part in the ECM: Set org-footnote-section to nil. Does it still leave them untouched? > However this will probably not export as you would expect. Indeed, > footnotes in included file are independent, so you cannot reference > footnotes between included files. It does not reference between included files, but references from included files to the main file actually work. What I would expect is that the footnotes get moved to the end of the section with the last #+include: which uses the footnote. Best wishes, Arne -- Unpolitisch sein heißt politisch sein ohne es zu merken signature.asc Description: PGP signature
Re: [O] Bug: C-u M-x org-footnote-action sort deletes footnotes used in #+include:’d files [8.2.10 (release_8.2.10 @ /usr/share/emacs/25.3/lisp/org/)]
Hello, Arne Babenhauserheide writes: > here’s a minimal release. Add it into an org-file, then create main.org > and sub.org with M-x org-babel-tangle. Finally run the code-block in > main.org. > > #+BEGIN_SRC org :tangle main.org > ,#+include: sub.org > > Here is a footnote[fn:1] > > run the following code block with C-c C-c and answer with =s= > ,#+BEGIN_SRC elisp > (org-footnote-action t) > ,#+END_SRC > > ,* Footnotes > > [fn:1] footnote referenced in main > > [fn:2] footnote referenced in sub > > #+END_SRC > > #+BEGIN_SRC org :tangle sub.org > This footnote will get lost[fn:2] > #+END_SRC `org-footnote-action' does nothing. However this will probably not export as you would expect. Indeed, footnotes in included file are independent, so you cannot reference footnotes between included files. Regards, -- Nicolas Goaziou
Re: [O] Bug: C-u M-x org-footnote-action sort deletes footnotes used in #+include:’d files [8.2.10 (release_8.2.10 @ /usr/share/emacs/25.3/lisp/org/)]
Hi Nicolas, Thank you for your answer! Nicolas Goaziou writes: >> When a file uses #+include: X.org to structure an org-file and the >> included files use footnotes defined in the master file, export works >> without problems, but sorting the footnotes by reference with >> : C-u M-x org-footnote-action s >> removes the footnotes used in the included files. > 1. test it with the latest Org release (9.2)? I cannot easily test with the latest release, but > 2. and, if that still fails, provide an ECM demonstrating your issue? here’s a minimal release. Add it into an org-file, then create main.org and sub.org with M-x org-babel-tangle. Finally run the code-block in main.org. #+BEGIN_SRC org :tangle main.org ,#+include: sub.org Here is a footnote[fn:1] run the following code block with C-c C-c and answer with =s= ,#+BEGIN_SRC elisp (org-footnote-action t) ,#+END_SRC ,* Footnotes [fn:1] footnote referenced in main [fn:2] footnote referenced in sub #+END_SRC #+BEGIN_SRC org :tangle sub.org This footnote will get lost[fn:2] #+END_SRC Best wishes, Arne -- Unpolitisch sein heißt politisch sein ohne es zu merken signature.asc Description: PGP signature
Re: [O] Bug: C-u M-x org-footnote-action sort deletes footnotes used in #+include:’d files [8.2.10 (release_8.2.10 @ /usr/share/emacs/25.3/lisp/org/)]
Hello, Arne Babenhauserheide writes: > When a file uses #+include: X.org to structure an org-file and the > included files use footnotes defined in the master file, export works > without problems, but sorting the footnotes by reference with > : C-u M-x org-footnote-action s > removes the footnotes used in the included files. Could you, 1. test it with the latest Org release (9.2)? 2. and, if that still fails, provide an ECM demonstrating your issue? Regards, -- Nicolas Goaziou
[O] Bug: C-u M-x org-footnote-action sort deletes footnotes used in #+include:’d files [8.2.10 (release_8.2.10 @ /usr/share/emacs/25.3/lisp/org/)]
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 http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org-mode mailing list. When a file uses #+include: X.org to structure an org-file and the included files use footnotes defined in the master file, export works without problems, but sorting the footnotes by reference with : C-u M-x org-footnote-action s removes the footnotes used in the included files. Tested with org-footnote-section set to nil to move footnotes to the end of the section where they are used. Expected: Either - leave the footnotes only referenced in included files untouched, or - move them into the included files, or - move them to the end of the section where the referencing file is included. My current workaround is to manually use M-x insert-file to temporarily inline the files and then to call =C-u M-x org-footnote-action s= , but that is not really satisfying. Best wishes, Arne Emacs : GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.16) of 2018-04-28 Package: Org-mode version 8.2.10 (release_8.2.10 @ /usr/share/emacs/25.3/lisp/org/) current state: == (setq org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) outline-minor-mode-hook '(#[nil "\300\301!\207" [require outline-magic] 2] #[nil "\301\302!\210\303\304\305#\207" [outline-minor-mode-map require outline-magic define-key [(f10)] outline-cycle] 4] ) org-latex-classes '(("copernicus_discussions" "\\documentclass{copernicus_discussions}\n [NO-DEFAULT-PACKAGES]\n [PACKAGES]\n [EXTRA]" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("copernicus" "\\documentclass{copernicus}\n [NO-DEFAULT-PACKAGES]\n [PACKAGES]\n [EXTRA]" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" "\\newpage" "\\subsection*{%s}" "\\newpage") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("copernicus_discussions" "\\documentclass{copernicus_discussions}\n [NO-DEFAULT-PACKAGES]\n [PACKAGES]\n [EXTRA]" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" "\\newpage" "\\subsection*{%s}" "\\newpage") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("brief" "\\documentclass{scrlttr2}\n\\usepackage[ngerman]{babel}\n\\setlength{\\parindent}{0cm}\n\\KOMAoptions{paper=a4}" ("\n\\vspace{3mm}\\hspace*{10mm}\\textbf{%s}\n\\vspace{3mm}" . "\n\\vspace{3mm}\\hspace*{10mm}\\textbf{%s}\n\\vspace{3mm}") ("\n\\vspace{3mm}\\hspace*{5mm}\\textit{%s}\n\\vspace{3mm}" . "\n\\vspace{3mm}\\hspace*{5mm}\\textit{%s}\n\\vspace{3mm}") ("\n\\vspace{3mm}\\hspace*{5mm}\\textit{%s}\n\\vspace{3mm}" . "\n\\vspace{3mm}\\hspace*{5mm}\\textit{%s}\n\\vspace{3mm}") ("\n\\vspace{3mm}\\hspace*{5mm}\\textit{%s}\n\\vspace{3mm}" . "\n\\vspace{3mm}\\hspace*{5mm}\\textit{%s}\n\\vspace{3mm}") ("\n\\vspace{3mm}\\hspace*{5mm}\\textit{%s}\n\\vspace{3mm}" . "\n\\vspace{3mm}\\hspace*{5mm}\\textit{%s}\n\\vspace{3mm}") ) ("leaflet" "\\documentclass{leaflet}\n\\setlength{\\parindent}{0cm}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" "\\newpage" "\\subsection*{%s}" "\\newpage") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("protokoll" "\\documentclass{scrartcl}\n\\setlength{\\parindent}{0cm}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" "\\newpage" "\\subsection*{%s}" "\\newpage") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")