From: <tomas@tuxteam.de> To: emacs-orgmode@gnu.org Subject: Re: [PATCH] Treat :tangle-mode as an octal value not integer Date: Wed, 29 Sep 2021 15:55:48 +0200 [thread overview] Message-ID: <20210929135548.GB15513@tuxteam.de> (raw) In-Reply-To: <90475ce545a6e10c1e2b27a3f7f537b7@cowgar.com> [-- Attachment #1: Type: text/plain, Size: 1639 bytes --] 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 #2: Digital signature --] [-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2021-09-29 13:56 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-09-28 14:54 Jeremy Cowgar 2021-09-29 6:39 ` tomas 2021-09-29 6:55 ` Jeremy Cowgar 2021-09-29 7:21 ` tomas 2021-09-29 7:52 ` dkrm 2021-09-29 8:22 ` tomas 2021-09-29 9:29 ` Gyro Funch 2021-09-29 11:07 ` tomas 2021-09-29 13:17 ` Jeremy Cowgar 2021-09-29 13:55 ` tomas [this message] 2021-09-29 7:10 ` Greg Minshall 2021-09-29 11:35 ` Bastien 2021-09-29 13:48 ` Timothy 2021-09-29 14:26 ` tomas 2021-09-29 14:58 ` Timothy 2021-09-29 15:13 ` Jeremy Cowgar 2021-09-30 18:13 ` Timothy 2021-09-29 15:14 ` tomas 2021-09-29 17:18 ` Greg Minshall 2021-09-29 18:15 ` tomas 2021-11-18 12:04 ` Timothy
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style List information: https://www.orgmode.org/ * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210929135548.GB15513@tuxteam.de \ --to=tomas@tuxteam.de \ --cc=emacs-orgmode@gnu.org \ --subject='Re: [PATCH] Treat :tangle-mode as an octal value not integer' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Code repositories for project(s) associated with this inbox: https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).