From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CO8RHzLhsWDeAgAAgWs5BA (envelope-from ) for ; Sat, 29 May 2021 08:37:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id UFyEGjLhsWAlfAAAB5/wlQ (envelope-from ) for ; Sat, 29 May 2021 06:37:38 +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 235FB16A10 for ; Sat, 29 May 2021 08:37:37 +0200 (CEST) Received: from localhost ([::1]:45744 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmsbH-0002jg-Vx for larch@yhetil.org; Sat, 29 May 2021 02:37:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41288) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmsa9-0002iM-LT for emacs-orgmode@gnu.org; Sat, 29 May 2021 02:36:25 -0400 Received: from mail-mw2nam08olkn2059.outbound.protection.outlook.com ([40.92.46.59]:33440 helo=NAM04-MW2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmsa6-0001YJ-4W for emacs-orgmode@gnu.org; Sat, 29 May 2021 02:36:24 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JmZb9mMt9wJi0P0yQaxe4ux9BdD68SBIrvZI5edgWVnA5AdHxUScYR5XuVz4k7+jj9YiXw/ABFN99RldWjM9hfNqZDVAyP734OKwygfq0UnXfWYzQktqvQBuLUMyq2LL4hMmT/owYRdTFuDdy5+qbfwS26IC585rs+xcZ0yrgEBw6FfXcKeDkgSWN0M4dv3AG+8g17kpdWJxERCf+YXvmOkjTkrLESWoC3KGcj5eg0XN8t7vyRj3iBJwylCTRwAx7ExvSwomq0Uws4HV2l1PWM2jLJY4eU/80Erllc7tD/g5jUteIEqv9Rrk34RYk5RAtsdR1K8xwBuUfPNejW+Ujw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6GhFK4oKK85nTSpDtlECtFbRJuPjRXUy99DSCoEmdz8=; b=ezH3lW12LMyLrazvgnZC2o84I0Wu2uJflJnrV2XVraAFAObb+NQALSmFCSq+f/81qOJa290k+BanEtRQFmWbAvihEyIMVzoz98a66D7H+fziZ+vkLohEcLdKmyoL7Jm8VusIjKnEMpE28xxCbYko5YWDip1Jrnng5wgO03kFqdk7wbDXPmM1ubbloVtAWS0oozB8Ug24gGHHpTsBQbvP5yamZHJcFC2C8oFYK9iRRm1vgMYqDXCGu1yMEWxCrGmOrzIXlFpeJBN7aLJ9jZwheEBOKoAeX2hyhpoXFkM2nEknjf7MtUN/li4nNxdg1Ivb/UNX4ZdVIk1K02rrUCZVmg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6GhFK4oKK85nTSpDtlECtFbRJuPjRXUy99DSCoEmdz8=; b=iaFWMxzBCpsM7kE0KZWpBVCB070HY8+io3hoAk9PMNsnp+9dIbAFWvrGRzb8l1rMUW21hsQUf87k/wPk3T9p8Banc7rTKmHxKc2Uv912Qe0UJN0FExKMts7glpUjUZniR88RXCrRFc2V6DIncIoOc7lmtgLYAMADkqbezW7NXIPUa/Wy5vZ1goplwQLGFlS9YBUpYXFU5HB/fkZ2ALZJjOEEh618xA8HuElogvIVxfi6aZ1Q5MP39OEnMz+zF+k2Hn5YuVkqzt8tnA+xzuncHF94e74ORoa2ARA8LACNhN00YyjJWpi9fxE1UzzbconRRumYsp3ekmTyrZNc0dY6Ug== Received: from DM6NAM04FT035.eop-NAM04.prod.protection.outlook.com (2a01:111:e400:7ea3::52) by DM6NAM04HT082.eop-NAM04.prod.protection.outlook.com (2a01:111:e400:7ea3::123) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.27; Sat, 29 May 2021 06:21:17 +0000 Received: from SJ0PR03MB5455.namprd03.prod.outlook.com (2a01:111:e400:7ea3::4f) by DM6NAM04FT035.mail.protection.outlook.com (2a01:111:e400:7ea3::373) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.30 via Frontend Transport; Sat, 29 May 2021 06:21:17 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:4554E642CC247E9221B71C143EE26256BF95F8835D9DEBFDB5712CF9516B84A7; UpperCasedChecksum:106B8EA682C76719C8FA754F394F1BCE996ECD8FD9B3ACAFB400E8EEDA69630A; SizeAsReceived:8070; Count:46 Received: from SJ0PR03MB5455.namprd03.prod.outlook.com ([fe80::2c9a:cb2d:320b:ed62]) by SJ0PR03MB5455.namprd03.prod.outlook.com ([fe80::2c9a:cb2d:320b:ed62%8]) with mapi id 15.20.4173.027; Sat, 29 May 2021 06:21:16 +0000 From: David Masterson To: Tom Gillespie Subject: Re: Empty headline titles unsupported: Bug? References: <87tumvdno3.fsf@gmail.com> <87eedw5s0c.fsf@gmail.com> <87o8czksaq.fsf@gmail.com> <87lf83kphd.fsf@gmail.com> <87tumqaj6h.fsf@nicolasgoaziou.fr> <87lf81y4e9.fsf@localhost> <87bl8wyhun.fsf@localhost> Date: Fri, 28 May 2021 23:21:14 -0700 In-Reply-To: (Tom Gillespie's message of "Thu, 27 May 2021 22:36:47 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Content-Type: text/plain X-TMN: [tYPWDoSsaYyUbyyUx8STFuFBzalMCdJWfZEak2ViUYQTGRqBtHoDMd68JR1URF2f] X-ClientProxiedBy: BYAPR11CA0094.namprd11.prod.outlook.com (2603:10b6:a03:f4::35) To SJ0PR03MB5455.namprd03.prod.outlook.com (2603:10b6:a03:27b::11) X-Microsoft-Original-Message-ID: <87im32ys9x.fsf@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from penguin (2600:8802:506:1f00:216:3eff:fee7:3d5d) by BYAPR11CA0094.namprd11.prod.outlook.com (2603:10b6:a03:f4::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.20 via Frontend Transport; Sat, 29 May 2021 06:21:16 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 35931328-68a7-484c-77c1-08d92269f74d X-MS-TrafficTypeDiagnostic: DM6NAM04HT082: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qGg1bEOqSnkmx8ovx275N7XtNPXubHTaOT+Wo7dhHvRldq16Apx8oyxfHdUqmjHb9sOoYop0vmFVf3hzTeT9oFyuVBAQnqiPUTatZpQLd4wrDypOoo+MDC6rjydP1obobKeyeSVXqz5Pwg6j49dk9+tSEcQhlVVkBBcWcOkWNQQ4q5YIkq5e4XQNLZSZDvfF+RvNNIGYyfX00YbP4dtO1N7MsXaZLMubO59a1ogdpZEzdeUNLmCpNMVfAkNpqEWSmjmqky9mQKm65tZHeWd3ytT0S5tEhOEFAujxKai1jZx6EvRPN3VxpBUr3poHUiRsXPBlFYLoTnjvlGOD6MzNuotWMchmS8/PFmYaUfSR21tM/UVgAPIY7lvNpUP5jQjE9fnoztmVj3fUXk1TYzvXnoCMo3FEgmfjD9CPfxNThc+e1uivCg3p3phWA8EX5UAgsuVoStJmMTnI74jDiTex48UO5Zdo7gAj2F/fCRuXjM8= X-MS-Exchange-AntiSpam-MessageData: Xh4NJQ3ATe1ZjzVcGpB7BfKJ3nXX+CHqRkAE37rI5TmHHKr3DRKcJlBY+JcoVfaH+38I2pROO+uvWgUiqqNzTrKo80epNhWQu0/OjD+ixys9o2/k1GCVba5ugraBEzeC5eK0x4KTVMc1csgDDBHir8MWYAqMDw8V3KwViJaILHUONhopZHOl/Eio4BaRV/xyWrT+CZFRHw3YdWK7/jWNVQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 35931328-68a7-484c-77c1-08d92269f74d X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2021 06:21:16.8014 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: DM6NAM04FT035.eop-NAM04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6NAM04HT082 Received-SPF: pass client-ip=40.92.46.59; envelope-from=dsmasterson92630@outlook.com; helo=NAM04-MW2-obe.outbound.protection.outlook.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1622270258; 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=6GhFK4oKK85nTSpDtlECtFbRJuPjRXUy99DSCoEmdz8=; b=HVx4fa5mqVzuib8XMGs1DyCAYbQ+GAfbXW/HNwcR1XTe3pgg3wwJ7Lb+fEYTqRgQPvAAlU DFiOm+i4YIyPLb87iCMnmWwaLKXN2A1n0cGsxFeDv3fBiV7slvbuSN3kLbs2LudhrOfibE oY4USe18igWhSqtbD/RVYMKEyrH+g6tY4sn2pUpoREZIWf1/mQj6f4gRW0GLHjL0/U0Knk MVbz8fgvqang0BcY2A/tlj5/RLT55vzcxe9SKe5AF7QokQsTiBjdLOcA0dPJZs6P0JLakw Vbfks1fdVsw6lqs1DEkPiTxOty/QGmgrxPkGOFt8158QHyEZL+5b76hktZ0VaA== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1622270258; a=rsa-sha256; cv=pass; b=gB7nbZYy6hkURuvLa51vCmC/Mtzvzg6R1oz5jcBnz51kyNmXlCQ7ZH/LmmbC/RThAMJ/0O jtIdQ8ya5gIF0Lx1VIgXtgAB6Og8LtTjVETmZfv6/wVcTeUK6kZMMXI+skfE0kGtUWVcMt WNAl+ZW6mxHrsoj8A85cZuCQko5za5nlLm1lsOV7szagu4B44EVotohbgYaArTyEOB3hs0 w8/sXgtc4WLl90zHpdPcVSxftweingT8L47pmPWVNQVqttWHkpo002WlLvobWGCWqFCFNp bC+XxjqbEEz+rpuADD0+wcuu3GAAQgderlcd3T0ls4tKrBBnMw29Ews89H4RBA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=outlook.com header.s=selector1 header.b=iaFWMxzB; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=outlook.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.63 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=outlook.com header.s=selector1 header.b=iaFWMxzB; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=outlook.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 235FB16A10 X-Spam-Score: -1.63 X-Migadu-Scanner: scn0.migadu.com X-TUID: zpuN1+6HrG1s Tom Gillespie writes: > Hi all, > Here is the 4th (or so) iteration of the grammar for titles that > I think deals with most of the issues in this thread along with a > bunch of nasty test cases. The previous attempts can be inspected in > the git history, but long story short, it is extremely hard to find a > grammar that follows the principle of least surprise and you have to > use the tokenizer to ensure that the tags pattern always parses as > such so that tags don't magically switch to being the title when you > remove the rest of the contents of the title. The final example > L1648-L1665 shows many of the things that should parse as tags and do > with this tokenizer/grammar combination. The key to dealing with the > ambiguity of empty title and tags vs something that looks like tags > but parses as a title (which is surprising) is to use the tokenizer to > greedily recognize tags at the end of the line. This ensures that the > tags pattern at the end of the line always parses as tags and doesn't > switch just because the title is empty. Happy to elaborate. Best, > Tom > > https://github.com/tgbugs/laundry/blob/next/laundry/heading.rkt > https://github.com/tgbugs/laundry/blob/971cf35683cd60156868c12b070c2dd9e19d8d06/laundry/tokenizer.rkt#L98-L140 > > https://github.com/tgbugs/laundry/blob/971cf35683cd60156868c12b070c2dd9e19d8d06/laundry/test.rkt#L326-L367 > https://github.com/tgbugs/laundry/blob/971cf35683cd60156868c12b070c2dd9e19d8d06/laundry/test.rkt#L400-L558 > https://github.com/tgbugs/laundry/blob/971cf35683cd60156868c12b070c2dd9e19d8d06/laundry/test.rkt#L1298-L1369 > https://github.com/tgbugs/laundry/blob/971cf35683cd60156868c12b070c2dd9e19d8d06/laundry/test.rkt#L1371-L1419 > https://github.com/tgbugs/laundry/blob/971cf35683cd60156868c12b070c2dd9e19d8d06/laundry/test.rkt#L1648-L1665 This looks interesting, but I'm not yet familiar with racket & brag -= I assume laundry doesn't produce any output from the input Org file other than some form of "good" or "bad" signal. True? -- David Masterson