From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id +PuFJjrGOWKD8gAAgWs5BA (envelope-from ) for ; Tue, 22 Mar 2022 13:51:06 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id EOiIHzrGOWLBdwAAG6o9tA (envelope-from ) for ; Tue, 22 Mar 2022 13:51:06 +0100 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 EB8459DAC for ; Tue, 22 Mar 2022 13:51:05 +0100 (CET) Received: from localhost ([::1]:52330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nWdyV-0008Tp-KV for larch@yhetil.org; Tue, 22 Mar 2022 08:50:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43430) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWdog-0006Gq-Ur for emacs-orgmode@gnu.org; Tue, 22 Mar 2022 08:40:51 -0400 Received: from mail-oln040092073067.outbound.protection.outlook.com ([40.92.73.67]:36287 helo=EUR04-HE1-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 1nWdod-00056L-W1 for emacs-orgmode@gnu.org; Tue, 22 Mar 2022 08:40:49 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c8AqG13RuE+kc+tbuFPVfxqYhH5LcPYNptuTHMWgqGyl5ba/k7/hVGyDifpHD0LBRZqTZmDAP3sszUu0XOfaqSp6YzsapdalI7eeQ13fVk+yf7rYZT5EQh/IZ1D+Eyjq2rm0sPbiTppipst2kzcXw6i0dNrvtSHZ3jnzhDm3pcTjnymltLbWYkwcZvpPVDaE7dmm3NygBAaOFO+3Pk3VhytICrQGCyyHChXvsijsIdPGVu1zz8szA+EVFbDKHHUALsALFpREBztEyTqTFAHKSZKf1VU6FfwBVKAUCd3ydaMNtWcA7dh+Jn3q67YzWEtEV7TaSWhqrz3J68C6yZq/cg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+ADVXzbBwQew4pp3CqTKQBIP/RPKoy/fPXhrFdNpvL0=; b=DvF4zc7Vb0HfuEMSNGIEudHmckv4lmADcaKgFV0DkyTomI5Wkh6f4Im0DgWqGad6IASHlC0wFIVGNZ9bv1JVs/gQ08Tx67g37NxLgsrTj/fJEnSkYiIIE5JsRGAsx/i8J+M97igwlv1N8f3VruddMqAJkKBp11bVM5cEFBBRODgeFYKnldtzJtmaynzXn5o2u8Tq0rEimbJspjL/Mn8udUDyYyaikD3ptNc7XOEJg+GtAhk4zb7fygak4w1BSQqT0scSA5tddY0QyaHLG8tC/xj8tLxANGfAUD8Y7EuDCksy1r+E365Vo2gC3+1hd7v7EW8inQZaOs16Q/z+mQD97w== 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=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+ADVXzbBwQew4pp3CqTKQBIP/RPKoy/fPXhrFdNpvL0=; b=e7vgX+HuUAQS/zyqUZ2mtk9lrbF+cvrChTljzWeN+2RLR7NQKPdvKEqL2ebtwT8uVBb4eDiVRvzqtZKmDy6JEEfckcc8fqYF3FIqX/V7GytlJe+7anr+kupOM2LqS5/R/7svMQtAlOKhQyH6tJLOjw+W0HF+lF8AydxKTUgSv8zfwrlMdMwBRIvAsxDCPMv+ZMeKnCjcGuNFiLueMQ7smMBNI3FvMNmWaEMZuYOG39yeNAuUgv57zcLqAWciNibOyXszdWClkuZzD+yEHqTydHxY+68wt/URf3oIpLOmJ3KXyrFEXNqxJkuyv0SpX3BfhZjuEjZ5CLFMhDw1p7sgJg== Received: from PAXPR06MB7760.eurprd06.prod.outlook.com (2603:10a6:102:155::8) by AM6PR06MB5847.eurprd06.prod.outlook.com (2603:10a6:20b:90::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5081.22; Tue, 22 Mar 2022 12:40:44 +0000 Received: from PAXPR06MB7760.eurprd06.prod.outlook.com ([fe80::e05a:8d81:8648:b10f]) by PAXPR06MB7760.eurprd06.prod.outlook.com ([fe80::e05a:8d81:8648:b10f%9]) with mapi id 15.20.5081.023; Tue, 22 Mar 2022 12:40:44 +0000 User-agent: mu4e 1.6.10; emacs 29.0.50 From: Ignacio Casso To: emacs-orgmode@gnu.org Subject: [BUG] org-complex-heading-regexp should consider COMMENT keywords [9.5.2 (release_9.5.2-25-gaf6f12 @ /home/ignacio/repos/emacs/lisp/org/)] Date: Tue, 22 Mar 2022 12:41:56 +0100 Message-ID: Content-Type: text/plain X-TMN: [fWw3t4BmUGbSIgYLBWG1swqPzYperP1i] X-ClientProxiedBy: MR2P264CA0075.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:32::15) To PAXPR06MB7760.eurprd06.prod.outlook.com (2603:10a6:102:155::8) X-Microsoft-Original-Message-ID: <87y212tb20.fsf@hotmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7c72798f-4651-4bf4-041c-08da0c012e7e X-MS-TrafficTypeDiagnostic: AM6PR06MB5847:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZPIhSuRQzuqhe/8ZQ+nu/d2DYomooICWhGEC0++QzzaUCP62qTWybBXrMZVoMlBgwDkPj72oWI+cw+xXZ9KWlJJeB+pIfs7WAs34PoIy9AQipZcNbP2+ouIvIqEti8rcl0MtPpCOLFj2yiZ76jtiq1TagxuqY3+DGFVSTTUqE0Xde6oyURPWUjGMBGhs/GAf5gVVgl3UDIf24Vafgyf7nJfaGz+D1r+exqEfesA4QrU9/Wykdm/f4p1NLmJbFYRUJHHWzWPoetAhiTfgFL1DA4CNAlccY0dKTFJWZR9IaTNFg5nAKR9AqYwBSZsZ6hDcNeBmmW34GVFobDcZdjp/ufc/REIXvMimeJZEonTLtq+VM8glHdP5OWSlGZ9IG+dVaVUrjzclbphT3oHk5jVutU/YPdy+Jko7ZgkymZdDAu9ohcBeFLSmypbZ0xzH8Yqx0CCXEGCtnyJ2rEBMFzE0HwCn8Fd5BIv/e3ma0cza0C5MZu7R39E88C2K1f1dYrhA77eAYzKU/TcwMEavNwcqF1qwhxemZXafpievKuMvlOB9RdzqXMAZEzeQfP2+TYtubI8cnwHqZRAp2LjkXb2+bA== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Vtdf6BdTIDwRqsskuwpWYESjRkd7iMM54R1qUJN7XbANQGYxKIDzUlH1yney?= =?us-ascii?Q?MavCVPB2d2xvDFla8TQIP9ZCdgAXQBy+WsytAgHFiP5MU+FPjeLTY0DaSXTW?= =?us-ascii?Q?vGVQgYO2EUSRMm98eeZTsBx713PIzZtSSZuUXkIyy5p/dBR0Nuh2QpwJVWnS?= =?us-ascii?Q?H61E9sP9j+t7pCV/NAGfPnwxqouZ1gxWprF63rkbf0KYQgeSrKL9Z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quCVbZghsGx7GeHZt84OgKRwFML4hzvri5p1+1xNW?= =?us-ascii?Q?7BffjEe2WwP+Z/R89hPUAord+znlPAX1sA=3D=3D?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-6e454.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 7c72798f-4651-4bf4-041c-08da0c012e7e X-MS-Exchange-CrossTenant-AuthSource: PAXPR06MB7760.eurprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Mar 2022 12:40:44.6950 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR06MB5847 Received-SPF: pass client-ip=40.92.73.67; envelope-from=ignaciocasso@hotmail.com; helo=EUR04-HE1-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1647953466; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=+ADVXzbBwQew4pp3CqTKQBIP/RPKoy/fPXhrFdNpvL0=; b=hCIRbCuA9gXTiJHQKvmveZG7Ck0s8YknZ+jnw/08VegpYFYUkS68bl+d9cd71I53KaOX88 QiDhIyilM7cDYdhm6bRVfAd1MPaPVmhlDg72d4Tiv0qLvmnppiQC6XCDcPK8CHPZtvF2xM vxsLQq+Xm5T2dfmpioOAKO//zawQ/rH/1iRBPGOIkMAXzVNuonztdF9Ql/hmscEBzuTmWm G7scfOh5s8DGvzORlRnuP4+frua4oTG53EbEcdvBT5r17CN594TvL8w1FoOHVx8XiQzY+V /8FsPyabc4IDqTv6hl/x9xL1ZlYHg+EHlCKRPGvbUUQn9wn/tn3E2C6KJGt8pg== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1647953466; a=rsa-sha256; cv=pass; b=gI08PiUkD1IGEcDbDE9RuejEoGv85VdHB/qtqbClHtJPX2QlZGYVxbVQJXKqLAHSintDwr 3ctyOUUr4ZhTUJJuHJT5ophkJ5817imIZVpTdGQ1OifLPSZoC+Lu22QtMoh3kf5GY/DuES sDYrDCnJ6GhjDFHMIDNqvHCcLVoowtcOOtEonPy/ssPeT4Iy1cy1I88wHPddVyUnGgWlut +2Dd/4dccJgFJ25ssnsQy2MRCFq8fLoRMNXNuclvoGyXtsVZarRqvUteMdf/yGAfjYm3qb 6ovZAVwvYcksDavxJkgfHl7PBO9DAGboWiLmaE1yqJQlGSHLpS3Y9CWEfVg+uw== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=hotmail.com header.s=selector1 header.b=e7vgX+Hu; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=hotmail.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: -10.11 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=hotmail.com header.s=selector1 header.b=e7vgX+Hu; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=hotmail.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: EB8459DAC X-Spam-Score: -10.11 X-Migadu-Scanner: scn0.migadu.com X-TUID: 6P9K9d2eyCG3 Hello, I think `org-complex-heading-regexp' and `org-complex-heading-regexp-format' should consider COMMENT keywords, as they do with TODO keywords, priorities, and tags. Firstly, with things as they are, different methods for accessing the headline text are inconsistent. For example, for the headline below, (org-entry-get (point) "ITEM"), which uses `org-complex-heading-regexp', returns "COMMENT My headline", while (org-element-property :title (org-element-context)), which doesn't, returns "My headline". *** TODO [#A] COMMENT My headline :my_tag: But more importantly for me, this is a problem in particular with org-capture, where I would like capture targets to be found regardless of whether they are commented or not. But right now commented headlines are only found if the COMMENT keyword also appears in the capture template, and in that case if the headlines are later uncommented they are no longer found. You can copy the entry below into an org file and play around with it to reproduce this described behavior. * COMMENT My Target #+begin_src emacs-lisp (let ((org-capture-templates `(("d" "My capture template" entry (file+headline ,buffer-file-name "My target") "* My content" :immediate-finish t)))) (org-capture nil "d")) #+end_src The cause of this is the use of `org-complex-heading-regexp-format' in `org-capture-set-target-location'. This is the bug I originally wanted to report, but after exploring the cause I thought that the problem was really in `org-complex-heading-regexp' and not org-capture's code. What do you think? Do you know of any other uses of those variables and how considering COMMENT keywords or not affects them? If you agree I can send a patch that changes the default value of those regexp variables. Otherwise, I can send a patch that just modifies the code of `org-capture-set-target-location' to fix this only for the org-capture use case. Regards, Ignacio Emacs : GNU Emacs 29.0.50 (build 13, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2022-03-21 Package: Org mode version 9.5.2 (release_9.5.2-25-gaf6f12 @ /home/ignacio/repos/emacs/lisp/org/)