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: dkrm
Subject: Re: [PATCH] Treat :tangle-mode as an octal value not integer
Date: Wed, 29 Sep 2021 09:52:23 +0200
User-agent: mu4e 1.6.6; emacs 27.2

Jeremy Cowgar <jeremy@cowgar.com> writes:

> On 2021-09-29 02:39, tomas@tuxteam.de wrote:
>> 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.
>>> 
>> 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.
>
> Are you suggesting this currently works or that the patch should be
> changed to make that work? A quick try on my local system (pre-patch),
> I receive the error:
>
>   Wrong type argument: fixnump, "#o660"

You have to use the `identity` function for it to works: :tangle-mode (identity 
#o660)



reply via email to

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