From: Andrea Giugliano <agiugliano@live.it>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Bug: Org-babel-detangle does not work for subtrees [8.3.5 (8.3.5-elpaplus @ /home/andrea/.emacs.d/elpa/org-plus-contrib-20160808/)]
Date: Tue, 30 Aug 2016 17:25:33 +0000 [thread overview]
Message-ID: <VI1PR0301MB19198DD0AD6643B894C3DCBBC7E00@VI1PR0301MB1919.eurprd03.prod.outlook.com> (raw)
Hello,
I have an org mode file with deep subtrees (i.e., 7 stars nesting
level).
When I try to detangle a src block generated by
"
******* TODO find map
:PROPERTIES:
:ID: 501cfff7-3b24-47cc-9ada-42e6d46abbe9
:END:
#+BEGIN_SRC ocaml :noeval :comments both :mkdirp yes :tangle ~/tmp/findMap.ml
anything here
#+END_SRC
"
and the generated file contains:
(* TODO find map *)
(* :PROPERTIES: *)
(* :ID: 501cfff7-3b24-47cc-9ada-42e6d46abbe9 *)
(* :END: *)
(* [[file:../home/andrea/workspace/agenda/myTasks.org::*find%20map][find\ map:1]] *)
anything here
(* find\ map:1 ends here *)
the detangle cannot find the header, and proposes me to create a new one
in the file.
I think that the ideal solution is to allow an user to make
org-babel-detangle rely on header IDs, since this not only assures
detangle to find the correct header every time, but also push the user
to use IDs through org-id (that seems good practice).
What do you think?
Thanks for the fantastic org mode!!
Andrea
Emacs : GNU Emacs 24.5.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.29)
of 2016-08-26 on localhost
Package: Org-mode version 8.3.5 (8.3.5-elpaplus @ /home/andrea/.emacs.d/elpa/org-plus-contrib-20160808/)
current state:
==============
(setq
org-capture-prepare-finalize-hook '(org-id-get-create)
org-reveal-mathjax t
org-pandoc-epub-rights "Copyright 2016 Andrea <>"
org-tab-first-hook '(org-hide-block-toggle-maybe org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook)
org-occur-hook '(org-first-headline-recenter)
org-src-tab-acts-natively t
org-metaup-hook '(org-babel-load-in-session-maybe)
org-html-format-drawer-function '(lambda (name contents) contents)
org-src-window-setup 'current-window
org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-function
org-confirm-shell-link-function 'yes-or-no-p
org-image-actual-width 550
org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
org-latex-pdf-process '("latexmk -pdf %f")
org-highlight-latex-and-related '(latex script entities)
org-latex-format-headline-function 'org-latex-format-headline-default-function
org-default-notes-file "/home/andrea/workspace/agenda/myTasks.org"
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-latex-format-drawer-function '(lambda (name contents) contents)
org-from-is-user-regexp "\\<Andrea\\>"
org-loop-over-headlines-in-active-region 'start-level
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-babel-pre-tangle-hook '(save-buffer)
org-mode-hook '((lambda nil
(local-set-key "\357" (quote org-mime-org-buffer-htmlize)))
org-toggle-blocks turn-on-flyspell
#[nil "\300\301\302\303\304$\207"
[org-add-hook change-major-mode-hook org-show-block-all append local]
5]
#[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 org-eldoc-load)
org-archive-hook '(org-attach-archive-delete-maybe)
org-use-speed-commands t
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-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
org-cycle-show-empty-lines
org-optimize-window-after-visibility-change)
org-babel-tangle-lang-exts '(("haskell" . "hs") ("scala" . "scala") ("ruby" . "rb")
("python" . "py") ("java" . "java") ("ocaml" . "ml")
("emacs-lisp" . "el") ("elisp" . "el"))
org-confirm-elisp-link-function 'yes-or-no-p
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-html-format-headline-function 'org-html-format-headline-default-function
org-structure-template-alist '(("n" "#+BEGIN_NOTES\n?\n#+END_NOTES")
("p"
"#+BEGIN_SRC plantuml :file uml.png \n?\n#+END_SRC")
("s" "#+BEGIN_SRC ?\n\n#+END_SRC")
("e" "#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE")
("q" "#+BEGIN_QUOTE\n?\n#+END_QUOTE")
("v" "#+BEGIN_VERSE\n?\n#+END_VERSE")
("V" "#+BEGIN_VERBATIM\n?\n#+END_VERBATIM")
("c" "#+BEGIN_CENTER\n?\n#+END_CENTER")
("l" "#+BEGIN_LaTeX\n?\n#+END_LaTeX") ("L" "#+LaTeX: ")
("h" "#+BEGIN_HTML\n?\n#+END_HTML") ("H" "#+HTML: ")
("a" "#+BEGIN_ASCII\n?\n#+END_ASCII") ("A" "#+ASCII: ")
("i" "#+INDEX: ?") ("I" "#+INCLUDE: %file ?"))
org-babel-load-languages '((ocaml . t) (java . t) (sh . t) (org . t) (python . t)
(ruby . t) (scala . t) (haskell . t) (plantuml . t)
(dot . t))
org-src-preserve-indentation t
org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function
org-agenda-files '("/home/andrea/workspace/agenda/myTasks.org")
org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
)
next reply other threads:[~2016-08-30 17:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-30 17:25 Andrea Giugliano [this message]
2016-08-30 20:19 ` Bug: Org-babel-detangle does not work for subtrees [8.3.5 (8.3.5-elpaplus @ /home/andrea/.emacs.d/elpa/org-plus-contrib-20160808/)] Grant Rettke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=VI1PR0301MB19198DD0AD6643B894C3DCBBC7E00@VI1PR0301MB1919.eurprd03.prod.outlook.com \
--to=agiugliano@live.it \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).