emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] org-babel-load-file, org-babel-tangle-use-relative-file-links


From: TAKAHASHI Yoshio
Subject: Re: [BUG] org-babel-load-file, org-babel-tangle-use-relative-file-links and :tangle header [9.6.11 (release_9.6.11 @ /opt/emacs/share/emacs/30.0.50/lisp/org/)]
Date: Thu, 07 Dec 2023 22:09:26 +0900
User-agent: Gnus/5.13 (Gnus v5.13)

TAKAHASHI Yoshio <yfb02119@nifty.com> writes:

>> This is because the default value of `org-babel-default-header-args'
>> already contains (:tangle . "no").
> Your explanation is very clear.  Thank you.

I did some tests.  Please check below transcript.  I expect to have the
same results in bloth case.


tkh:~$ cd /tmp
tkh:/tmp$ cat test1.org
* test1

#+begin_src emacs-lisp
  (print "1")
#+end_src

#+begin_src emacs-lisp :tangle "yes"
  (print "2")
#+end_src

#+begin_src emacs-lisp
  (print "3")
#+end_src

tkh:/tmp$ cat a.el
(require 'ox)
(setq org-babel-default-header-args
      (cons '(:tangle . "yes")
            (assq-delete-all :tangle org-babel-default-header-args)))
(org-babel-tangle-file "/tmp/test1.org" "/tmp/test1.el" "emacs-lisp")
tkh:/tmp$ emacs -Q -batch --eval="(setq 
org-babel-tangle-use-relative-file-links t)" -l a.el
Tangled 3 code blocks from test1.org
tkh:/tmp$ cat test1.el
(print "2")
tkh:/tmp$ emacs -Q -batch --eval="(setq 
org-babel-tangle-use-relative-file-links nil)" -l a.el
Tangled 3 code blocks from test1.org
tkh:/tmp$ cat test1.el
(print "1")

(print "2")

(print "3")
tkh:/tmp$

-- 
TAKAHASHI Yoshio <yfb02119@nifty.com>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]