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 16:26:59 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Sep 29, 2021 at 09:48:47PM +0800, Timothy wrote:
> Hi  Jeremy,
> 
> > 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.
> 
> I agree that :tangle-mode could be more user-friendly. However, I think we can
> go further. Currently, only (identity #o755 / 493) works, however I think it 
> would be
> good if it worked like chmod and accepted most of the following forms:
> ⁃ `#o755'
> ⁃ `755' (because people are used to this, as technically misleading as it may 
> be,
>   as long as we can tell “:tangle-mode 356” from “:tangle-mode (identity 
> #o544)”)
> ⁃ `rw' (equivalent to a=rw, and so #o555)
> ⁃ `a=rw,u+x' (equivalent to #o755) [hardest to support, so maybe?]

So you favour going the "full custom special parser". You're much more
involved in Org, so I think your gut feeling counts more than mine here :)

`755' is the funniest one, since, strictly speaking it doesn't correspond
to anything "out there" (note that the shell command `chmod' wants the
leading zero, or, well, it will do surprising things if you don't
provide it ;-)

But then, if it is clear that :tangle-mode is doing its own parsing,
it won't matter much.

Cheers
 - t

Attachment: signature.asc
Description: Digital signature


reply via email to

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