emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH] Treat :tangle-mode as an octal value not integer


From: tomas
Subject: Re: [PATCH] Treat :tangle-mode as an octal value not integer
Date: Wed, 29 Sep 2021 08:39:25 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Sep 28, 2021 at 10:54:48AM -0400, Jeremy Cowgar wrote:
> As an org user I would expect :tangle-mode 0660 to produce a file that
> has user rw, group rw, other nothing. Instead, what really happens
> currently is 0660 is treated as an integer which is actually
> 3140. This produces unexpected file permissions.
> 
> Prior to this patch to have rw,rw,none, one has to convert 0660 octal
> into an integer (432) and then specify :tangle-mode 432. This is counter
> intuitive and requires multiple steps.
> 
> After this patch, one just specifies the octal code as you do with
> chmod. :tangle-mode 0660 results in a file that is rw,rw,none.

Hm. This looks dangerous: interpreting an integer as octal just
due to the context?

I do understand why, but still...

Why not recommend Elisp's explicit syntax for octal representation,
i.e. :tangle-mode #o660? And put a prominent note in the docs,
of course.

Cheers
 - t

Attachment: signature.asc
Description: Digital signature


reply via email to

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