From: Kaushal Modi <kaushal.modi@gmail.com>
To: Eric Abrahamsen <eric@ericabrahamsen.net>, emacs-orgmode@gnu.org
Subject: Re: Agenda filter by any tag seems to be broken
Date: Tue, 17 May 2016 19:40:14 +0000 [thread overview]
Message-ID: <CAFyQvY2N3nVk6Ab=mgJ9R=Ttdy2iM3osgHznL3nRkg17Qf0b6w@mail.gmail.com> (raw)
In-Reply-To: <8760udh644.fsf@ericabrahamsen.net>
[-- Attachment #1: Type: text/plain, Size: 1852 bytes --]
On Mon, May 16, 2016 at 8:38 PM Eric Abrahamsen <eric@ericabrahamsen.net>
wrote:
> Starting with emacs -Q, then adding the org-plus-contrib directory to
> load-path:
>
Are you installing both the git master version and org-plus-contrib? I do
not have org-plus-contrib in my load-path. The only org I have in the
load-path is the git master version. If you *are* installing both versions,
then that could probably explain the issue you are facing.
> M-x org-agenda
> t ;; all todos, an empty list of course
> /
> SPC
>
> And I get the error.
>
I tried that. But I don't get any error.
I took the original org-agenda-filter-make-matcher-tag-exp function from
the git master and added few debug statements as below:
(defun org-agenda-filter-make-matcher-tag-exp (tags op)
"Return a form associated to tag-expression TAGS.
Build a form testing a line for agenda filter for
tag-expressions. OP is an operator of type CHAR that allows the
function to set the right switches in the returned form."
(message "arg tags: %S" tags)
(message "arg op: %S" op)
(let (form ret)
;; Any of the expressions can match if OP is +, all must match if
;; the operator is -.
(dolist (x tags (cons (if (eq op ?-) 'and 'or) form))
(let* ((tag (substring x 1))
(f (cond
((string= "" tag) '(not tags))
((and (string-match-p "\\`{" tag) (string-match-p "}\\'" tag))
;; TAG is a regexp.
(list 'org-match-any-p (substring tag 1 -1) 'tags))
(t (list 'member (downcase tag) 'tags)))))
(message "in let, tag: %S" tag)
(message "in let, f: %S" f)
(prog1
(setq ret (push (if (eq op ?-) (list 'not f) f) form))
(message "ret val: %S" ret))))))
Then when I do M-x org-agenda t / SPC, I get:
arg tags: ("+")
arg op: 43
in let, tag: ""
in let, f: (not tags)
ret val: ((not tags))
--
--
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 3311 bytes --]
next prev parent reply other threads:[~2016-05-18 1:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-13 3:30 Agenda filter by any tag seems to be broken Eric Abrahamsen
2016-05-16 18:28 ` Kaushal Modi
2016-05-17 0:37 ` Eric Abrahamsen
2016-05-17 19:40 ` Kaushal Modi [this message]
2016-05-18 3:31 ` Eric Abrahamsen
2016-05-19 8:38 ` Nicolas Goaziou
2016-05-19 13:46 ` Eric Abrahamsen
2016-05-17 2:00 ` Eric Abrahamsen
-- strict thread matches above, loose matches on Subject: below --
2016-05-13 3:30 Eric Abrahamsen
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='CAFyQvY2N3nVk6Ab=mgJ9R=Ttdy2iM3osgHznL3nRkg17Qf0b6w@mail.gmail.com' \
--to=kaushal.modi@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=eric@ericabrahamsen.net \
/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).