From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id AKlpEM+wJmEI5QAAgWs5BA (envelope-from ) for ; Wed, 25 Aug 2021 23:06:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id CEn4C8+wJmGebAAAbx9fmQ (envelope-from ) for ; Wed, 25 Aug 2021 21:06:23 +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 A33289EB9 for ; Wed, 25 Aug 2021 23:06:22 +0200 (CEST) Received: from localhost ([::1]:41802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mJ06H-00067Z-3C for larch@yhetil.org; Wed, 25 Aug 2021 17:06:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJ05u-00067R-FU for emacs-orgmode@gnu.org; Wed, 25 Aug 2021 17:05:58 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]:37678) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mJ05s-00061q-O4 for emacs-orgmode@gnu.org; Wed, 25 Aug 2021 17:05:58 -0400 Received: by mail-ej1-x633.google.com with SMTP id h9so1269177ejs.4 for ; Wed, 25 Aug 2021 14:05:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:references:user-agent:in-reply-to :message-id:mime-version; bh=d+3dMSdtTX37xtFnbGmGXxL6zfCsm+Qk3Ji7leWdte8=; b=iqO9FZSqHxClJtIQCvE8WqA+4uGVo3VChCNAYzsWBYY0TbgjMgiQICeLvgzvtLfv0z IvyKIQGsMhBtZNqSZTR7KdsHTruvgHxJAFpVhEpxI4+sX/Y0MyuF8wmLFc98AsMUpBC9 Pj9pTYMsyfZjbg1bUuow2N4QIp4YSW6A7uuilxKbcegAiZr+Ff9/IsUtZKRxLEPP/iDX jPfSqiSfnOS652++HkiSQWuE3k50dJbGpe/ZKskskniqvPHvEaaCh5YfLPH6BA8XipVf pVd8i9C2vEjs37qnQ4pOPucQljJDRqyTp7ADCfxgYkB0C+su9D1iPkmlofluv3g4PKp0 Q/Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:references:user-agent :in-reply-to:message-id:mime-version; bh=d+3dMSdtTX37xtFnbGmGXxL6zfCsm+Qk3Ji7leWdte8=; b=A2a6VEdXtzSvBG5J7b8GzxPBgoc/ujdXbVL6nevpcgKeFuPj6sGCbkFGlOlROQ2yXK 8eP5tAQ1SlpOlZnVHnLdHYhCtdPeX+5ACPLKr7x4Zh8Vagh95nyxNz0DRLn+UhqkIIfP id3TWsfNekOSZ853WNLSPYhXIVPiJiXOQQJfkxNu+aTVB4ShoKlBcT5M5MREFk8hV4yk q+Wpw/AFirjni8/HyrV1FXpROhrTUq/hgByNrpRMyGL3nEOlGKoxaZTh7AickvWxomW3 VSsEWOdbw5NX8nQwmQKSCsegMfP6KqH8kaUIxaOAglUbqbAjx3MLX2XeN53thykOZGg1 hK6Q== X-Gm-Message-State: AOAM532Wy4dK00IdPNGC1R3734WVqU3L4gqIkU6dapu272ogr5mrmOeH j9jGyunzcJaxEoe4TrJa+L9silD9fOg= X-Google-Smtp-Source: ABdhPJzrGMs/CVc+0r1gKQxmisQqJr/unt02Q1S0K4U6OC2VikCTkMLGfdXK6eDKern+rMFCxT9l9Q== X-Received: by 2002:a17:906:2f15:: with SMTP id v21mr624177eji.444.1629925554528; Wed, 25 Aug 2021 14:05:54 -0700 (PDT) Received: from Home-Mac ([141.226.10.22]) by smtp.gmail.com with ESMTPSA id g19sm314161eje.121.2021.08.25.14.05.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Aug 2021 14:05:54 -0700 (PDT) From: Daniel Fleischer To: Cassio Koshikumo Subject: Re: [BUG] Creating sparse tree with regexp property matches Date: Thu, 26 Aug 2021 00:03:57 +0300 References: User-agent: mu4e 1.6.3; emacs 28.0.50 In-reply-to: Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=danflscr@gmail.com; helo=mail-ej1-x633.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=1629925582; 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=d+3dMSdtTX37xtFnbGmGXxL6zfCsm+Qk3Ji7leWdte8=; b=LxLZr9gkCv5hHtjAdlEwn3oGzrpp2wp2TnF/Yhyij0CGMzWXfvrDT5YQKZk+3hCbWCuNPv ECqvEWWxsq2j0y3FUPFKuGHaLZi50C5nNh2JjdQbtq8w35FLCnFQwFp1YR1P3ea3sf5SvH xa9HtXgIJbOlFa6QyYliIrz4RAHqs7VtYKOkO6XQ2VJY5UehtH97vBpCUIW+Bj3ZQGEIGL 3PLSOdB6ZGmzuH0Si+AL50E6jRVhjMBcLi3E40FCqRRd6AiyYi7gN6wabTNYZq+lFY/lRP B5Rxtb1xJ8DGx5QCRlHyKcjXNQouBIcuG2lGFYAEzTUtQ2fxWNfLOkfweMQygw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1629925582; a=rsa-sha256; cv=none; b=BO922NdZ3PTsuGmt7skag3wqMyTGPQPE0GqtCSstVA5m0b0wK9HDxtnZaeZa37y1CvMV49 lG+FiCSgS0xQZEqaIVeuGxjQyJ8dn1XH/+95hIo+M0ZOi4ZFAFk+zoPWHrULG+60D0ONgG JQ10At5CBO33BGwHJliBbSAS7D+UlJ77bN26lmj+Mo3QRSOTjS8j/D/cLgWEr+bM0xod2f CBwvRmOrOHZTwvzSSNoH2aJ5w0AX9dha75kPhMhl917KKEHK5MPsXay7OK5fJXcyqAJZMn h/cofgkLO4D66mrBdMglBdOSqzo5Aa7oYxsw0NAieRYC3hkQNOdfK918RjRvXg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=iqO9FZSq; 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: -2.13 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=iqO9FZSq; 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: A33289EB9 X-Spam-Score: -2.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: v/wWWhv/KawI --=-=-= Content-Type: text/plain Content-Disposition: inline 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* --=-=-=--