emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nathan Neff <nathan.neff@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Using regular expressions in custom agenda views
Date: Sun, 28 Jun 2020 15:05:05 -0500	[thread overview]
Message-ID: <CAC=HedAu3o-wG=AB6NLyyqBaoR1QJ4gDn9KPeTrJvX=P8_rhFw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1151 bytes --]

I'm having a difficult time using regular expressions in custom
"tags-todo" agenda views.

Is it possible to create custom agenda views using regular expressions,
and if so, do I need to escape certain characters?

I can't get a simple regex like this to work, so I'm suspecting that
I'm doing something wrong or, it's simply not possible to create custom
agenda views that use regular expressions to search for tags.

For example, this expression doesn't even find headings with :projectA:
as a tag

  (setq org-agenda-custom-commands
  '(
     ("1" tags-todo "{projectA}")))

I have the regex surrounded in {} because of the documentation about doing
a tags search - do I need those when using a custom agenda view?

The info page says:
"The second parameter is the search type followed by the string or regular
expression
to be used for the matching" - how do I specify a regular expression versus
a simple
string?

This attempt gives me back a bunch of headings that simply match :project:
but have no
capital A anywhere in the tags.
  (setq org-agenda-custom-commands
  '(
     ("1" tags-todo "project[A]")))

Any help appreciated
Thanks,
--Nate

[-- Attachment #2: Type: text/html, Size: 1660 bytes --]

             reply	other threads:[~2020-06-28 20:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-28 20:05 Nathan Neff [this message]
2020-06-28 21:12 ` Using regular expressions in custom agenda views Kyle Meyer
2020-06-28 22:27   ` Nathan Neff
2020-06-28 22:28     ` Nathan Neff
2020-06-28 22:39       ` Nathan Neff
2020-06-28 22:48         ` Nathan Neff
2020-06-28 22:54           ` Nathan Neff

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='CAC=HedAu3o-wG=AB6NLyyqBaoR1QJ4gDn9KPeTrJvX=P8_rhFw@mail.gmail.com' \
    --to=nathan.neff@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 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).