* Using regular expressions in custom agenda views
@ 2020-06-28 20:05 Nathan Neff
2020-06-28 21:12 ` Kyle Meyer
0 siblings, 1 reply; 7+ messages in thread
From: Nathan Neff @ 2020-06-28 20:05 UTC (permalink / raw)
To: emacs-orgmode
[-- 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 --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Using regular expressions in custom agenda views
2020-06-28 20:05 Using regular expressions in custom agenda views Nathan Neff
@ 2020-06-28 21:12 ` Kyle Meyer
2020-06-28 22:27 ` Nathan Neff
0 siblings, 1 reply; 7+ messages in thread
From: Kyle Meyer @ 2020-06-28 21:12 UTC (permalink / raw)
To: Nathan Neff; +Cc: emacs-orgmode
Nathan Neff writes:
> 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}")))
My understanding is that the above should work. I tried your
org-agenda-custom-commands value with this agenda file:
* TODO a :projectA:
* TODO b :projectB:
* TODO c :project:
With an otherwise vanilla configuration and master (0c1740c91) checked
out, I see
Headlines with TAGS match: {projectA}
Press ‘C-u r’ to search again
scratch: TODO a :projectA:
I see the same thing on maint (3ed035ce3).
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Using regular expressions in custom agenda views
2020-06-28 21:12 ` Kyle Meyer
@ 2020-06-28 22:27 ` Nathan Neff
2020-06-28 22:28 ` Nathan Neff
0 siblings, 1 reply; 7+ messages in thread
From: Nathan Neff @ 2020-06-28 22:27 UTC (permalink / raw)
To: Kyle Meyer; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1709 bytes --]
On Sun, Jun 28, 2020 at 4:12 PM Kyle Meyer <kyle@kyleam.com> wrote:
> Nathan Neff writes:
>
> > 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}")))
>
> My understanding is that the above should work. I tried your
> org-agenda-custom-commands value with this agenda file:
>
> * TODO a
> :projectA:
> * TODO b
> :projectB:
> * TODO c
> :project:
>
> With an otherwise vanilla configuration and master (0c1740c91) checked
> out, I see
>
> Headlines with TAGS match: {projectA}
> Press ‘C-u r’ to search again
> scratch: TODO a
> :projectA:
>
> I see the same thing on maint (3ed035ce3).
>
Thanks - I'm using Org 9.3.6 and I'm getting no matches when using emacs -q
I had some other issues w/regexes and Bastien fixed them in "maint":
https://code.orgmode.org/bzg/org-mode/commit/c0d08b7efe740c17a3eec28984161c05e43da5ef
Is it relatively easy to try org-mode's "maint" version (e.g. just check
out branch from
https://code.orgmode.org/bzg/org-mode ?) I'll try using the "maint"
version to see what's up.
Thanks,
--Nate
[-- Attachment #2: Type: text/html, Size: 2952 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Using regular expressions in custom agenda views
2020-06-28 22:27 ` Nathan Neff
@ 2020-06-28 22:28 ` Nathan Neff
2020-06-28 22:39 ` Nathan Neff
0 siblings, 1 reply; 7+ messages in thread
From: Nathan Neff @ 2020-06-28 22:28 UTC (permalink / raw)
To: Kyle Meyer; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2160 bytes --]
GRRRR I tried "package update" and package mgr in Emacs kept telling me
that Org 9.3.6 was the latest. Now I look @ orgmode.org and see 9.3.7 -
I'll try that first
after I figure out how to get that "package" or whatever that thing is to
actually show the latest
versions of packages.
On Sun, Jun 28, 2020 at 5:27 PM Nathan Neff <nathan.neff@gmail.com> wrote:
>
>
> On Sun, Jun 28, 2020 at 4:12 PM Kyle Meyer <kyle@kyleam.com> wrote:
>
>> Nathan Neff writes:
>>
>> > 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}")))
>>
>> My understanding is that the above should work. I tried your
>> org-agenda-custom-commands value with this agenda file:
>>
>> * TODO a
>> :projectA:
>> * TODO b
>> :projectB:
>> * TODO c
>> :project:
>>
>> With an otherwise vanilla configuration and master (0c1740c91) checked
>> out, I see
>>
>> Headlines with TAGS match: {projectA}
>> Press ‘C-u r’ to search again
>> scratch: TODO a
>> :projectA:
>>
>> I see the same thing on maint (3ed035ce3).
>>
>
> Thanks - I'm using Org 9.3.6 and I'm getting no matches when using emacs -q
>
> I had some other issues w/regexes and Bastien fixed them in "maint":
>
> https://code.orgmode.org/bzg/org-mode/commit/c0d08b7efe740c17a3eec28984161c05e43da5ef
>
> Is it relatively easy to try org-mode's "maint" version (e.g. just check
> out branch from
> https://code.orgmode.org/bzg/org-mode ?) I'll try using the "maint"
> version to see what's up.
>
> Thanks,
> --Nate
>
>
[-- Attachment #2: Type: text/html, Size: 3776 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Using regular expressions in custom agenda views
2020-06-28 22:28 ` Nathan Neff
@ 2020-06-28 22:39 ` Nathan Neff
2020-06-28 22:48 ` Nathan Neff
0 siblings, 1 reply; 7+ messages in thread
From: Nathan Neff @ 2020-06-28 22:39 UTC (permalink / raw)
To: Kyle Meyer; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2789 bytes --]
Still isn't working with org-mode 9.3.7 (org-20200622) and
using emacs -q
I have this file:
* One
:project:a:work:boss:projectA:
:PROPERTIES:
:Effort: 1:00
:END:
* Two
:projectB:
:PROPERTIES:
:Effort: 2:00
:END:
* Bar
:pt:project:b:
And this custom view returns nothing:
(setq org-agenda-custom-commands
'(("1" tags-todo "{projectA}")))
If I do a tags-todo search manually and use this syntax: {projectA}
it works.
Ideas?
On Sun, Jun 28, 2020 at 5:28 PM Nathan Neff <nathan.neff@gmail.com> wrote:
> GRRRR I tried "package update" and package mgr in Emacs kept telling me
> that Org 9.3.6 was the latest. Now I look @ orgmode.org and see 9.3.7 -
> I'll try that first
> after I figure out how to get that "package" or whatever that thing is to
> actually show the latest
> versions of packages.
>
> On Sun, Jun 28, 2020 at 5:27 PM Nathan Neff <nathan.neff@gmail.com> wrote:
>
>>
>>
>> On Sun, Jun 28, 2020 at 4:12 PM Kyle Meyer <kyle@kyleam.com> wrote:
>>
>>> Nathan Neff writes:
>>>
>>> > 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}")))
>>>
>>> My understanding is that the above should work. I tried your
>>> org-agenda-custom-commands value with this agenda file:
>>>
>>> * TODO a
>>> :projectA:
>>> * TODO b
>>> :projectB:
>>> * TODO c
>>> :project:
>>>
>>> With an otherwise vanilla configuration and master (0c1740c91) checked
>>> out, I see
>>>
>>> Headlines with TAGS match: {projectA}
>>> Press ‘C-u r’ to search again
>>> scratch: TODO a
>>> :projectA:
>>>
>>> I see the same thing on maint (3ed035ce3).
>>>
>>
>> Thanks - I'm using Org 9.3.6 and I'm getting no matches when using emacs
>> -q
>>
>> I had some other issues w/regexes and Bastien fixed them in "maint":
>>
>> https://code.orgmode.org/bzg/org-mode/commit/c0d08b7efe740c17a3eec28984161c05e43da5ef
>>
>> Is it relatively easy to try org-mode's "maint" version (e.g. just check
>> out branch from
>> https://code.orgmode.org/bzg/org-mode ?) I'll try using the "maint"
>> version to see what's up.
>>
>> Thanks,
>> --Nate
>>
>>
>
[-- Attachment #2: Type: text/html, Size: 5240 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Using regular expressions in custom agenda views
2020-06-28 22:39 ` Nathan Neff
@ 2020-06-28 22:48 ` Nathan Neff
2020-06-28 22:54 ` Nathan Neff
0 siblings, 1 reply; 7+ messages in thread
From: Nathan Neff @ 2020-06-28 22:48 UTC (permalink / raw)
To: Kyle Meyer; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 3330 bytes --]
More wonkiness:
This custom view (no regexes) doesn't work, but manually entering projectA
(no quotes) in a tags-todo search
*does* work - so maybe my problem isn't regexes, but something else with my
org-agenda-custom-commands . . . .
(setq org-agenda-custom-commands
'(("1" tags-todo "projectA")))
On Sun, Jun 28, 2020 at 5:39 PM Nathan Neff <nathan.neff@gmail.com> wrote:
> Still isn't working with org-mode 9.3.7 (org-20200622) and
> using emacs -q
>
> I have this file:
>
> * One
> :project:a:work:boss:projectA:
> :PROPERTIES:
> :Effort: 1:00
> :END:
> * Two
> :projectB:
> :PROPERTIES:
> :Effort: 2:00
> :END:
>
> * Bar
> :pt:project:b:
>
>
> And this custom view returns nothing:
> (setq org-agenda-custom-commands
> '(("1" tags-todo "{projectA}")))
>
> If I do a tags-todo search manually and use this syntax: {projectA}
> it works.
>
> Ideas?
>
> On Sun, Jun 28, 2020 at 5:28 PM Nathan Neff <nathan.neff@gmail.com> wrote:
>
>> GRRRR I tried "package update" and package mgr in Emacs kept telling me
>> that Org 9.3.6 was the latest. Now I look @ orgmode.org and see 9.3.7 -
>> I'll try that first
>> after I figure out how to get that "package" or whatever that thing is to
>> actually show the latest
>> versions of packages.
>>
>> On Sun, Jun 28, 2020 at 5:27 PM Nathan Neff <nathan.neff@gmail.com>
>> wrote:
>>
>>>
>>>
>>> On Sun, Jun 28, 2020 at 4:12 PM Kyle Meyer <kyle@kyleam.com> wrote:
>>>
>>>> Nathan Neff writes:
>>>>
>>>> > 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}")))
>>>>
>>>> My understanding is that the above should work. I tried your
>>>> org-agenda-custom-commands value with this agenda file:
>>>>
>>>> * TODO a
>>>> :projectA:
>>>> * TODO b
>>>> :projectB:
>>>> * TODO c
>>>> :project:
>>>>
>>>> With an otherwise vanilla configuration and master (0c1740c91) checked
>>>> out, I see
>>>>
>>>> Headlines with TAGS match: {projectA}
>>>> Press ‘C-u r’ to search again
>>>> scratch: TODO a
>>>> :projectA:
>>>>
>>>> I see the same thing on maint (3ed035ce3).
>>>>
>>>
>>> Thanks - I'm using Org 9.3.6 and I'm getting no matches when using emacs
>>> -q
>>>
>>> I had some other issues w/regexes and Bastien fixed them in "maint":
>>>
>>> https://code.orgmode.org/bzg/org-mode/commit/c0d08b7efe740c17a3eec28984161c05e43da5ef
>>>
>>> Is it relatively easy to try org-mode's "maint" version (e.g. just check
>>> out branch from
>>> https://code.orgmode.org/bzg/org-mode ?) I'll try using the "maint"
>>> version to see what's up.
>>>
>>> Thanks,
>>> --Nate
>>>
>>>
>>
[-- Attachment #2: Type: text/html, Size: 6130 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Using regular expressions in custom agenda views
2020-06-28 22:48 ` Nathan Neff
@ 2020-06-28 22:54 ` Nathan Neff
0 siblings, 0 replies; 7+ messages in thread
From: Nathan Neff @ 2020-06-28 22:54 UTC (permalink / raw)
To: Kyle Meyer; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 3739 bytes --]
On Sun, Jun 28, 2020 at 5:48 PM Nathan Neff <nathan.neff@gmail.com> wrote:
> More wonkiness:
>
> This custom view (no regexes) doesn't work, but manually entering projectA
> (no quotes) in a tags-todo search
> *does* work - so maybe my problem isn't regexes, but something else with
> my org-agenda-custom-commands . . . .
>
> (setq org-agenda-custom-commands
> '(("1" tags-todo "projectA")))
>
>
Okay - calm down - it was the fact that I was using the "tags" search to
manually search and
my custom view was using tags-todo.
Regexes are working now - sorry for the spam!
--Nate
>
>
> On Sun, Jun 28, 2020 at 5:39 PM Nathan Neff <nathan.neff@gmail.com> wrote:
>
>> Still isn't working with org-mode 9.3.7 (org-20200622) and
>> using emacs -q
>>
>> I have this file:
>>
>> * One
>> :project:a:work:boss:projectA:
>> :PROPERTIES:
>> :Effort: 1:00
>> :END:
>> * Two
>> :projectB:
>> :PROPERTIES:
>> :Effort: 2:00
>> :END:
>>
>> * Bar
>> :pt:project:b:
>>
>>
>> And this custom view returns nothing:
>> (setq org-agenda-custom-commands
>> '(("1" tags-todo "{projectA}")))
>>
>> If I do a tags-todo search manually and use this syntax: {projectA}
>> it works.
>>
>> Ideas?
>>
>> On Sun, Jun 28, 2020 at 5:28 PM Nathan Neff <nathan.neff@gmail.com>
>> wrote:
>>
>>> GRRRR I tried "package update" and package mgr in Emacs kept telling me
>>> that Org 9.3.6 was the latest. Now I look @ orgmode.org and see 9.3.7
>>> - I'll try that first
>>> after I figure out how to get that "package" or whatever that thing is
>>> to actually show the latest
>>> versions of packages.
>>>
>>> On Sun, Jun 28, 2020 at 5:27 PM Nathan Neff <nathan.neff@gmail.com>
>>> wrote:
>>>
>>>>
>>>>
>>>> On Sun, Jun 28, 2020 at 4:12 PM Kyle Meyer <kyle@kyleam.com> wrote:
>>>>
>>>>> Nathan Neff writes:
>>>>>
>>>>> > 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}")))
>>>>>
>>>>> My understanding is that the above should work. I tried your
>>>>> org-agenda-custom-commands value with this agenda file:
>>>>>
>>>>> * TODO a
>>>>> :projectA:
>>>>> * TODO b
>>>>> :projectB:
>>>>> * TODO c
>>>>> :project:
>>>>>
>>>>> With an otherwise vanilla configuration and master (0c1740c91) checked
>>>>> out, I see
>>>>>
>>>>> Headlines with TAGS match: {projectA}
>>>>> Press ‘C-u r’ to search again
>>>>> scratch: TODO a
>>>>> :projectA:
>>>>>
>>>>> I see the same thing on maint (3ed035ce3).
>>>>>
>>>>
>>>> Thanks - I'm using Org 9.3.6 and I'm getting no matches when using
>>>> emacs -q
>>>>
>>>> I had some other issues w/regexes and Bastien fixed them in "maint":
>>>>
>>>> https://code.orgmode.org/bzg/org-mode/commit/c0d08b7efe740c17a3eec28984161c05e43da5ef
>>>>
>>>> Is it relatively easy to try org-mode's "maint" version (e.g. just
>>>> check out branch from
>>>> https://code.orgmode.org/bzg/org-mode ?) I'll try using the "maint"
>>>> version to see what's up.
>>>>
>>>> Thanks,
>>>> --Nate
>>>>
>>>>
>>>
[-- Attachment #2: Type: text/html, Size: 7091 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-06-28 22:55 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-28 20:05 Using regular expressions in custom agenda views Nathan Neff
2020-06-28 21:12 ` 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
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).