emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* 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/)]
@ 2018-12-27 18:09 Arne Babenhauserheide
  2018-12-28  9:10 ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: Arne Babenhauserheide @ 2018-12-27 18:09 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 29411 bytes --]



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\b\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}") ("\\paragraph{%s}" . "\\paragraph*{%s}")
                      ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
                     ("beamer" "\\documentclass[presentation]{beamer}\n     [DEFAULT-PACKAGES]\n     [PACKAGES]\n     [EXTRA]"
                      ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}")
                      ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
                     ("article" "\\documentclass[11pt]{scrartcl}" ("\\section{%s}" . "\\section*{%s}")
                      ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
                      ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
                     ("report" "\\documentclass[11pt]{scrreprt}" ("\\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-footnote-section nil
 org-latex-default-packages-alist '(("AUTO" "inputenc" t) ("T1" "fontenc" t) ("" "fixltx2e" nil) ("" "graphicx" t)
                                    ("" "longtable" nil) ("" "float" nil) ("" "wrapfig" nil) ("" "rotating" nil)
                                    ("normalem" "ulem" t) ("" "amsmath" t) ("force,almostfull" "textcomp" t) ("" "marvosym" t)
                                    ("" "wasysym" t) ("" "amssymb" t) ("" "hyperref" nil) "\\tolerance=1000")
 org-agenda-clockreport-parameter-plist '(:link t :maxlevel 2 :properties ("Effort"))
 org-texinfo-format-drawer-function '(lambda (name contents) contents)
 org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-checkbox-hierarchical-statistics nil
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-html-format-drawer-function '(lambda (name contents) contents)
 org-latex-format-inlinetask-function 'ignore
 org-confirm-shell-link-function 'yes-or-no-p
 org-finalize-agenda-hook '(#[nil "\300\301!\207" [org-agenda-to-appt t] 2])
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-time-stamp-custom-formats '("<%Y-%m-%d %a>" . "<%Y-%m-%d %a %H:%M>")
 org-latex-pdf-process '("pdflatex -interaction nonstopmode -shell-escape -output-directory %o %f" "bibtex $(basename %b)"
                         "pdflatex -interaction nonstopmode -shell-escape -output-directory %o %f"
                         "pdflatex -interaction nonstopmode -shell-escape -output-directory %o %f")
 org-export-default-language "de"
 org-file-apps '((auto-mode . emacs) ("\\.mm\\'" . default) ("\\.x?html?\\'" . system) ("\\.pdf\\'" . "okular %s"))
 org-agenda-skip-scheduled-if-done t
 org-agenda-custom-commands '(("o" "Agenda and TODOs"
                               ((agenda nil
                                 ((org-agenda-compact-blocks nil) (org-agenda-block-separator 45)
                                  (org-agenda-overriding-header ""))
                                 )
                                (tags-todo "-Aarlaub-notodo" ((org-agenda-block-separator 45)))
                                (tags "KANBAN"
                                 ((org-agenda-block-separator 45) (org-agenda-compact-blocks nil)
                                  (org-agenda-overriding-header ""))
                                 )
                                )
                               )
                              ("A" "Aarlaubstag"
                               ((agenda nil
                                 ((org-agenda-span 1) (org-agenda-compact-blocks nil) (org-agenda-block-separator 45)
                                  (org-agenda-overriding-header ""))
                                 )
                                (tags-todo "+Aarlaub" ((org-agenda-block-separator 45))))
                               )
                              )
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-default-notes-file "~/.emacs.d/private/org/emacs-remember-mode.org"
 org-agenda-include-diary t
 org-after-todo-state-change-hook '(org-clock-out-if-current kiwon/org-agenda-redo-in-other-window)
 org-latex-format-drawer-function '(lambda (name contents) contents)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-agenda-clock-consistency-checks '(:max-duration "10:00" :min-duration 0 :max-gap "0:05" :gap-ok-around ("4:00" "12:30")
                                       :default-face ((:background "DarkRed") (:foreground "white")) :overlap-face nil
                                       :gap-face nil :no-end-time-face nil :long-face nil :short-face nil)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5]
                 org-mode-reftex-setup
                 #[nil "\300\301\302\303\304$\207"
                   [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5]
                 org-babel-result-hide-spec org-babel-hide-all-hashes
                 #[nil
                   "\303\304!\210\305\306!\210\b\307	:\203#	@\310\306\311\n@P\"\210	A\211\202\0*\307\207"
                   [org-structure-template-alist --cl-var-- template require org make-local-variable ac-stop-words nil
                    add-to-list "<"]
                   5]
                 fic-mode)
 org-extend-today-until 4
 org-texinfo-format-headline-function 'ignore
 org-ascii-format-drawer-function '(lambda (name contents width) contents)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe)
 org-directory "~/.emacs.d/private/org"
 org-enforce-todo-dependencies t
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-hide-inline-tasks
                  org-cycle-show-empty-lines org-optimize-window-after-visibility-change)
 org-plantuml-jar-path "/usr/share/plantuml/lib/plantuml.jar"
 org-agenda-start-with-clockreport-mode t
 org-agenda-finalize-hook '(#[nil "\300\301!\207" [org-agenda-to-appt t] 2])
 org-link-abbrev-alist '(("bib" . "~/aufschriebe/ref.bib::%s") ("notes" . "~/aufschriebe/papers.org::#%s")
                         ("papers" . "~/aufschriebe/papers/%s.pdf"))
 org-latex-packages-alist '(("" "color") ("" "minted") ("" "color" t) ("" "minted" t) ("" "parskip" t))
 org-babel-tangle-lang-exts '(("python" . "py") ("C++" . "cpp") ("emacs-lisp" . "el"))
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 outline-mode-hook '(#[nil "\300\301!\207" [require outline-magic] 2])
 org-babel-after-execute-hook '(#[nil "\b\205\0\301 \207" [org-inline-image-overlays org-display-inline-images] 1])
 org-latex-listings 'minted
 org-ditaa-jar-path "~/.emacs.d/private/org/ditaa0_9/ditaa0_9.jar"
 org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent)
 org-agenda-skip-deadline-if-done t
 org-html-format-headline-function 'ignore
 org-structure-template-alist '(("k" "#+begin_kasten\n?\n#+end_kasten" "<div class=\"kasten\">?</div>")
                                ("s" "#+BEGIN_SRC ?\n\n#+END_SRC" "<src lang=\"?\">\n\n</src>")
                                ("e" "#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE" "<example>\n?\n</example>")
                                ("q" "#+BEGIN_QUOTE\n?\n#+END_QUOTE" "<quote>\n?\n</quote>")
                                ("v" "#+BEGIN_VERSE\n?\n#+END_VERSE" "<verse>\n?\n</verse>")
                                ("V" "#+BEGIN_VERBATIM\n?\n#+END_VERBATIM" "<verbatim>\n?\n</verbatim>")
                                ("c" "#+BEGIN_CENTER\n?\n#+END_CENTER" "<center>\n?\n</center>")
                                ("l" "#+BEGIN_LaTeX\n?\n#+END_LaTeX" "<literal style=\"latex\">\n?\n</literal>")
                                ("L" "#+LaTeX: " "<literal style=\"latex\">?</literal>")
                                ("h" "#+BEGIN_HTML\n?\n#+END_HTML" "<literal style=\"html\">\n?\n</literal>")
                                ("H" "#+HTML: " "<literal style=\"html\">?</literal>")
                                ("a" "#+BEGIN_ASCII\n?\n#+END_ASCII" "") ("A" "#+ASCII: " "") ("i" "#+INDEX: ?" "#+INDEX: ?")
                                ("I" "#+INCLUDE: %file ?" "<include file=%file markup=\"?\">")
                                ("b" "#+BEGIN_ABSTRACT\n?\n#+END_ABSTRACT" "<div class=\"abstract\">\n?\n</div>")
                                ("d"
                                 "#+HTML: <div style=\"float: right; text-align: right; border: solid thin gray; padding-left: 1em; padding-right: 1em; padding-top: 0.5em; margin-left: 1em\">\n#+HTML: <p><strong><a href=\"\">PDF-version</a> (for printing)</strong></p>\n#+HTML: <p><a href=\"\">Package</a> (to install)</p>\n#+HTML: <p><a href=\"\">orgmode-version</a> (for editing)</p>\n#+HTML: <p><a href=\"\">repository</a> (for forking)</p>\n#+HTML: </div>" "<div style=\"float: right; text-align: right; border: solid thin gray; padding-left: 1em; padding-right: 1em; padding-top: 0.5em; margin-left: 1em\">\n<p><strong><a href=\"\">PDF-version</a> (for printing)</strong></p>\n<p><a href=\"\">Package</a> (to install)</p>\n<p><a href=\"\">orgmode-version</a> (for editing)</p>\n<p><a href=\"\">repository</a> (for forking)</p>\n</div>")
                                )
 org-babel-load-languages '((restclient . t) (C . t) (R . t) (asymptote) (awk) (calc) (clojure) (comint) (css) (ditaa . t)
                            (dot . t) (emacs-lisp . t) (fortran) (gnuplot . t) (haskell) (io) (java) (js) (latex) (ledger)
                            (lilypond) (lisp) (matlab) (maxima) (mscgen) (ocaml) (octave) (org . t) (perl) (picolisp)
                            (plantuml . t) (python . t) (ref) (ruby) (sass) (scala) (scheme . t) (screen) (sh . t) (shen)
                            (sql) (sqlite))
 org-clock-in-hook '(kiwon/org-agenda-redo-in-other-window)
 org-html-format-inlinetask-function 'ignore
 org-agenda-files '("~/.emacs.d/private/org/emacs-plan.org")
 org-texinfo-format-inlinetask-function 'ignore
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer kiwon/org-agenda-redo-in-other-window)
 org-confirm-babel-evaluate 'my/org-confirm-babel-evaluate
 org-src-fontify-natively t
 org-publish-project-alist '(("guile-basics" :base-directory "~/Dokumente/eigenes/py2guile" :publishing-directory
                              (concat private-publish-ftp-proj "guile-basics/") :base-extension "org" :publishing-function
                              org-html-publish-to-html :completion-function
                              (lambda nil
                               (private-publish-rename-to-index (concat private-publish-ftp-proj "guile-basics/")
                                "guile-basics.html")
                               )
                              :section-numbers nil :with-toc t :html-preamble t :exclude ".*" :include ["guile-basics.org"])
                             ("guix-js-wisp" :base-directory "~/.emacs.d/private/journal" :publishing-directory
                              (concat private-publish-ftp-proj "guix-js-wisp/") :base-extension "org" :publishing-function
                              org-html-publish-to-html :completion-function
                              (lambda nil
                               (private-publish-rename-to-index (concat private-publish-ftp-proj "guix-js-wisp/")
                                "2014-04-01-Di-guix-wisp.html")
                               )
                              :section-numbers nil :with-toc t :html-preamble t :exclude ".*" :include
                              ["2014-04-01-Di-guix-wisp.org"])
                             ("py2guile" :base-directory "~/Quell/eigenes/py2guile" :publishing-directory
                              (concat private-publish-ftp-proj "py2guile/") :base-extension "org" :publishing-function
                              org-html-publish-to-html :completion-function
                              (lambda nil
                               (private-publish-rename-to-index (concat private-publish-ftp-proj "py2guile/") "py2guile.html")
                               (copy-file
                                (concat (expand-file-name "~/.emacs.d/private/journal/")
                                 "2014-01-12-So-python-to-guile-scheme.org")
                                (concat private-publish-ftp-proj "py2guile/" "py2guile.org") t)
                               (copy-file
                                (concat (expand-file-name "~/.emacs.d/private/journal/")
                                 "2014-01-12-So-python-to-guile-scheme.pdf")
                                (concat private-publish-ftp-proj "py2guile/" "py2guile-latest.pdf") t)
                               )
                              :section-numbers nil :with-toc t :html-preamble t :exclude ".*" :include ["py2guile.org"])
                             ("project-py2guile" :base-directory "~/Projekte/py2guile" :publishing-directory
                              (concat private-publish-ftp-proj "py2guile/") :base-extension "org" :publishing-function
                              org-html-publish-to-html :completion-function
                              (lambda nil
                               (private-publish-rename-to-index (concat private-publish-ftp-proj "py2guile/") "py2guile.html"))
                              :section-numbers nil :with-toc t :html-preamble t :exclude ".*" :include ["py2guile.org"])
                             ("with-guise-and-guile" :components ("with-guise-and-guile-org" "with-guise-and-guile-static"))
                             ("with-guise-and-guile-org" :base-directory "~/Dokumente/eigenes/with-guise-and-guile"
                              :publishing-directory "~/Dokumente/eigenes/with-guise-and-guile/export/" :base-extension "org"
                              :publishing-function org-html-publish-to-html :preparation-function
                              (lambda nil (org-save-all-org-buffers)
                               (shell-command "touch ~/Projekte/with-guise-and-guile/index.org"))
                              :section-numbers nil :with-toc t :html-html5-fancy t :html-viewport t :recursive t :auto-sitemap
                              t :sitemap-sort-files anti-chronologically :sitemap-sort-folders last :html-preamble t :exclude
                              "org-templates/*")
                             ("with-guise-and-guile-static" :base-directory "~/Dokumente/eigenes/with-guise-and-guile"
                              :publishing-directory "~/Dokumente/eigenes/with-guise-and-guile/export/" :base-extension
                              "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf" :publishing-function org-publish-attachment)
                             ("project-with-guise-and-guile" :components
                              ("with-guise-and-guile-org" "with-guise-and-guile-static"))
                             ("project-with-guise-and-guile-org" :base-directory "~/Projekte/with-guise-and-guile"
                              :publishing-directory "~/Dokumente/eigenes/with-guise-and-guile/export/" :base-extension "org"
                              :publishing-function org-html-publish-to-html :preparation-function
                              (lambda nil (org-save-all-org-buffers)
                               (shell-command "touch ~/Projekte/with-guise-and-guile/index.org"))
                              :section-numbers nil :with-toc t :html-html5-fancy t :html-viewport t :recursive t :auto-sitemap
                              t :sitemap-sort-files anti-chronologically :sitemap-sort-folders last :html-preamble t :exclude
                              "org-templates/*")
                             ("project-with-guise-and-guile-static" :base-directory "~/Projekte/with-guise-and-guile"
                              :publishing-directory "~/Dokumente/eigenes/with-guise-and-guile/export/" :base-extension
                              "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf" :publishing-function org-publish-attachment)
                             ("freecom-kav-freesite" :base-directory "~/freecomm" :publishing-directory
                              (concat "/home/arne/" "freecomm/" "freesite/") :base-extension "org" :publishing-function
                              org-html-publish-to-html :completion-function
                              (lambda nil
                               (private-publish-rename-to-index (concat "/home/arne/" "freecomm/" "freesite/") "freecom.html")
                               (copy-file (concat "/home/arne/" "freecomm/" "freesite/" "index.html")
                                (concat private-publish-ftp-proj "freecom/" "index.html") t)
                               (copy-file (concat "/home/arne/" "freecomm/" "freesite/" "worg.css")
                                (concat private-publish-ftp-proj "freecom/" "worg.css") t)
                               )
                              :section-numbers nil :with-toc t :html-preamble t :exclude ".*" :include ["freecom.org"])
                             ("freecom" :base-directory "~/Quell/Programme/freecom" :publishing-directory
                              (concat private-publish-ftp-proj "freecom/") :base-extension "org" :publishing-function
                              org-html-publish-to-html :completion-function
                              (lambda nil
                               (private-publish-rename-to-index (concat private-publish-ftp-proj "freecom/") "freecom.html"))
                              :section-numbers nil :with-toc t :html-preamble t :exclude ".*" :include
                              ["freecom.org" "babcom.js"])
                             ("wisp-srfi" :base-directory "~/Quell/Programme/wisp/docs" :publishing-directory
                              (concat private-publish-ftp-proj "wisp/") :base-extension "org" :publishing-function
                              org-html-publish-to-html :section-numbers nil :with-toc t :html-preamble t :exclude ".*"
                              :include ["srfi.org"])
                             ("freecom-journal" :base-directory "~/.emacs.d/private/journal" :publishing-directory
                              (concat private-publish-ftp-proj "freecom/") :base-extension "org" :publishing-function
                              org-html-publish-to-html :completion-function
                              (lambda nil
                               (rename-file (concat private-publish-ftp-proj "freecom/2014-02-21-Fr-freecom.html")
                                (concat private-publish-ftp-proj "freecom/index.html") t)
                               )
                              :section-numbers nil :with-toc t :html-preamble t :exclude ".*" :include
                              ["2014-02-21-Fr-freecom.org" "2014-02-21-Fr-freecom-screenshot.png"])
                             ("freenet-funding" :base-directory "~/.emacs.d/private/journal" :publishing-directory
                              (concat private-publish-ftp-proj "freenet-funding/") :base-extension "org" :publishing-function
                              org-html-publish-to-html :completion-function
                              (lambda nil
                               (rename-file
                                (concat private-publish-ftp-proj "freenet-funding/2014-06-11-Mi-freenet-funding.html")
                                (concat private-publish-ftp-proj "freenet-funding/index.html") t)
                               )
                              :section-numbers nil :with-toc t :html-preamble t :exclude ".*" :include
                              ["2014-06-11-Mi-freenet-funding.org"])
                             ("freenet-funding-kaverne" :base-directory "~/freenet-funding/" :publishing-directory
                              (concat "freenet-funding/" "site/") :base-extension "org" :publishing-function
                              org-html-publish-to-html :completion-function
                              (lambda nil
                               (copy-file (concat "site/" "index.html")
                                (concat private-publish-ftp-proj "freenet-funding/index.html") t)
                               (copy-file (concat "site/" "logo.png")
                                (concat private-publish-ftp-proj "freenet-funding/logo.png") t)
                               (copy-file (concat "site/" "slides.pdf")
                                (concat private-publish-ftp-proj "freenet-funding/slides.pdf") t)
                               (copy-file (concat "site/" "worg.css")
                                (concat private-publish-ftp-proj "freenet-funding/worg.css") t)
                               (async-shell-command "source /home/arne/.bashrc; freesitemgr update freenet-funding"))
                              :section-numbers nil :with-toc t :html-preamble t :exclude ".*" :include ["index.org"])
                             ("freenet-plugin-bare-kaverne" :base-directory "~/freenet-plugin-bare/" :publishing-directory
                              "site/" :base-extension "org" :publishing-function org-html-publish-to-html :completion-function
                              (lambda nil
                               (copy-file (concat "site/" "index.html")
                                (concat private-publish-ftp-proj "freenet-plugin-bare/index.html") t)
                               (async-shell-command "source /home/arne/.bashrc; freesitemgr update freenet-plugin-bare")
                               (async-shell-command "source ~/.bashrc; freesitemr update freenet-funding"))
                              :section-numbers nil :with-toc t :html-preamble t :exclude ".*" :include ["index.org"])
                             ("freenet-release-management" :base-directory "~/Quell/Programme/freenet-release-management/"
                              :publishing-directory "site/" :base-extension "org" :publishing-function
                              org-html-publish-to-html :completion-function
                              (lambda nil (copy-file (concat "site/" "notes.html") (concat "site/" "index.html") t)
                               (copy-file (concat "site/" "index.html")
                                (concat private-publish-ftp-proj "freenet-release-management/index.html") t)
                               (async-shell-command "source ~/.bashrc; freesitemgr update freenet-release-management"))
                              :section-numbers nil :with-toc t :html-preamble t :exclude ".*" :include ["notes.org"])
                             ("orgmode-single-file" :base-directory "~/.emacs.d/private/journal" :publishing-directory
                              (concat private-publish-ftp-proj "orgmode-single-file/") :base-extension "org"
                              :publishing-function org-html-publish-to-html :completion-function
                              (lambda nil
                               (private-publish-rename-to-index (concat private-publish-ftp-proj "orgmode-single-file/")
                                "2013-11-25-Mo-publish-single-file-org-mode.html")
                               )
                              :section-numbers nil :with-toc t :html-preamble t :exclude ".*" :include
                              ["2013-11-25-Mo-publish-single-file-org-mode.org"])
                             )
 )
