emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: TAKAHASHI Yoshio <yfb02119@nifty.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <87h6kuyxa1.fsf@yfb02119.nifty.com> (raw)
In-Reply-To: <87y1e71nts.fsf@yfb02119.nifty.com> (TAKAHASHI Yoshio's message of "Wed, 06 Dec 2023 22:07:43 +0900")

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	other threads:[~2023-12-07 13:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-26  6:57 [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/)] TAKAHASHI Yoshio
2023-12-05 12:09 ` Ihor Radchenko
2023-12-06 13:07   ` TAKAHASHI Yoshio
2023-12-07 13:09     ` TAKAHASHI Yoshio [this message]
2023-12-08 12:56       ` Ihor Radchenko
2023-12-08 13:57         ` TAKAHASHI Yoshio

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=87h6kuyxa1.fsf@yfb02119.nifty.com \
    --to=yfb02119@nifty.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /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).