From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id cJy7Lb/VmGFxPwAAgWs5BA (envelope-from ) for ; Sat, 20 Nov 2021 12:02:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id oDVRKb/VmGFFRgAAbx9fmQ (envelope-from ) for ; Sat, 20 Nov 2021 11:02:23 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1C74834FB6 for ; Sat, 20 Nov 2021 12:02:23 +0100 (CET) Received: from localhost ([::1]:59994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1moO8S-0004KA-W3 for larch@yhetil.org; Sat, 20 Nov 2021 06:02:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1moO7w-0004K0-Ll for emacs-orgmode@gnu.org; Sat, 20 Nov 2021 06:01:48 -0500 Received: from [2607:f8b0:4864:20::432] (port=46796 helo=mail-pf1-x432.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1moO7u-0007ih-W4 for emacs-orgmode@gnu.org; Sat, 20 Nov 2021 06:01:48 -0500 Received: by mail-pf1-x432.google.com with SMTP id o4so11516767pfp.13 for ; Sat, 20 Nov 2021 03:01:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:references:user-agent:in-reply-to :message-id:mime-version; bh=XuatmRATLXZ52S4cVeLASsAI+KbC6HRlIx7haGVxl7U=; b=it3Af1ZK/TfEFs5/wHrFc2xvOwrcOb5bUh4xEL+d2TgIRqjLhn3CUdguhzakEH1q2T G7nmprJq13eaGZqmWpeUGi//EOg4flLXcFH9FMraArCMcNr2qstcdP3Z201CTAlgGovr bCfxASqah7YrFQ0j4zMHdEzTqHlZtVvp2s1OUyXTs4TcYCmKmUg95AS3EhVDyxC4G14H TrCuazzUvjlDg243tHmKGiKB+GB0bgoevXX6238lIlgnyVkWXNrH35xhxdtuuH58YVHa pW+F6A+VkgRMrD2u4ADGfoUsGC0MzRTIrbAE8X3kJ6HRIJ8RbkgFwjyWEUFzAW0pz8jA a6QA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:references:user-agent :in-reply-to:message-id:mime-version; bh=XuatmRATLXZ52S4cVeLASsAI+KbC6HRlIx7haGVxl7U=; b=Klwgd3BsC4NYNZmnqSY2qsWYCe4U0ZXGhq0bqGr2f3qpifDQeCl1NZ1RwxigajrCyZ EGqPqehhH6V4X2VIXapmCs6vrifisl1sw55aleUE+AviMdQXR2gEW5DzIU7YU+TzXHvE cUQ4YAgv4XVCnd3jOEMFF0EVe4QKD3oKNOCqAbbX0UVwpjDNWSRHLMRDkVrSGFnNkch4 TYoYuh3CyPv9yjCiHE5t6gbNau8/afccsqHSrUKSV8tD2Dv3ebpKzlnjUhtB4hNbiNy1 mGODxUZMOVSIQYa3Lt/8Ge7Rhzm64K+6wmOIv3L3sR01rdWbFvr/b7tcAtS5VB+24WEG I0nA== X-Gm-Message-State: AOAM530p+wZ8tSDFXd2vqxgRDvX0pSAhih8GsZSKt+roqaHjcrjCCJJr HCKC12s1BOd7tdJ4DHqE8vU= X-Google-Smtp-Source: ABdhPJxlXDGZnEQnKZFwlgjonRwPfrxHMlfZqBeWW9sfUQ/oVTEFjtEz7JFBfGkEyw2lUIanBeUziQ== X-Received: by 2002:a65:670d:: with SMTP id u13mr22858292pgf.455.1637406104877; Sat, 20 Nov 2021 03:01:44 -0800 (PST) Received: from localhost (61-245-128-160.3df580.per.nbn.aussiebb.net. [61.245.128.160]) by smtp.gmail.com with ESMTPSA id h3sm2762240pfi.207.2021.11.20.03.01.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Nov 2021 03:01:43 -0800 (PST) From: Timothy To: Tim Cross Subject: Re: [PATCH] Accept more :tangle-mode specification forms Date: Sat, 20 Nov 2021 16:08:16 +0800 References: <875yuh9b3t.fsf@gmail.com> <87czojh6m4.fsf@gmail.com> <8735ntg3ve.fsf@gmail.com> <87mtm1e5lt.fsf@gmail.com> <87pmqwt6zi.fsf@gmail.com> User-agent: mu4e 1.6.9; emacs 28.0.50 In-reply-to: <87pmqwt6zi.fsf@gmail.com> Message-ID: <874k87850s.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::432 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=tecosaur@gmail.com; helo=mail-pf1-x432.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1637406143; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=XuatmRATLXZ52S4cVeLASsAI+KbC6HRlIx7haGVxl7U=; b=UwCFucAnf9FDMnhqbxj4NsFVevZJlkqor8KCHdXsK6zkOxWIar+B6ueFAB6jEKraQdr/BA 58YhPTSwlrl16Dp++/hJMRu5hqAfAdkWyYUkTOSphs+FDW0Po/pl3e+J1CMTrNlbKa/5NU zb1/EttWB6jv7a4K45fyKyHrkXFBqoHs4de5y5MQFQ/vaAiOlZW97VIJ/FeC/ypp8IyqRa A8N7V3ivLOthQWZ+3aH7P/xrzMFairjfBAVy6cPYlDDkfAZG8BlrE3qpGiZ57VoTj4vAQX fOMmOn4IQIO7cIV4OHgYPXEUHqmou1QZC6+ANanu5aWK6yPfC/8JvEf/psjuQg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637406143; a=rsa-sha256; cv=none; b=KhXF6cdaXveZHYR4+A7sanwK1SAJ38RWNeaZMUumkDK+w/ivST3aNQHOKABYyJaUDZFh5p ISFuCjzfVp5SawVPHKhPTryqWi9phVYxTpPI62jgMhkR0h1DcG6oSKczn1WTo/3uUOo0e8 +Hsn7B51XatJlkN3ciQcWIWnBLfm5WgQ1ewWLLfG57cmNycDcEAHDeO4GwM9M+RxMNGq8I DuufzGcrhq7D3Leyn3Zzv7I/aSg1koHJt/OqvIwdklnBsFYdOi7WMbIylp4StFdeSgmEgc U+lCwvYsy5WLXlFZL2oCxbxcVGLT+uKQuz9s/FfSAgXDTwILKdCZR8Bf801Luw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=it3Af1ZK; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.07 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=it3Af1ZK; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 1C74834FB6 X-Spam-Score: -3.07 X-Migadu-Scanner: scn0.migadu.com X-TUID: px+dWoc5Nq4V --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Tom, Tim, Thomas, and Greg, Thank you all for your thoughts. I=E2=80=99ll try to respond to all the mai= n points raised below. First off, in case it wasn=E2=80=99t clear in my earlier email when I said = =E2=80=9C#o555 works=E2=80=9D or the like I was being lazy and really meaning =E2=80=9C(identity #o555)= =E2=80=9D works. The parsing of =E2=80=9C555=E2=80=9D to the integer 555 is done by org-babel-parse-header-arguments, and so can=E2=80=99t really be changed. F= or a simple octal notation our best bet is adding non-digit characters so it is left as= a string, e.g. =E2=80=9Co555=E2=80=9D. =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 1 -> (org-babel-parse-header-arguments ":tangle-mode 555" light) =E2=94=82 1 <- org-babel-parse-header-arguments: ((:tangle-mode . 555)) =E2=94=82 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =E2=94=82 1 -> (org-babel-parse-header-arguments ":tangle-mode o555" light) =E2=94=82 1 <- org-babel-parse-header-arguments: ((:tangle-mode . "o555")) =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 So while I=E2=80=99d like it if we could easily apply Tom=E2=80=99s suggest= ion to =E2=80=9Cchange the radix for bare integers to 8 when reading that particular header=E2=80=9D, = I don=E2=80=99t think that=E2=80=99s very feasible, unfortunately. Giving errors when a base 10 value has been given by accident would be a ni= ce idea, but in practice isn=E2=80=99t easy as many base 10 values are valid o= ctal values, e.g. #o555 =3D 365. Likewise, I don=E2=80=99t think Tim=E2=80=99s suggestio= n of disallowing base 10 values is feasible. Regarding the concern that =E2=80=9Cwe are making a rod for our back by try= ing to make this overly clever=E2=80=9D and that the change makes it too complex =E2=80= =94 I disagree. Having had this discussion earlier we=E2=80=99ve ended up with, =E2=80=A2 a shorthand for octal =E2=80=A2 ls-style =E2=80=A2 chmod-style I think this small collection of distinct and simple input methods isn=E2= =80=99t overly clever or complex, and feel that it strikes the right balance between too m= any options and too little flexibility. Octal is great, for those that are familiar with it. Likewise, chmod-style = is quite natural for those who are used to chmod. There=E2=80=99s little added= complexity to the Org code base as we simply pass this to the Emacs function file-modes-symbolic-to-number. I think the ls-style is quite valuable for t= wo reasons. It=E2=80=99s well-established thanks to ls, and is particularly go= od for understanding permissions at a glance. For reading Org files I think this is advantageous compared to the other styles. I=E2=80=99m don=E2=80=99t find a= ssertions that this is non-typical or unpredictable well-founded. Each style/syntax is well-def= ined, simple, distinct, and taken from very common/wide spread usage. Tim suggested that invalid forms should cause tangling to fail, but I feel = this may be a bit much. Personally I=E2=80=99m inclined to either =E2=80=A2 warn, and don=E2=80=99t touch the file permissions (this is what = currently occurs) =E2=80=A2 use a very conservative file permission (e.g. rw=E2=80=94=E2=80= =94-). So, as I see it the main decision that needs to be made is how to handle the octal shorthand, now that it=E2=80=99s clear that the original plan is flaw= ed? I=E2=80=99m thinking either =E2=80=9Co555=E2=80=9D or =E2=80=9C#o555=E2=80=9D would be = a good improvement over =E2=80=9C(identity #o555), but am open to other suggestions. All the best, Timothy --=-=-=--