--
Unpolitisch sein
heißt politisch sein
ohne es zu merken

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1076 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 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/)]
  2018-12-27 18:09 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
@ 2018-12-28  9:10 ` Nicolas Goaziou
  2018-12-28 10:58   ` Arne Babenhauserheide
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2018-12-28  9:10 UTC (permalink / raw)
  To: Arne Babenhauserheide; +Cc: emacs-orgmode

Hello,

Arne Babenhauserheide <arne_bab@web.de> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 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/)]
  2018-12-28  9:10 ` Nicolas Goaziou
@ 2018-12-28 10:58   ` Arne Babenhauserheide
  2018-12-30 10:01     ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: Arne Babenhauserheide @ 2018-12-28 10:58 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1231 bytes --]

Hi Nicolas,

Thank you for your answer!

Nicolas Goaziou <mail@nicolasgoaziou.fr> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1076 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 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/)]
  2018-12-28 10:58   ` Arne Babenhauserheide
@ 2018-12-30 10:01     ` Nicolas Goaziou
  2019-01-02 20:12       ` Arne Babenhauserheide
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2018-12-30 10:01 UTC (permalink / raw)
  To: Arne Babenhauserheide; +Cc: emacs-orgmode

Hello,

Arne Babenhauserheide <arne_bab@web.de> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 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/)]
  2018-12-30 10:01     ` Nicolas Goaziou
