From: "Gustav Wikström" <gustav@whil.se>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: "sgeorgii ." <sgeorgii@gmail.com>,
"emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: [RFC] [PATCH] Changes to Tag groups - allow nesting and regexps
Date: Wed, 25 Nov 2015 14:44:10 +0000 [thread overview]
Message-ID: <DB5PR02MB1191113EEEC1F90AD9C0E088DA050@DB5PR02MB1191.eurprd02.prod.outlook.com> (raw)
In-Reply-To: <87ziy28ccw.fsf@nicolasgoaziou.fr>
Hi, see below
> >
> > * 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.
The reference being the subject-line and date of the mail from sgeorgii?
>
> > (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.
Hmm, since the error was thrown when trying to look at indexes outside of the string in (substring ... ), I don't see how isregexp can be left as is. We have to make sure the substring-code is not evaluated if the tag is empty. What am I missing?
>
>
> Regards,
>
> --
> Nicolas Goaziou 0x80A93738
next prev parent reply other threads:[~2015-11-25 15:00 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-25 7:50 [RFC] [PATCH] Changes to Tag groups - allow nesting and regexps sgeorgii .
2015-11-25 10:26 ` Gustav Wikström
2015-11-25 11:05 ` sgeorgii .
2015-11-25 12:20 ` Gustav Wikström
2015-11-25 12:58 ` Nicolas Goaziou
2015-11-25 14:44 ` Gustav Wikström [this message]
2015-11-25 14:52 ` Nicolas Goaziou
2015-11-25 15:39 ` Gustav Wikström
2015-11-26 7:30 ` sgeorgii .
2015-11-26 8:21 ` Nicolas Goaziou
2015-11-26 10:01 ` Gustav Wikström
2015-11-26 10:21 ` Nicolas Goaziou
-- strict thread matches above, loose matches on Subject: below --
2015-01-25 11:07 Gustav Wikström
2015-01-31 8:41 ` Nicolas Goaziou
2015-02-19 20:00 ` Gustav Wikström
2015-02-24 16:43 ` Nicolas Goaziou
2015-03-05 1:08 ` Gustav Wikström
2015-03-07 21:51 ` Nicolas Goaziou
2015-03-15 10:17 ` Gustav Wikström
2015-03-16 20:38 ` Gustav Wikström
2015-03-16 21:30 ` Nicolas Goaziou
2015-03-19 21:07 ` Gustav Wikström
2015-03-19 22:43 ` Nicolas Goaziou
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DB5PR02MB1191113EEEC1F90AD9C0E088DA050@DB5PR02MB1191.eurprd02.prod.outlook.com \
--to=gustav@whil.se \
--cc=emacs-orgmode@gnu.org \
--cc=mail@nicolasgoaziou.fr \
--cc=sgeorgii@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).