all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: "Daniel J. Sinder" <djsinder@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Dynamic block match fails on checkbox columns
Date: Tue, 25 Oct 2022 10:40:21 +0000	[thread overview]
Message-ID: <87h6zsrxt6.fsf@localhost> (raw)
In-Reply-To: <CAHND-wwBsoAQs2a5XTGKyX-=fFL5AwCPup=uA+R=FRH=1rUeVg@mail.gmail.com>

"Daniel J. Sinder" <djsinder@gmail.com> writes:

> I'm trying to use a dynamic block with :match to filter columnview for a
> checkbox column.  However, the match is failing.   Based on some variations
> that do work (described below the example), it seems the closing square
> bracket may be the problem.
>
> Here's a minimal example:
> * Things
>   :PROPERTIES:
>   :COLUMNS:  %20ITEM %CHKBOX{X/}
>   :ID:       Things
>   :CHKBOX_ALL: "[ ]" "[X]"
>   :END:
> *** One Thing
>     :PROPERTIES:
>     :CHKBOX:   [X]
>     :END:
> *** Another Thing
>     :PROPERTIES:
>     :CHKBOX:   [ ]
>     :END:
>
> * Dynamic Block
>   #+BEGIN: columnview :id Things :match "CHKBOX=\"[X]\""
>   | ITEM | CHKBOX |
>   |------+--------|
>   #+END:

Thanks for reporting!
It is kind of expected from the manual explanation about tag matchers:

   • If the comparison value is enclosed in double-quotes _and_ angular
     brackets (like ‘DEADLINE<​="<2008-12-24 18:30>"’), both values are
     assumed to be date/time specifications in the standard Org way...

However, the heuristics described in the manual is obvious wrong here.

I improved the match parser a bit to require a number inside brackets in
timestamps, but this whole syntax is overcomplicated and difficult to
understand.

In any case, your bug should be fixed now on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=e022a0cea11a0e784ba20ac478a033da7fb1bb7f

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


      reply	other threads:[~2022-10-25 10:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-14  7:19 Dynamic block match fails on checkbox columns Daniel J. Sinder
2022-10-25 10:40 ` Ihor Radchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h6zsrxt6.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=djsinder@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.