emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sébastien Miquel" <sebastien.miquel@posteo.eu>
To: No Wayman <iarchivedmywholelife@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Bug: org-babel-tangle: persmission denied when tangling [9.4.5 (9.4.5-gbc2659 @ /home/n/.emacs.d/straight/build/org/)]
Date: Tue,  4 May 2021 19:25:04 +0000	[thread overview]
Message-ID: <1e5a447a-2453-09da-fa51-379c9187b210@posteo.eu> (raw)
In-Reply-To: <875yzy73k0.fsf@gmail.com>


No Wayman writes:
> I'm tangling my early-init/init.el with the :tangle-mode header arg 
> set to (identity (#o444)).
This should be `(identity #o444)` I believe ?

> The idea behind this was to prevent myself from accidentally editing 
> the tangled source files
> instead of the Org files. 
> Unfortunately, since a3cb9b853 there seems to be a behavior change for 
> org-babel-tangle which prevents this.
File permissions are now set before writing to the file, for security
reasons. In this case, you remove write permission so emacs fails to
write to the file. Perhaps we should try to support this use case.

However, even with the previous version, it seems that subsequent
tangles should have failed (emacs should fail to delete the previous
tangled file). Can you confirm this and explain how you dealt with it ?

As a workaround, you could use a file-local
`org-babel-post-tangle-hook` to set file permission. Although
subsequent tangles will still fail.

Sébastien Miquel

  reply	other threads:[~2021-05-04 19:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-04 18:26 Bug: org-babel-tangle: persmission denied when tangling [9.4.5 (9.4.5-gbc2659 @ /home/n/.emacs.d/straight/build/org/)] No Wayman
2021-05-04 19:25 ` Sébastien Miquel [this message]
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             ` Bug: [PATCH] " Sébastien Miquel
2021-05-05  7:03               ` 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:

  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=1e5a447a-2453-09da-fa51-379c9187b210@posteo.eu \
    --to=sebastien.miquel@posteo.eu \
    --cc=emacs-orgmode@gnu.org \
    --cc=iarchivedmywholelife@gmail.com \


* 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


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