Re: Possible to exclude/include tags for agenda custom commands?
Bastien writes: > Hi Eric, > > Eric Abrahamsen writes: > >> The key is having `org-agenda-sticky' set to t -- this means that we'll >> let-bind buffer-local variables in a buffer where they're already >> set. > > thanks for the reproducible example, I was able to get the warning. > > You can safely ignore it: when redoing sticky agenda, we need to > let-bind the values as explicitely set in the agenda custom command > (here the org-agenda-tag-filter value) while preparing the agenda > requires the variables to be made local. I don't see what can be > done and I don't think there hidden bugs lingering around here. Okay! I also didn't think anything terrible was going on here. I note there's the variable `org-agenda-doing-sticky-redo' that we could presumably check, and avoid re-setting the tag filter when it's t, but again I don't think the warning is a big deal. Thanks, Eric
Re: Possible to exclude/include tags for agenda custom commands?
Hi Eric, Eric Abrahamsen writes: > The key is having `org-agenda-sticky' set to t -- this means that we'll > let-bind buffer-local variables in a buffer where they're already > set. thanks for the reproducible example, I was able to get the warning. You can safely ignore it: when redoing sticky agenda, we need to let-bind the values as explicitely set in the agenda custom command (here the org-agenda-tag-filter value) while preparing the agenda requires the variables to be made local. I don't see what can be done and I don't think there hidden bugs lingering around here. Best, -- Bastien
Re: Possible to exclude/include tags for agenda custom commands?
Bastien writes: > Hi Eric, > > Eric Abrahamsen writes: > >> I hope that helps! > > thanks for the detailed example. What verison of Org and Emacs? > > With your example and Org mode version 9.3.6 and GNU Emacs 28.0.50 > I don't get the warning. If you have a ECM I'm willing to test more. The key is having `org-agenda-sticky' set to t -- this means that we'll let-bind buffer-local variables in a buffer where they're already set. Steps to reproduce: 1. emacs -Q 2. Add Org of your choice to load-path 3. Load the attached startup.el 4. Make sure the attached test.org is someplace where the previous file can find it. 5. org-agenda, then the "b" key 6. Hit "g" or "r", either will trigger the warning Hope that works, Eric (setq org-agenda-custom-commands '(("b" "Bugs?" ((agenda "" ((org-agenda-start-day "2020-02-22") (org-agenda-span 10 ((org-agenda-tag-filter '("+buggy")) (setq org-agenda-files '("~/test.org") org-agenda-sticky t) test.org Description: Lotus Organizer
Re: Possible to exclude/include tags for agenda custom commands?
Hi Eric, Eric Abrahamsen writes: > I hope that helps! thanks for the detailed example. What verison of Org and Emacs? With your example and Org mode version 9.3.6 and GNU Emacs 28.0.50 I don't get the warning. If you have a ECM I'm willing to test more. Thanks, -- Bastien
Re: Possible to exclude/include tags for agenda custom commands?
Bastien writes: > Hi Eric, > > Eric Abrahamsen writes: > >> I'll also note that, while this works perfectly well, every time I >> refresh my custom agenda I see: >> >> Making org-agenda-tag-filter buffer-local while locally let-bound! > > Can you send enough information so that we can reproduce the problem? Yes, that wasn't a very helpful report, was it? First of all, here's the custom command I'm using, to organize an upcoming trip to New York: ("n" "New York Feb 2020" ((tags-todo "nyfeb2020") (agenda "is this string meaningless?" ((org-agenda-start-day "2020-02-25") (org-agenda-span 15 ((org-agenda-tag-filter '("+nyfeb2020" I edebug `org-agenda-redo', and hit "g". In this function, `org-agenda-tag-filter' is nil. I don't know if it's supposed to be or not, but it is. The error arises out of `org-agenda-run-series', so we go there, and find it comes from `org-let': (let ((org-agenda-tag-filter '("+nyfeb2020"))) (org-agenda-prepare name)) `org-agenda-run-series' gets called twice every time I update the agenda; the error only arises from the first time. The `org-agenda-tag-filter' variable is buffer-local to my custom agenda, which is why Emacs complains that it's being let-bound. I don't see where `org-agenda-tag-filter' is made buffer-local. I hope that helps! Eric
Re: Possible to exclude/include tags for agenda custom commands?
Hi Eric, Eric Abrahamsen writes: > I'll also note that, while this works perfectly well, every time I > refresh my custom agenda I see: > > Making org-agenda-tag-filter buffer-local while locally let-bound! Can you send enough information so that we can reproduce the problem? Thanks! -- Bastien
Re: Possible to exclude/include tags for agenda custom commands?
Eric Abrahamsen writes: > Bastien writes: > >> Hi Eric, >> >> Eric Abrahamsen writes: >> >>> In my current Org, version 9.3.6-elpaplus, I need a "+" in front of a >>> select tag, ie the "MAYBE" above needs to be "+MAYBE", otherwise nothing >>> is selected at all. >> >> FWIW yes, this should be "+MAYBE". > > Thanks for confirming! I'll also note that, while this works perfectly well, every time I refresh my custom agenda I see: Making org-agenda-tag-filter buffer-local while locally let-bound! Maybe there's still some work to be done here?
Re: Possible to exclude/include tags for agenda custom commands?
Bastien writes: > Hi Eric, > > Eric Abrahamsen writes: > >> In my current Org, version 9.3.6-elpaplus, I need a "+" in front of a >> select tag, ie the "MAYBE" above needs to be "+MAYBE", otherwise nothing >> is selected at all. > > FWIW yes, this should be "+MAYBE". Thanks for confirming!
Re: Possible to exclude/include tags for agenda custom commands?
Hi Eric, Eric Abrahamsen writes: > In my current Org, version 9.3.6-elpaplus, I need a "+" in front of a > select tag, ie the "MAYBE" above needs to be "+MAYBE", otherwise nothing > is selected at all. FWIW yes, this should be "+MAYBE". -- Bastien
Re: Possible to exclude/include tags for agenda custom commands?
Stig Brautaset writes: > Hi Bastien, > > Bastien writes: >>> I can easily do this in the list of TODOs, with a tag search. However, I >>> haven't figured out how to do this for the agenda. Is it possible? If >>> so, how? >> >> From what I understand, check `org-agenda-tag-filter' to see how to >> use it within an agenda custom command. > > Thank you! That did indeed do it. Coincidentally, I was just trying to figure this problem out, so this snippet is helpful. It's weird, because I'm almost certain I've done this before, but couldn't remember how. > FWIW my stanza looks like this now: > > (setq org-agenda-custom-commands > '(("w" "Work Agenda" > ((agenda "" ((org-agenda-span 'day))) > (todo "TODO" >((org-agenda-max-entries 5) > (org-agenda-todo-ignore-scheduled 'all) > (org-agenda-todo-ignore-deadlines 'all) > (org-agenda-todo-ignore-timestamp 'all > ((org-agenda-tag-filter '("-@home" "-MAYBE" >("h" "Home Agenda" > ((agenda "") > (todo "TODO" >((org-agenda-max-entries 5) > (org-agenda-todo-ignore-scheduled 'all) > (org-agenda-todo-ignore-deadlines 'all) > (org-agenda-todo-ignore-timestamp 'all > ((org-agenda-tag-filter '("-@work" "-MAYBE" >("m" "Maybe" > ((todo "PROJ") > (tags-todo "-PROJ/TODO")) > ((org-agenda-tag-filter '("MAYBE" >("P" "Projects" tags-todo "-MAYBE/PROJ" In my current Org, version 9.3.6-elpaplus, I need a "+" in front of a select tag, ie the "MAYBE" above needs to be "+MAYBE", otherwise nothing is selected at all. If this is how it's meant to be, maybe we could amend this example? Thanks! Eric
Re: Possible to exclude/include tags for agenda custom commands?
Hi Adam, Adam Porter writes: > Yes, I'd be glad for it to be listed on Worg. Feel free to add it if > you like, or I might add it myself after I add a bit more content. I'll let you add a link to your page on Worg when you have the time. > I was thinking about working on Worg rather than making yet another > resource, but: > > 1. I saw you mention that you're planning to reorganize Worg's content > soon, and I wouldn't want to interfere with that. Just to tell you a bit more about my plan: I will take the time to work on Worg next week, creating a dedicated branch and publishing it on orgmode.org/worg-next/ or something. > 2. I sometimes feel hesitant to put a lot of effort into curating and > organizing content on Worg because, like all wikis, that work can easily > be invalidated if others come along later and add content in random > places. Yes, I understand. Worg was a place to gather contributions when the Org users formed a small dedicated group. Org's "community" is larger now, and I think Org should be a place with less textual contents and more links to useful stuff. Like a giant structured FAQ, more than a giant... mess. > One of my goals for this "org-almanac" is to catalog content in a > somewhat canonical way, to avoid the "wiki effect." For this project, > I'd rather have less content that's organized more clearly, than have > lots of content scattered about. Of course, I don't presume to say that > the way I've done it is the best way, and I'm experimenting as I go. > > Anyway, do you have any more thoughts about these issues? I think that your goals for org-almanac resemble the ones I have for Worg: less content, clear structure, make it more maintainable, even collectively. Without sacrificing the current richness, of course. This will be more tangible when I start pushing worg-next/. Thanks, -- Bastien
Re: Possible to exclude/include tags for agenda custom commands?
Hi Bastien, Bastien writes: > Hi Adam, > > Adam Porter writes: > >> https://alphapapa.github.io/org-almanac/ > > this is a very nice list of resources! > > Do you think we can advertize it somewhere on Worg? > > If yes but are unsure *where*, just go ahead with whatever location > seems fine, we can always rearrange Worg's contents later on. Yes, I'd be glad for it to be listed on Worg. Feel free to add it if you like, or I might add it myself after I add a bit more content. I was thinking about working on Worg rather than making yet another resource, but: 1. I saw you mention that you're planning to reorganize Worg's content soon, and I wouldn't want to interfere with that. 2. I sometimes feel hesitant to put a lot of effort into curating and organizing content on Worg because, like all wikis, that work can easily be invalidated if others come along later and add content in random places. One of my goals for this "org-almanac" is to catalog content in a somewhat canonical way, to avoid the "wiki effect." For this project, I'd rather have less content that's organized more clearly, than have lots of content scattered about. Of course, I don't presume to say that the way I've done it is the best way, and I'm experimenting as I go. Anyway, do you have any more thoughts about these issues? Thanks, Adam
Re: Possible to exclude/include tags for agenda custom commands?
Hi Adam, Adam Porter writes: > https://alphapapa.github.io/org-almanac/ this is a very nice list of resources! Do you think we can advertize it somewhere on Worg? If yes but are unsure *where*, just go ahead with whatever location seems fine, we can always rearrange Worg's contents later on. thanks, -- Bastien
Re: Possible to exclude/include tags for agenda custom commands?
Stig Brautaset writes: > Hi Bastien, > > Bastien writes: >>> I can easily do this in the list of TODOs, with a tag search. However, I >>> haven't figured out how to do this for the agenda. Is it possible? If >>> so, how? >> >> From what I understand, check `org-agenda-tag-filter' to see how to >> use it within an agenda custom command. > > Thank you! That did indeed do it. > > FWIW my stanza looks like this now: > > (setq org-agenda-custom-commands > '(("w" "Work Agenda" > ((agenda "" ((org-agenda-span 'day))) > (todo "TODO" >((org-agenda-max-entries 5) > (org-agenda-todo-ignore-scheduled 'all) > (org-agenda-todo-ignore-deadlines 'all) > (org-agenda-todo-ignore-timestamp 'all > ((org-agenda-tag-filter '("-@home" "-MAYBE" >("h" "Home Agenda" > ((agenda "") > (todo "TODO" >((org-agenda-max-entries 5) > (org-agenda-todo-ignore-scheduled 'all) > (org-agenda-todo-ignore-deadlines 'all) > (org-agenda-todo-ignore-timestamp 'all > ((org-agenda-tag-filter '("-@work" "-MAYBE" >("m" "Maybe" > ((todo "PROJ") > (tags-todo "-PROJ/TODO")) > ((org-agenda-tag-filter '("MAYBE" >("P" "Projects" tags-todo "-MAYBE/PROJ" > > Stig Hi Stig, Thanks for sharing that. I think this is a fairly common question among Org users, yet not always easy to find the answer to, so I've added your example here along with a couple of other solutions: https://alphapapa.github.io/org-almanac/#Exclude%20and%20include%20tags%20in%20custom%20Agenda%20commands
Re: Possible to exclude/include tags for agenda custom commands?
Hi Stig, Stig Brautaset writes: > Thank you! That did indeed do it. Thanks for confirming... > FWIW my stanza looks like this now: ... and sharing. Best, -- Bastien
Re: Possible to exclude/include tags for agenda custom commands?
Hi Bastien, Bastien writes: >> I can easily do this in the list of TODOs, with a tag search. However, I >> haven't figured out how to do this for the agenda. Is it possible? If >> so, how? > > From what I understand, check `org-agenda-tag-filter' to see how to > use it within an agenda custom command. Thank you! That did indeed do it. FWIW my stanza looks like this now: (setq org-agenda-custom-commands '(("w" "Work Agenda" ((agenda "" ((org-agenda-span 'day))) (todo "TODO" ((org-agenda-max-entries 5) (org-agenda-todo-ignore-scheduled 'all) (org-agenda-todo-ignore-deadlines 'all) (org-agenda-todo-ignore-timestamp 'all ((org-agenda-tag-filter '("-@home" "-MAYBE" ("h" "Home Agenda" ((agenda "") (todo "TODO" ((org-agenda-max-entries 5) (org-agenda-todo-ignore-scheduled 'all) (org-agenda-todo-ignore-deadlines 'all) (org-agenda-todo-ignore-timestamp 'all ((org-agenda-tag-filter '("-@work" "-MAYBE" ("m" "Maybe" ((todo "PROJ") (tags-todo "-PROJ/TODO")) ((org-agenda-tag-filter '("MAYBE" ("P" "Projects" tags-todo "-MAYBE/PROJ" Stig
Re: Possible to exclude/include tags for agenda custom commands?
Hi Stig, Stig Brautaset writes: > I can easily do this in the list of TODOs, with a tag search. However, I > haven't figured out how to do this for the agenda. Is it possible? If > so, how? >From what I understand, check `org-agenda-tag-filter' to see how to use it within an agenda custom command. HTH, -- Bastien
Possible to exclude/include tags for agenda custom commands?
I use Org agenda to manage both work and non-work TODOs. I tend to use the tags @home, @work. When at work I don't want to distractions from @home stuff, and vice versa. In a work context I would like an agenda view that excludes anything tagged with @home, and a list of the 5 highest priority non-@home tasks. Vice versa for a home context I want to exclude @work stuff. Items with neither tag should show up in both views. I can easily do this in the list of TODOs, with a tag search. However, I haven't figured out how to do this for the agenda. Is it possible? If so, how? If it's not possible, can I skip the agenda and instead create a separate tags-todo search that shows a list of only those scheduled / timestamped / deadlined for today in a separate stanza, so they stand out from the unscheduled ones? Here's what I'm currently using. The tags-todo search works as I like, but I can't figure out how to exclude agenda items with certain tags from the agendas. (setq org-agenda-custom-commands '(("w" "Work Agenda" ((agenda "" ((org-agenda-span 'day))) (tags-todo "-@home-MAYBE/TODO" ((org-agenda-max-entries 5) (org-agenda-todo-ignore-scheduled 'all) (org-agenda-todo-ignore-deadlines 'all) (org-agenda-todo-ignore-timestamp 'all) ("h" "Home Agenda" ((agenda "") (tags-todo "-@work-MAYBE/TODO" ((org-agenda-max-entries 5) (org-agenda-todo-ignore-scheduled 'all) (org-agenda-todo-ignore-deadlines 'all) (org-agenda-todo-ignore-timestamp 'all) ("m" "Maybe" ((tags-todo "MAYBE/PROJ") (tags-todo "MAYBE-PROJ/TODO"))) ("P" "Projects" tags-todo "-MAYBE/PROJ"))) Stig