From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id uB88LXm862DgUAAAgWs5BA (envelope-from ) for ; Mon, 12 Jul 2021 05:52:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id cGQMKXm862DgQQAA1q6Kng (envelope-from ) for ; Mon, 12 Jul 2021 03:52: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 38CF83951F for ; Mon, 12 Jul 2021 05:52:25 +0200 (CEST) Received: from localhost ([::1]:49846 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2mzX-0008L1-3z for larch@yhetil.org; Sun, 11 Jul 2021 23:52:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56708) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2mz9-0008Kq-Vo for emacs-orgmode@gnu.org; Sun, 11 Jul 2021 23:52:00 -0400 Received: from ciao.gmane.io ([116.202.254.214]:53578) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2mz8-0000RW-7n for emacs-orgmode@gnu.org; Sun, 11 Jul 2021 23:51:59 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1m2mz3-0006b8-V8 for emacs-orgmode@gnu.org; Mon, 12 Jul 2021 05:51:53 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Nick Dokos Subject: [PATCH] Fix match/maxlevel conflict in colview dynblock Date: Sun, 11 Jul 2021 23:51:44 -0400 Message-ID: <87h7h0w5nz.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cancel-Lock: sha1:364G1bZ+usvqtPIGfGGUf+LWx2s= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , 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=1626061945; 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; bh=kIYcjPA8Y5HEt2HyFAWS5S+3h64UFEX1M5wrIRB0U/A=; b=bwneeVk1x5PM3EopJxNiE0FYiV2iBzaKInjct+KV5VRtQhkLk6oD5NAEj1vy/gv/pwruJI 3TXWm3HMskdYsOOydiu5NWiokBbpDCF6W6dFb+8pGomE01aydzvO+jMpJ/UdTLLR3cHSqq BCQVl9YTwryfM5ucN6wUrNNVXTKvoPhTh5JEcJM1Z+LsDN9g5ZWWmqCJYNExm8Rkb7umTs IZI5yR02PFAAVqghiDs/aOVW0apWLejsdhuL+AX5QBtGObTxmbRSDcnE0NlvhacgPyudgE IH6tM4sMhZQzdUM25PpdX7GZ1bkeNOgMKe5oZU0rnOFwCv+nVTa8YKU2gjuozQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626061945; a=rsa-sha256; cv=none; b=s94tlVCkJ24ftgD99ih5/Jr3/l6HP4YdGgctiLdes2vQ7SdeV9I2CDV+AswwTpu3DA+jLc jgKzALVNdtK63ZKI53GowOuRiRPGT3ZFRepqzkdbD6n0B0UiXhBcwaDBbwacBekLSG2tuY w4fyj4CCUdzq9qJvGkuji8qOy7mIKnNKVrtWUu0edToyNkZ3BaUriARmMYErgH5isuGHO3 ypfe3oZBOsV8V+8GNqgf/YEgkB1pQBql8WMCauwxXsk/i6tFlhcE1/PP1hXI9HK0IvU28e wmCRp2BE0uxs84xMcB+tD7jCq5Xl0sydO5f1bm44KJEwftN+KDtHxz9QagvUPA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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: -1.80 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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: 38CF83951F X-Spam-Score: -1.80 X-Migadu-Scanner: scn0.migadu.com X-TUID: ynaEKTsBMFJ+ --=-=-= Content-Type: text/plain Specifying both `maxlevel' and `match' in a columnview dynamic block was broken: the `match' argument is ignored in that case. See the link below for a (not so minimal) ECM. Reported-by: Pablo A Perez-Fernandez Link: https://emacs.stackexchange.com/questions/66658/filter-columnview-dblock-on-properties-or-tags -- Nick "There are only two hard problems in computer science: cache invalidation, naming things, and off-by-one errors." -Martin Fowler --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Fix-match-maxlevel-conflict-in-colview-dynblock.patch Content-Description: [PATCH] Fix match/maxlevel conflict in colview dynblock >From 8bcff482e59c24758f87b9b5cdef3bc123dc12f8 Mon Sep 17 00:00:00 2001 From: Nick Dokos Date: Sun, 11 Jul 2021 22:30:22 -0400 Subject: [PATCH] Fix match/maxlevel conflict in colview dynblock * lisp/org-coplview.el (org-columns--capture-view): Combine the match and maxlevel arguments properly to construct the MATCH argument of `org-map-entries'. Specifying both `maxlevel' and `match' in a columnview dynamic block does not work: the `match' argument is ignored in that case. See the link below for a (not so minimal) ECM. Reported-by: Pablo A Perez-Fernandez Link: https://emacs.stackexchange.com/questions/66658/filter-columnview-dblock-on-properties-or-tags --- lisp/org-colview.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/org-colview.el b/lisp/org-colview.el index 2e1c29a99..7144308ff 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -1398,8 +1398,9 @@ other rows. Each row is a list of fields, as strings, or (org-get-tags)))) (push (cons (org-reduced-level (org-current-level)) (nreverse row)) table))))) - (or (and maxlevel (format "LEVEL<=%d" maxlevel)) - (and match match)) + (if match + (concat match (and maxlevel (format "+LEVEL<=%d" maxlevel))) + (and maxlevel (format "LEVEL<=%d" maxlevel))) (and local 'tree) 'archive 'comment) (org-columns-quit) -- 2.31.1 --=-=-=--