emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Possible to exclude/include tags for agenda custom commands?
@ 2020-02-12 19:03 Stig Brautaset
  2020-02-12 22:30 ` Bastien
  0 siblings, 1 reply; 18+ messages in thread
From: Stig Brautaset @ 2020-02-12 19:03 UTC (permalink / raw)
  To: emacs-orgmode


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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Possible to exclude/include tags for agenda custom commands?
  2020-02-12 19:03 Possible to exclude/include tags for agenda custom commands? Stig Brautaset
@ 2020-02-12 22:30 ` Bastien
  2020-02-13 19:39   ` Stig Brautaset
  0 siblings, 1 reply; 18+ messages in thread
From: Bastien @ 2020-02-12 22:30 UTC (permalink / raw)
  To: Stig Brautaset; +Cc: emacs-orgmode

Hi Stig,

Stig Brautaset <stig@brautaset.org> 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Possible to exclude/include tags for agenda custom commands?
  2020-02-12 22:30 ` Bastien
@ 2020-02-13 19:39   ` Stig Brautaset
  2020-02-14 10:02     ` Bastien
                       ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Stig Brautaset @ 2020-02-13 19:39 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode


Hi Bastien,

Bastien <bzg@gnu.org> 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Possible to exclude/include tags for agenda custom commands?
  2020-02-13 19:39   ` Stig Brautaset
@ 2020-02-14 10:02     ` Bastien
  2020-02-14 22:05     ` Adam Porter
  2020-02-20 16:50     ` Eric Abrahamsen
  2 siblings, 0 replies; 18+ messages in thread
From: Bastien @ 2020-02-14 10:02 UTC (permalink / raw)
  To: Stig Brautaset; +Cc: emacs-orgmode

Hi Stig,

Stig Brautaset <stig@brautaset.org> writes:

> Thank you! That did indeed do it.

Thanks for confirming...

> FWIW my stanza looks like this now:

... and sharing.

Best,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Possible to exclude/include tags for agenda custom commands?
  2020-02-13 19:39   ` Stig Brautaset
  2020-02-14 10:02     ` Bastien
@ 2020-02-14 22:05     ` Adam Porter
  2020-02-18 13:05       ` Bastien
  2020-02-20 16:50     ` Eric Abrahamsen
  2 siblings, 1 reply; 18+ messages in thread
From: Adam Porter @ 2020-02-14 22:05 UTC (permalink / raw)
  To: emacs-orgmode

Stig Brautaset <stig@brautaset.org> writes:

> Hi Bastien,
>
> Bastien <bzg@gnu.org> 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Possible to exclude/include tags for agenda custom commands?
  2020-02-14 22:05     ` Adam Porter
@ 2020-02-18 13:05       ` Bastien
  2020-02-20  3:57         ` Adam Porter
  0 siblings, 1 reply; 18+ messages in thread
From: Bastien @ 2020-02-18 13:05 UTC (permalink / raw)
  To: Adam Porter; +Cc: emacs-orgmode

Hi Adam,

Adam Porter <adam@alphapapa.net> 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Possible to exclude/include tags for agenda custom commands?
  2020-02-18 13:05       ` Bastien
@ 2020-02-20  3:57         ` Adam Porter
  2020-02-20  7:23           ` Bastien
  0 siblings, 1 reply; 18+ messages in thread
From: Adam Porter @ 2020-02-20  3:57 UTC (permalink / raw)
  To: emacs-orgmode

Hi Bastien,

Bastien <bzg@gnu.org> writes:

> Hi Adam,
>
> Adam Porter <adam@alphapapa.net> 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Possible to exclude/include tags for agenda custom commands?
  2020-02-20  3:57         ` Adam Porter
@ 2020-02-20  7:23           ` Bastien
  0 siblings, 0 replies; 18+ messages in thread
From: Bastien @ 2020-02-20  7:23 UTC (permalink / raw)
  To: Adam Porter; +Cc: emacs-orgmode

Hi Adam,

Adam Porter <adam@alphapapa.net> 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Possible to exclude/include tags for agenda custom commands?
  2020-02-13 19:39   ` Stig Brautaset
  2020-02-14 10:02     ` Bastien
  2020-02-14 22:05     ` Adam Porter
@ 2020-02-20 16:50     ` Eric Abrahamsen
  2020-02-20 17:24       ` Bastien
  2 siblings, 1 reply; 18+ messages in thread
From: Eric Abrahamsen @ 2020-02-20 16:50 UTC (permalink / raw)
  To: Stig Brautaset; +Cc: Bastien, emacs-orgmode

Stig Brautaset <stig@brautaset.org> writes:

> Hi Bastien,
>
> Bastien <bzg@gnu.org> 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Possible to exclude/include tags for agenda custom commands?
  2020-02-20 16:50     ` Eric Abrahamsen
@ 2020-02-20 17:24       ` Bastien
  2020-02-20 17:48         ` Eric Abrahamsen
  0 siblings, 1 reply; 18+ messages in thread
From: Bastien @ 2020-02-20 17:24 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: emacs-orgmode, Stig Brautaset

Hi Eric,

Eric Abrahamsen <eric@ericabrahamsen.net> 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Possible to exclude/include tags for agenda custom commands?
  2020-02-20 17:24       ` Bastien
