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 ms5.migadu.com with LMTPS id oE67KESad2JRygAAbAwnHQ (envelope-from ) for ; Sun, 08 May 2022 12:24:04 +0200 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 AAq1J0Sad2KNgwEAG6o9tA (envelope-from ) for ; Sun, 08 May 2022 12:24:04 +0200 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 355DF21EA6 for ; Sun, 8 May 2022 12:24:04 +0200 (CEST) Received: from localhost ([::1]:37154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nne55-0002Nj-1a for larch@yhetil.org; Sun, 08 May 2022 06:24:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42322) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nne3u-0002NI-3V for emacs-orgmode@gnu.org; Sun, 08 May 2022 06:22:50 -0400 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]:37610) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nne3q-0006nO-GP for emacs-orgmode@gnu.org; Sun, 08 May 2022 06:22:47 -0400 Received: by mail-pg1-x536.google.com with SMTP id 15so9729613pgf.4 for ; Sun, 08 May 2022 03:22:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=gLQw49XsExxvv/UYRdIjNnUphQkrzjtso5bE8X8sn5c=; b=KxqCrS+XzS6Xu2B/Ww/hZNDeahSPQB8SBJlGBrXHu3FTRY8t3jFcEKPUf7UkKrA33g LxtcrdQj9k7LwRYDAlJVYxk1tfROFCGllQOQceMp/dRKSulXLc0MatnQg75ifOXMp6gL MThvrD8ytrJcNJvZhdqW0CeVn5wM2h2qmehwkmGnW4wm1lrMORMJFQyzsnhMLg+fRli6 8+5Z0y064toq4vYuVarRzWW3QCzisMtv0237al5rqersW9X1iHFyZD+Lpg7pbOz3Qo28 UJgqkeTfiewLIZ24i6qcTfQak50fddcoThBXIjE2XiaNwSE1eeHlPsHNklz20rJvFp+x PDVw== 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:in-reply-to:references:date :message-id:mime-version; bh=gLQw49XsExxvv/UYRdIjNnUphQkrzjtso5bE8X8sn5c=; b=tQENqxyXXvUR2LWZoI/7bGo1CJLCK+RTjODgWdILmppUWLQQsj7I41OensMX61k0Gf v37cWLHxWRZFVzHjhxq8JUOOrnKV8MzwuS8am+Ai4aDVSXkgBJi+US5eNxnoNTha2tjF JB9pmRzbhPbrzCyv/zTE7Y5fRpcErm7bT6YvzyaKWi5g0lTBpCEE8s9ByANadi/eBRbQ YQNAOsAovpNCrkwlJSCpN7WKGIoNXbcuKxIZGHTpZG6wE18/MOlBKYMxxklmnbIOi1Gj eFnc/0klEQdodL0W5qzF9NCCq5wT5clRciLl7F3WylIriC7axoAH4sPA0MPzKNseoP+N x+hQ== X-Gm-Message-State: AOAM530Dv0RjtrCOPMqtHWl7XFRg0mmG9S87YWbsc3X92NEEx+OnOR/E PWI6Frr6YsLIfiRu7aC7HEM= X-Google-Smtp-Source: ABdhPJzX31wTEGDlpABwXoJbZQg5iTZJ8h8brjoLMonXx++AoNCQ78y0zyVRZUkRoTvVTgAmhc3DyA== X-Received: by 2002:a65:52cb:0:b0:3c6:82f4:a01 with SMTP id z11-20020a6552cb000000b003c682f40a01mr4401005pgp.282.1652005364789; Sun, 08 May 2022 03:22:44 -0700 (PDT) Received: from localhost ([66.154.104.4]) by smtp.gmail.com with ESMTPSA id r9-20020a056a00216900b0050dc7628195sm6412407pff.111.2022.05.08.03.22.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 03:22:44 -0700 (PDT) From: Ihor Radchenko To: Ignacio Casso Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] org-complex-heading-regexp should consider COMMENT keywords [9.5.2 (release_9.5.2-25-gaf6f12 @ /home/ignacio/repos/emacs/lisp/org/)] In-Reply-To: References: <87fsln6iho.fsf@localhost> <87v8uhyksw.fsf@localhost> Date: Sun, 08 May 2022 18:23:25 +0800 Message-ID: <87y1zcqq5e.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::536; envelope-from=yantar92@gmail.com; helo=mail-pg1-x536.google.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1652005444; 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=gLQw49XsExxvv/UYRdIjNnUphQkrzjtso5bE8X8sn5c=; b=eEGWgtQ3qZmzHAuHsyb8MzMu0CrKa4rpTMT26EOdHN+D09rG8oY2zDzyoZtKRO0rZFtEql 0Ep/QxpmrsATLrshKBiQ2gCs7icEElQols0h7tZZOlGTtSj6Br0ZdeNzixVNWlnLFktRbG w+1JFhkES8Wu1Yg0W/2QmJjfGX4Nb3LDZtMkYGxG9FnxW6ZKDfStov92T9oOHdWQm1xlk+ 0Mg/5UbORF6tgr5rhvE0iSnGt5KFt8F0o7KdkFC9Kn8q+BmAJYWOFPTQsF4BhmrAp+OONX ERghUTB6essbP4hjW9rq//sbPA6MowsGH98XNhEedyH1zAKm1mz5eths1fUgOA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652005444; a=rsa-sha256; cv=none; b=PI+6Si4v6HbZD4n6mnFec4r5C0T+3scdt777hSwSteStQJ7eIMzH2BInX6MFc8PR4ScVGQ I1mZ7AlP21TDN8Ynaj4iAM4zvxV0rocj1EJ3tywuzMvI0gUTRVBu7Zli/i29JevcOpBDf+ 7lY5BRg+fe7hkZ7Rj5y/aD87TyY80i5HXjTRYhBNIe306GQx7b7K9pSU0pIw0r9ykfwMSN V3aMh7LWTacAtzejta3gd8EhJiO0oox/6LEPsplGd6ibMUKHSnMDFAtsXHSGXFb3OGV36G T43XbRxhSkTmd3I3wdC9DK2YrfA1PpyCkQDytW5Maip0rRyYMX9bKDUKqd4q+w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=KxqCrS+X; 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: -8.80 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=KxqCrS+X; 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: 355DF21EA6 X-Spam-Score: -8.80 X-Migadu-Scanner: scn0.migadu.com X-TUID: u0+rtOi1DwsU Ignacio Casso writes: > Done. I attach the patch: Thanks! Applied onto main as a3d9999d2 with minor amendments. I have added TINYCHANGE cookie as you don't appear to have FSF copyright assignment and capitalised "match" in the commit summary. Best, Ihor > From 646f2a792dc5c6e6fa3933eb1d06420c86cd53c3 Mon Sep 17 00:00:00 2001 > From: Ignacio > Date: Fri, 6 May 2022 13:51:14 +0200 > Subject: [PATCH] lisp/org.el: match COMMENT in > `org-complex-heading-regexp-format' > > * lisp/org.el (org-set-regexps-and-options): Change > `org-complex-heading-regexp-format' initialization so that the regexp > it produces also matches a headline if it is commented. > --- > lisp/org.el | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/lisp/org.el b/lisp/org.el > index 1d5fc3903..cab59b87c 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -3846,7 +3846,8 @@ expected to be bound to nil when matching against this regexp.") > "Printf format to make regexp to match an exact headline. > This regexp will match the headline of any node which has the > exact headline text that is put into the format, but may have any > -TODO state, priority and tags.") > +TODO state, priority, tags, statistics cookies (at the beginning > +or end of the headline title), or COMMENT keyword.") > > (defvar-local org-todo-line-tags-regexp nil > "Matches a headline and puts TODO state into group 2 if present. > @@ -4213,6 +4214,8 @@ related expressions." > "\\(?: +" org-todo-regexp "\\)?" > "\\(?: +\\(\\[#.\\]\\)\\)?" > "\\(?: +" > + ;; Headline might be commented > + "\\(?:" org-comment-string " +\\)?" > ;; Stats cookies can be stuck to body. > "\\(?:\\[[0-9%%/]+\\] *\\)*" > "\\(%s\\)" > -- > 2.25.1 > -- Ihor Radchenko, PhD, Center for Advancing Materials Performance from the Nanoscale (CAMP-nano) State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong University, Xi'an, China Email: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg