From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 eFJIBktwcmJEdAAAbAwnHQ (envelope-from ) for ; Wed, 04 May 2022 14:23:39 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id cMs7BktwcmIKWQEAauVa8A (envelope-from ) for ; Wed, 04 May 2022 14:23:39 +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 B98F21EAAE for ; Wed, 4 May 2022 14:23:38 +0200 (CEST) Received: from localhost ([::1]:59996 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nmE2b-00030v-Gv for larch@yhetil.org; Wed, 04 May 2022 08:23:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58378) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmDbS-0006VN-J2 for emacs-orgmode@gnu.org; Wed, 04 May 2022 07:55:34 -0400 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]:37488) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nmDbQ-0000Ie-Mo for emacs-orgmode@gnu.org; Wed, 04 May 2022 07:55:34 -0400 Received: by mail-pg1-x531.google.com with SMTP id 15so988609pgf.4 for ; Wed, 04 May 2022 04:55:32 -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=UaOPXu1wEHUZm3PxTxvyH/XCRLRin6/GNa0J7xV55Hc=; b=c/53DoCD0dU5hPBJcJJFhQ2f5tsx4BVGGBs7D25YdaWoTVPYe/tx4tSMLjHgfIfqvo wdRF8Fph0t4Ci2Bz8+1zfMuwhkETGCvR5w/SXys8zlP+A+IidijNkaV0beu5p6kCNnLy /1s6ZH7DPtaqCcaoD39faHgy2l1TyUFkMTo3352blh1sHM7EWchponFRgq9zFxNsrCB/ BKbMlgwCwhQhxfT7Q3Wox9rPi9Rf29Bcj2YdL/Lvd1i1GS8lrdlAop0XfS+qWgfFf8Ta qJsUm2BSXq5xZm/hGbuBt9Cm6m/C0liH4aiYRaO3fzh1HqwmqVIPKTnMSVMijLM3VYwA kmsA== 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=UaOPXu1wEHUZm3PxTxvyH/XCRLRin6/GNa0J7xV55Hc=; b=fLymysH4skMxHWfQElstkc8XSO5r7YQY/F2PP5f9/IwBiZBRjMqmMXcWilmgInDvIJ KLGqzQOedAc/XMci/dL0a8Q6KiW92JybdWHVoF3gQt4WNzyR0m8Gn074VrPBnMK/zPbD X5jOXczzDSSC5zx8m24SwJ1Nv/b4XkXiUS52bA1pUqmv0BUkDqw80+75U3fzXNv64iEL apNBHB3vQJL9xknEkuSX91GEcDOb02zB0hcqPOPq7/asNkMxgQ9/H0pWAThHqW21B9R9 hkcNa7Qj0L8/NQrHnETe1IKn1u1rDpyfp0HzlUFVPhTJEdfnurtAvG3u8vjXoWnttwol 6+LA== X-Gm-Message-State: AOAM531f558mogCg6NZBmuPB6qIhb180SAuOWEdhNrxex3h1CQMj21Ve zkqF00h2KzWDPWsgXV5dnks= X-Google-Smtp-Source: ABdhPJzn8ruazJrBKkmdh49jvOe2ioxpZV5JLMGFMcp/x1zfxWCq0/NBKRbrzToqHR43ued7eEJPYg== X-Received: by 2002:a63:4e59:0:b0:39d:69fe:eaa with SMTP id o25-20020a634e59000000b0039d69fe0eaamr17846039pgl.340.1651665331414; Wed, 04 May 2022 04:55:31 -0700 (PDT) Received: from localhost ([37.120.210.2]) by smtp.gmail.com with ESMTPSA id u21-20020a17090abb1500b001d95cdb62d4sm3115650pjr.33.2022.05.04.04.55.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 May 2022 04:55:30 -0700 (PDT) From: Ihor Radchenko To: Ignacio Casso Cc: Samuel Wales , Daniel Fleischer , Fabian , emacs-orgmode@gnu.org Subject: Re: [BUG] - Statistics cookie is part of the org heading title In-Reply-To: References: <87v8ulhnhh.fsf@localhost> Date: Wed, 04 May 2022 19:56:17 +0800 Message-ID: <87k0b1ik9q.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::531; envelope-from=yantar92@gmail.com; helo=mail-pg1-x531.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=1651667018; 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=UaOPXu1wEHUZm3PxTxvyH/XCRLRin6/GNa0J7xV55Hc=; b=PONE49N66/GpOhWQNJuPb1F/BrlhFpRncfxT+Nc72pH4/4W6m2aeSbIGYoMgrgzxDyKoH7 Tu4bwbV1RsHr98ApAF7uv/nSsqbWtR2yFcubhdHzu1CZYBZ6TSv7wgFHADgxLINl3QDsL0 mrUQhIYkuMasiLUrmZL3kKZI5dtCZHHBwVS+uL+PUBjSd97v1clfEnQfLUTUzpSzfFMGbs 4vfQjxgc9Y7M69xdxKIKQ1/oPVuUpzuWHUoj6KoV6ZBOn6lPLN5+krGwnFc9NBPhnjWJaO lCFgmFC8qc3en/Z4QI+4RsfbVjUNm2mr5PULNV0X5FC6kPu5oasFJu70igpyYw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651667018; a=rsa-sha256; cv=none; b=G47PxQEjDMkl9zmWF0syxXOL+QcEjOjqU0h+SihrYxQPS7CUR1Ji+vwl9l+kTweQu8SSrY eNDv9CmGbAvkdgwV7hUno+DjCu3ZHNBepYDjeMrSEcQkYcaZBZUakdyxnZdczsGy4WtPdU 8bNpHIQ6WWk7KFFqxF5zZTexjmHXz+Qctu3T2s8jEN+Pvp/wqNzFDUZfciNhQTVFP8QUOf H54vHnVoumJRMW0X9P/8u597dRA5qiU+iIAJXeFW0YIztENhlLYweZ159DF5XY6z1xUpt3 E1sK7HDQ1HhfdHT+GFO4RsKhGf2QgkqCJ/fStW/ZDqR2Nphyht6EXGumIfz0ug== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="c/53DoCD"; 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: -6.98 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="c/53DoCD"; 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: B98F21EAAE X-Spam-Score: -6.98 X-Migadu-Scanner: scn0.migadu.com X-TUID: h3UPgkekPjMC Ignacio Casso writes: > I replied to this bug report yesterday via the "reply via email to" > button in > https://lists.gnu.org/archive/html/emacs-orgmode/2022-05/msg00058.html, > assuming it would send it to the org-mode list, but now I see that it > was only sent to Fabian. It is not directly related to Org, though indeed annoying. I reported this unexpected behaviour to mailman@gnu.org > Still, I think it might be interesting to compare this topic with the > one I linked in my reply, > https://lists.gnu.org/archive/html/emacs-orgmode/2022-03/msg00293.html, > which it's basically the same bug report but about COMMENT keywords. In > that regard, I have tested that org-capture targets do work regardless > of statistcs cookies. Could not something equivalent be done so that > they also work regardless of COMMENT keywords? Feel free to reply in > that other thread if you feel this is off-topic here. > This bug is related with the issue I reported in > https://lists.gnu.org/archive/html/emacs-orgmode/2022-03/msg00293.html. The > problem is that `org-heading-components' uses > `org-complex-heading-regexp', which does not consider statistics > cookies, and neither COMMENT keywords as I reported. I think it should be > updated to consider both. Note that org-complex-heading-regexp-format does consider statistics cookies, but only at the beginning/end of the headline title. Unfortunately, it is impossible to provide generic printf format to match a headline title with arbitrary statistics cookies inserted in the middle of it. As for your other report, it is a hard one - org-complex-heading-regexp is hard to modify because we guarantee certain match groups and its hard to fit COMMENT in there without breaking backward-compatibility. I generally dislike the idea of the available plethora of analytic regexps with numbered match groups. I am currently working on generalised Org element matcher that provides named groups for arbitrary Org syntax elements, including headlines. Best, Ihor