@ 2019-01-02 20:12       ` Arne Babenhauserheide
  2019-01-03 13:50         ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: Arne Babenhauserheide @ 2019-01-02 20:12 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1420 bytes --]


Nicolas Goaziou <mail@nicolasgoaziou.fr> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1076 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 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/)]
  2019-01-02 20:12       ` Arne Babenhauserheide
@ 2019-01-03 13:50         ` Nicolas Goaziou
  2019-01-03 18:49           ` Arne Babenhauserheide
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2019-01-03 13:50 UTC (permalink / raw)
  To: Arne Babenhauserheide; +Cc: emacs-orgmode

Hello,

Arne Babenhauserheide <arne_bab@web.de> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 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/)]
  2019-01-03 13:50         ` Nicolas Goaziou
@ 2019-01-03 18:49           ` Arne Babenhauserheide
  0 siblings, 0 replies; 7+ messages in thread
From: Arne Babenhauserheide @ 2019-01-03 18:49 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode


> Arne Babenhauserheide <arne_bab@web.de> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-01-03 18:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-27 18:09 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
2018-12-28  9:10 ` Nicolas Goaziou
2018-12-28 10:58   ` Arne Babenhauserheide
2018-12-30 10:01     ` Nicolas Goaziou
2019-01-02 20:12       ` Arne Babenhauserheide
2019-01-03 13:50         ` Nicolas Goaziou
2019-01-03 18:49           ` Arne Babenhauserheide

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).