@ 2020-02-20 17:48         ` Eric Abrahamsen
  2020-02-20 19:02           ` Eric Abrahamsen
  0 siblings, 1 reply; 18+ messages in thread
From: Eric Abrahamsen @ 2020-02-20 17:48 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode, Stig Brautaset

Bastien <bzg@gnu.org> writes:

> Hi Eric,
>
> Eric Abrahamsen <eric@ericabrahamsen.net> 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!

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Possible to exclude/include tags for agenda custom commands?
  2020-02-20 17:48         ` Eric Abrahamsen
@ 2020-02-20 19:02           ` Eric Abrahamsen
  2020-02-20 19:08             ` Bastien
  0 siblings, 1 reply; 18+ messages in thread
From: Eric Abrahamsen @ 2020-02-20 19:02 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode, Stig Brautaset

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Bastien <bzg@gnu.org> writes:
>
>> Hi Eric,
>>
>> Eric Abrahamsen <eric@ericabrahamsen.net> 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?

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Possible to exclude/include tags for agenda custom commands?
  2020-02-20 19:02           ` Eric Abrahamsen
@ 2020-02-20 19:08             ` Bastien
  2020-02-20 19:51               ` Eric Abrahamsen
  0 siblings, 1 reply; 18+ messages in thread
From: Bastien @ 2020-02-20 19:08 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: emacs-orgmode, Stig Brautaset

Hi Eric,

Eric Abrahamsen <eric@ericabrahamsen.net> 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Possible to exclude/include tags for agenda custom commands?
  2020-02-20 19:08             ` Bastien
@ 2020-02-20 19:51               ` Eric Abrahamsen
  2020-02-23 13:24                 ` Bastien
  0 siblings, 1 reply; 18+ messages in thread
From: Eric Abrahamsen @ 2020-02-20 19:51 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Bastien <bzg@gnu.org> writes:

> Hi Eric,
>
> Eric Abrahamsen <eric@ericabrahamsen.net> 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Possible to exclude/include tags for agenda custom commands?
  2020-02-20 19:51               ` Eric Abrahamsen
@ 2020-02-23 13:24                 ` Bastien
  2020-02-23 20:55                   ` Eric Abrahamsen
  0 siblings, 1 reply; 18+ messages in thread
From: Bastien @ 2020-02-23 13:24 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: emacs-orgmode

Hi Eric,

Eric Abrahamsen <eric@ericabrahamsen.net> 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Possible to exclude/include tags for agenda custom commands?
  2020-02-23 13:24                 ` Bastien
@ 2020-02-23 20:55                   ` Eric Abrahamsen
  2020-02-24  9:14                     ` Bastien
  0 siblings, 1 reply; 18+ messages in thread
From: Eric Abrahamsen @ 2020-02-23 20:55 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

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

Bastien <bzg@gnu.org> writes:

> Hi Eric,
>
> Eric Abrahamsen <eric@ericabrahamsen.net> 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


[-- Attachment #2: startup.el --]
[-- Type: text/plain, Size: 246 bytes --]

(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)

[-- Attachment #3: test.org --]
[-- Type: application/vnd.lotus-organizer, Size: 97 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Possible to exclude/include tags for agenda custom commands?
  2020-02-23 20:55                   ` Eric Abrahamsen
@ 2020-02-24  9:14                     ` Bastien
  2020-02-24 17:03                       ` Eric Abrahamsen
  0 siblings, 1 reply; 18+ messages in thread
From: Bastien @ 2020-02-24  9:14 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: emacs-orgmode

Hi Eric,

Eric Abrahamsen <eric@ericabrahamsen.net> 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Possible to exclude/include tags for agenda custom commands?
  2020-02-24  9:14                     ` Bastien
@ 2020-02-24 17:03                       ` Eric Abrahamsen
  0 siblings, 0 replies; 18+ messages in thread
From: Eric Abrahamsen @ 2020-02-24 17:03 UTC (permalink / raw)
  To: emacs-orgmode

Bastien <bzg@gnu.org> writes:

> Hi Eric,
>
> Eric Abrahamsen <eric@ericabrahamsen.net> 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2020-02-24 17:03 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-12 19:03 Possible to exclude/include tags for agenda custom commands? Stig Brautaset
2020-02-12 22:30 ` Bastien
2020-02-13 19:39   ` Stig Brautaset
2020-02-14 10:02     ` Bastien
2020-02-14 22:05     ` Adam Porter
2020-02-18 13:05       ` Bastien
2020-02-20  3:57         ` Adam Porter
2020-02-20  7:23           ` Bastien
2020-02-20 16:50     ` Eric Abrahamsen
2020-02-20 17:24       ` Bastien
2020-02-20 17:48         ` Eric Abrahamsen
2020-02-20 19:02           ` Eric Abrahamsen
2020-02-20 19:08             ` Bastien
2020-02-20 19:51               ` Eric Abrahamsen
2020-02-23 13:24                 ` Bastien
2020-02-23 20:55                   ` Eric Abrahamsen
2020-02-24  9:14                     ` Bastien
2020-02-24 17:03                       ` Eric Abrahamsen

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).