Hello,

Gustav Wikström <gus...@whil.se> writes:

> Patch attached.

Thank you. A minor comment below.

> From 445995e1fad646b2b22c014e09e3e05a7aeeede1 Mon Sep 17 00:00:00 2001
> From: Gustav Wikstrom <gustav.e...@gmail.com>
> 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

Reply via email to