[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [RFC] [PATCH] Changes to Tag groups - allow nesting and regexps
From: |
Nicolas Goaziou |
Subject: |
Re: [O] [RFC] [PATCH] Changes to Tag groups - allow nesting and regexps |
Date: |
Wed, 25 Nov 2015 13:58:23 +0100 |
Hello,
Gustav Wikström <address@hidden> writes:
> Patch attached.
Thank you. A minor comment below.
> From 445995e1fad646b2b22c014e09e3e05a7aeeede1 Mon Sep 17 00:00:00 2001
> From: Gustav Wikstrom <address@hidden>
> Date: Wed, 25 Nov 2015 13:06:31 +0100
> Subject: [PATCH] org-agenda: Filter empty tags
>
> * lisp/org-agenda.el (org-agenda-filter-make-matcher-tag-exp): Deal with
> the case when the user provided an empty string to filter or exclude
> rows from the agenda.
Please provide a reference to the discussion that lead to this patch.
> (let* ((tag (substring x 1))
> - (isregexp (and (equal "{" (substring tag 0 1))
> + (isemptystring (string= "" tag))
> + (isregexp (and (not isemptystring)
> + (equal "{" (substring tag 0 1))
> (equal "}" (substring tag -1))))
> regexp)
> (cond
> (isregexp
> (setq regexp (substring tag 1 -1))
> (setq f1 (list 'org-match-any-p regexp 'tags)))
> + (isemptystring
> + (setq f1 '(not tags)))
> (t
> (setq f1 (list 'member (downcase tag) 'tags))))
> (when (eq op ?-)
Nitpick time:
You don't need isemptystring if it is the first branch in cond
(cond
((string= "" tag) (setq f1 '(not tags)))
(isregexp ...)
(t ...))
Obviously, in that case, you don't need to change isregexp at all.
Regards,
--
Nicolas Goaziou 0x80A93738
- [O] [RFC] [PATCH] Changes to Tag groups - allow nesting and regexps, sgeorgii ., 2015/11/25
- Re: [O] [RFC] [PATCH] Changes to Tag groups - allow nesting and regexps, Gustav Wikström, 2015/11/25
- Re: [O] [RFC] [PATCH] Changes to Tag groups - allow nesting and regexps, sgeorgii ., 2015/11/25
- Re: [O] [RFC] [PATCH] Changes to Tag groups - allow nesting and regexps, Gustav Wikström, 2015/11/25
- Re: [O] [RFC] [PATCH] Changes to Tag groups - allow nesting and regexps,
Nicolas Goaziou <=
- Re: [O] [RFC] [PATCH] Changes to Tag groups - allow nesting and regexps, Gustav Wikström, 2015/11/25
- Re: [O] [RFC] [PATCH] Changes to Tag groups - allow nesting and regexps, Nicolas Goaziou, 2015/11/25
- Re: [O] [RFC] [PATCH] Changes to Tag groups - allow nesting and regexps, Gustav Wikström, 2015/11/25
- Re: [O] [RFC] [PATCH] Changes to Tag groups - allow nesting and regexps, sgeorgii ., 2015/11/26
- Re: [O] [RFC] [PATCH] Changes to Tag groups - allow nesting and regexps, Nicolas Goaziou, 2015/11/26
- Re: [O] [RFC] [PATCH] Changes to Tag groups - allow nesting and regexps, Gustav Wikström, 2015/11/26
- Re: [O] [RFC] [PATCH] Changes to Tag groups - allow nesting and regexps, Nicolas Goaziou, 2015/11/26