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

On Wed, Sep 29, 2021 at 09:17:54AM -0400, Jeremy Cowgar wrote:
> On 2021-09-29 07:07, tomas@tuxteam.de wrote:
> >On Wed, Sep 29, 2021 at 11:29:06AM +0200, Gyro Funch wrote:
> >
> >[...]
> >
> >>I don't know if it would ever be ambiguous, but could :tangle-mode
> >>have the ability to infer if it were integer- or octal-format based
> >>on checking against 'reasonable' permission settings in octal
> >>notation?
> >
> >To me, that sounds rather scary. But I'm a timid person :-)
> >
> 
> To keep things from breaking, what if the system were smart and
> if it sees #o prefix, it then parses as an octal, otherwise it keeps
> it's current behavior?

That was roughly my idea: come closer to the Emacs Lisp int
representation (whether only for this case or more generally).

But I'm not deep enough in Org to even venture a recommendation.

> Then add that to the docs. I understand about backwards compatibility
> and that was my greatest fear with this patch when creating it.
> 
> Was just using org-babel-tangle for configuration files and had some
> that I wanted to make 0700 and 0600. I soon learned, that didn't work
> out as planned :-)

I definitely understand your surprise. I know it the other way
around. Back then (TM), it was customary in Windows to write out
the leading zeros in the IPv4 octets, to fill them up to three
places. Something like 192.168.042.001 -- Heavens knows why.

Unix utilities interpret those with a leading zero as an octal
representation (that's how atoi() or strtol() in its default
mode work). I had hours of fun with my Windows colleagues ;-)

Cheers
 - t

Attachment: signature.asc
Description: Digital signature


reply via email to

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