From: "Sébastien Miquel" <sebastien.miquel@posteo.eu> To: No Wayman <iarchivedmywholelife@gmail.com> Cc: Bastien <bzg@gnu.org>, emacs-orgmode@gnu.org Subject: Re: Bug: [PATCH] org-babel-tangle: persmission denied when tangling [9.4.5 (9.4.5-gbc2659 @ /home/n/.emacs.d/straight/build/org/)] Date: Wed, 5 May 2021 06:49:56 +0000 [thread overview] Message-ID: <eee44f40-9123-24e8-dbbc-b0ed8f77942a@posteo.eu> (raw) In-Reply-To: <87y2ctlviu.fsf@gmail.com> [-- Attachment #1: Type: text/plain, Size: 746 bytes --] No Wayman writes: > Another related bug to the changes: > > I have the :tangle header-arg set to evaluate some elisp to return the > file name: > > org-babel no longer interprets this elisp. It is being used literally > as the file name: > e.g. > > Wrote /home/n/.emacs.d/(concat (file-name-sans-extension > (buffer-file-name)) ".el") Here's another patch, to be applied on top of the previous one, that fixes this. The specific case you mention can also be achieved by setting the :tangle argument to `yes`: in this case, the tangled file name is computed using the buffer file name and changing the extension according to the src block language. Thank you again for the report, and sorry for breaking everything. -- Sébastien Miquel [-- Attachment #2: 0001-ob-tangle.el-org-babel-tangle-collect-blocks-Use-cor.patch --] [-- Type: text/x-patch, Size: 1143 bytes --] From b7c5103fdd05c3d30805ebcc5084ef82c44cd8ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Miquel?= <sebastien.miquel@posteo.eu> Date: Wed, 5 May 2021 08:31:43 +0200 Subject: [PATCH] ob-tangle.el: (org-babel-tangle-collect-blocks): Use correct tangle name * lisp/ob-tangle.el: (org-babel-tangle-collect-blocks): Use correct tangle name. The :tangle header argument might be some elisp, to be evaluated. --- Range-diff: -: --------- > 1: b7c5103fd ob-tangle.el: (org-babel-tangle-collect-blocks): Use correct tangle name lisp/ob-tangle.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el index 96a4ef049..8af03b11a 100644 --- a/lisp/ob-tangle.el +++ b/lisp/ob-tangle.el @@ -377,6 +377,7 @@ be used to limit the collected code blocks by target file." ;; Add the spec for this block to blocks under its tangled ;; file name. (let* ((block (org-babel-tangle-single-block counter)) + (src-tfile (cdr (assq :tangle (nth 4 block)))) (base-name (cond ((string= "yes" src-tfile) ;; buffer name -- 2.31.1
next prev parent reply other threads:[~2021-05-05 6:50 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-04 18:26 Bug: " No Wayman 2021-05-04 19:25 ` Sébastien Miquel 2021-05-04 19:33 ` No Wayman 2021-05-04 20:27 ` Sébastien Miquel 2021-05-04 20:32 ` Bastien 2021-05-04 21:19 ` Sébastien Miquel 2021-05-05 3:15 ` No Wayman 2021-05-05 6:49 ` Sébastien Miquel [this message] 2021-05-05 7:03 ` Bug: [PATCH] " Bastien 2021-05-05 13:53 ` No Wayman 2021-05-05 6:43 ` Bug: " Bastien
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=eee44f40-9123-24e8-dbbc-b0ed8f77942a@posteo.eu \ --to=sebastien.miquel@posteo.eu \ --cc=bzg@gnu.org \ --cc=emacs-orgmode@gnu.org \ --cc=iarchivedmywholelife@gmail.com \ --subject='Re: Bug: [PATCH] org-babel-tangle: persmission denied when tangling [9.4.5 (9.4.5-gbc2659 @ /home/n/.emacs.d/straight/build/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
Code repositories for project(s) associated with this 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).