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

2021-11-18 Thread Timothy
Just removing this from updates.orgmode.org.

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

2021-09-30 Thread Timothy
Hi Jeremy, > I love it! Much better than my proposed patch. I’m about to send a patch based on my snippet, so I’m marking this patch as cancelled. All the best, Timothy

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

2021-09-29 Thread tomas
On Wed, Sep 29, 2021 at 08:18:11PM +0300, Greg Minshall wrote: > Tomas, > > in fact, i'm quite used to doing `chmod 755 foo.org`. i do it now in > bash, used to do it in csh, and it seems to work (as expected, afaict) > also in sh. all on arch linux. (`chmod +755 foo.org` *does* seem to > give

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

2021-09-29 Thread Greg Minshall
Tomas, in fact, i'm quite used to doing `chmod 755 foo.org`. i do it now in bash, used to do it in csh, and it seems to work (as expected, afaict) also in sh. all on arch linux. (`chmod +755 foo.org` *does* seem to give odd results. :) cheers, Greg

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

2021-09-29 Thread tomas
On Wed, Sep 29, 2021 at 10:58:43PM +0800, Timothy wrote: > > writes: > > > 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 :) > > Well, I'm not sure that my feeling is representative of

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

2021-09-29 Thread Jeremy Cowgar
On 2021-09-29 10:58, Timothy wrote: I think as long as it’s clear what’s intended, and it’s not some home-baked non-standard format, or terribly annoying to support — why not? Anyway, as an example here's a code snippet that implements everything I've mentioned. ... code removed for

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

2021-09-29 Thread Timothy
writes: > 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 :) Well, I'm not sure that my feeling is representative of experienced Org users, my opinion basically boils down to: >> I think as long

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

2021-09-29 Thread tomas
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.

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

2021-09-29 Thread Timothy
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

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

2021-09-29 Thread tomas
On Wed, Sep 29, 2021 at 09:17:54AM -0400, Jeremy Cowgar wrote: > On 2021-09-29 07:07, to...@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

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

2021-09-29 Thread Jeremy Cowgar
On 2021-09-29 07:07, to...@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

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

2021-09-29 Thread Bastien
Hi Jeremy, Jeremy Cowgar writes: > 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. (Just

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

2021-09-29 Thread tomas
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

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

2021-09-29 Thread Gyro Funch
On 2021-09-29 10:22 AM, to...@tuxteam.de wrote: On Wed, Sep 29, 2021 at 09:52:23AM +0200, dkrm wrote: Jeremy Cowgar writes: [...] 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:

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

2021-09-29 Thread tomas
On Wed, Sep 29, 2021 at 09:52:23AM +0200, dkrm wrote: > > Jeremy Cowgar writes: [...] > > 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:

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

2021-09-29 Thread dkrm
Jeremy Cowgar writes: > On 2021-09-29 02:39, to...@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

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

2021-09-29 Thread Jeremy Cowgar
On 2021-09-29 02:39, to...@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

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

2021-09-29 Thread tomas
On Wed, Sep 29, 2021 at 02:55:46AM -0400, Jeremy Cowgar wrote: > On 2021-09-29 02:39, to...@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.

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

2021-09-29 Thread Greg Minshall
Tomas, > 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. as much as my fingers are used to "0660 ==> octal", this probably makes sense. on the other hand, to protect users, might it be worthwhile

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

2021-09-29 Thread tomas
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