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: Jeremy Cowgar
Subject: Re: [PATCH] Treat :tangle-mode as an octal value not integer
Date: Wed, 29 Sep 2021 02:55:46 -0400
User-agent: Roundcube Webmail/1.0.3

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"

--
Jeremy



reply via email to

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