From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id k+UgEL3EJmGeDAEAgWs5BA (envelope-from ) for ; Thu, 26 Aug 2021 00:31:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 2OZiC73EJmGTagAA1q6Kng (envelope-from ) for ; Wed, 25 Aug 2021 22:31:25 +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 768AEB181 for ; Thu, 26 Aug 2021 00:31:24 +0200 (CEST) Received: from localhost ([::1]:36106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mJ1QZ-0000Ee-8w for larch@yhetil.org; Wed, 25 Aug 2021 18:31:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46334) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJ1Py-0000EO-4Y for emacs-orgmode@gnu.org; Wed, 25 Aug 2021 18:30:46 -0400 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]:34454) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mJ1Pw-0004JB-KZ for emacs-orgmode@gnu.org; Wed, 25 Aug 2021 18:30:45 -0400 Received: by mail-lf1-x134.google.com with SMTP id z2so2211598lft.1 for ; Wed, 25 Aug 2021 15:30:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XZiq3EpjADpww1YglEcrS8JnrHXRlEPBHZZYkDJoEng=; b=LAlZCbXExCoauuYhzrZ5aNoLHcS3TTeJmAThAb2UjkwP+nVTvoQdaG+WrAf6BSPuKD 0iasl5DEpeB4DZTdi+debtiknwfRmAdkGBzMEOzBiazeh+zx+sDg+xTbMVZ2De/Udopq HUz73vTo6Dy+DAxgt2PMdSpIqHp2rpVOXYmqS28tPqVCkDO9lRfp3nO91VCzGoMENfY9 JlNb6CMkNSFR/KTfoF1hQSFmNIMmrGw7LCxHfXZ6pWKp2y9TqVf+R6JMaUOMpQZWKT3i Ni+jDFlUjH1MEegkeWbdKeDrNdXdu0PqlKYnOxVD5rpPP5E8WuCoogyDojYZfJuGKoCE c62A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XZiq3EpjADpww1YglEcrS8JnrHXRlEPBHZZYkDJoEng=; b=or2jf8DdUQSRDt9/n8U+1nmqrx43C3gQkzLZVbKeT1893CzZXUTSZ6xgvgsRBzVeh2 kO6uZQCqyNaGT3UAkFRgXIlIpGmTOolbIw6BcDT+WRTwegV0d0boQpZQK1ztr/RFR7zF jDCujSg9KhwscICekz5GhUyrKov4H1fpm1Qh4Wb8vucHP3UDeYLFehOrvfAzVNZhhJUx /uCuYDBL5PGw8ooZsnzEC+Mzfgs7PrHnZhVyrRCe4aofGGXCkrNOaJQQmq9oPLUi76K7 qw0E6kVcuMyxgkjPL+pYlu4a3hVDcN2IXx6xz8Ke9jvV6xrm7LS6zBFg2j0oiXvuizRt KYWQ== X-Gm-Message-State: AOAM533ooCGdX4g/jsGBIfZZrrt44PSjcquyCr8EJhVxQtmb8B2oJs51 f0KKZRcXDWrS8rZq7XpMPdmfp92KHCQxSXc/E7s= X-Google-Smtp-Source: ABdhPJw3HyNmqBUg8Y9CIxxKbaxDqxDHXca9e5YY5tmXdNAJqHJoXw3Ni20z4zU1CD0F/9N99RiRbJ0niXgDTGH0CAM= X-Received: by 2002:a19:504c:: with SMTP id z12mr285981lfj.554.1629930642040; Wed, 25 Aug 2021 15:30:42 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Cassio Koshikumo Date: Wed, 25 Aug 2021 19:30:30 -0300 Message-ID: Subject: Re: [BUG] Creating sparse tree with regexp property matches To: Daniel Fleischer Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::134; envelope-from=ckoshikumo@gmail.com; helo=mail-lf1-x134.google.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, SPF_HELO_NONE=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@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1629930685; 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=XZiq3EpjADpww1YglEcrS8JnrHXRlEPBHZZYkDJoEng=; b=hUboVhUKyD67Ta60Kth9OuLzpLiiLByU2a1Wg2TNA4qIWyZYrK0uJ9mHoV3A4smriKqSdm Kupa5A5uZZXhjnTjzPMAIrPuWcymehkJK/jnelKEzqrMFhWfXhCCjwcWJRNOo2ZpqAfIKb X1Jl2NbUfdcth/Nrzirr+afEG3aIIatGo2vYBqhwWmnW+KQdEHf28399MvzE9yTbtX1EU2 UCEnDUeiMGnoUuYUXtHwvZVkpM3725Qou9uIO6U/5xLB/Ks3XypCrIEp8g9LZOmy6epeMi FqgWqq6QVkB4sp64DHvTIdhwLlGKfsDOOgKj10rnmKvEATULUZRg5mxEcIF4OA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1629930685; a=rsa-sha256; cv=none; b=GRmtLQw2sLmg8QdC4eGeEQrCOEvYYnOqudxhncyksu7qHyGTSVi5oPc/wsQk3JbUgaM398 p57e5Jf4Dh9fV7qo3e3Nj727m1uT7J9xHxWO4z32B0oJBd+Tw3Zvcj2FrubWy7ViNB+7HY dYSuHQHQGlPFFSRSypUq3G3j2XwXdHnyv+Sgm7/+I6RAM13MvEXXL/m8p/7f/iRxgRbzDN pokLdxlkci3vzuC/I95GYpkKA6NG1Jkq9cv9C62/Lx+uMGtGGMj7LBeG4h31xiTdHTvRf2 qLPLz6bVmvpGOx0usdZHSBB3B179x9ZIk4RJeWZZMsowE5zdwWJQb3QQZSdmVA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=LAlZCbXE; dmarc=pass (policy=none) header.from=gmail.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: -3.13 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=LAlZCbXE; dmarc=pass (policy=none) header.from=gmail.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: 768AEB181 X-Spam-Score: -3.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: vz7KA0WeIs/E Ah! Can't believe I didn't try that. Well, at least the docs can benefit from my confusion. Thanks, On Wed, Aug 25, 2021 at 6:05 PM Daniel Fleischer wrote: > > On Wed, Aug 25 2021, Cassio Koshikumo wrote: > > Hello all, > > > > I think there's a bug with `org-make-tags-matcher' when creating a sparse tree > > using property matching with regular expressions and "or" terms. Take the > > example given in the manual: > > > > +work-boss+PRIORITY="A"+Coffee="unlimited"+Effort<2 > > +With={Sarah|Denny}+SCHEDULED>="<2008-10-11 Sat>" > > > > If we isolate just this part: > > > > +With={Sarah|Denny} > > > > The resulting sparse tree does not match the right > > headings. The function generates the following `tagsmatcher': > > > > (progn > > (setq org-cached-props nil) > > (or > > (and > > (member > > #("Denny" 0 5 > > (regexp t)) > > tags-list)) > > (and > > (member "With" tags-list)))) > > > > There're checks for "Denny" (as a regexp) and "With" (as a string) --- this is > > supposed to be the property name, not a search term. They are both checked for > > in `tags-list'. And, finally, "Sarah" is nowhere to be seen. > > > > The problem, as far as I can tell, is that splitting the input at `|' to get the > > `orterms' does not work with the regular expression the function uses to find > > the constituent parts of each term. In this example, splitting the input at `|' > > makes one side get the opening brace and the other the closing brace, while the > > regexp expects both being present. Since the regexp doesn't fully match, the > > terms are all parsed wrong. (The function doesn't recognize "With" as property > > name, for instance.) I'm still messing with it but, for now, don't really know > > how to fix the problem. I don't 100% understand the function yet... > > > > Regards, > > Hi, the solution is that it's elisp based regex, so OR is indicated with > \| instead of just |. It might be good idea to correct the example. > > Best, > > *Daniel Fleischer* -- Cassio Koshikumo