[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Bug in Sticky Agendas
From: |
Ian Dunn |
Subject: |
Re: [O] Bug in Sticky Agendas |
Date: |
Fri, 05 Jan 2018 18:15:05 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) |
>>>>> "Ian" == Ian Dunn <address@hidden> writes:
Ian> I've got a few tasks that I don't want appearing in the
Ian> daily agenda, so I tag them with agenda_exclude and set
Ian> org-agenda-skip-function to skip any entries with that tag for
Ian> my daily agenda:
Ian> (defun id/org-skip-by-tag (&rest tags) (if (not (apply
Ian> 'org-entry-has-tags-p tags)) nil (save-excursion
Ian> (outline-next-visible-heading 1) (point))))
Ian> (let* ((agenda-skip '(org-agenda-skip-function (lambda nil
Ian> (id/org-skip-by-tag "agenda_exclude"))))) (setq
Ian> org-agenda-custom-commands `(("d" "Day View" agenda ""
Ian> ((org-agenda-span 'day) ,agenda-skip)) ("T" . "Tags View")
Ian> ("Tn" "Nightly" tags-todo "nightly&TODO==\"TODO\""))))
Ian> As you can see, I've got a second agenda view for my nightly
Ian> checklist. So here's my problem: the skip-function is unset if
Ian> I try using the nightly view.
I went ahead and looked into this myself. Looks like the issue is that the
properties (lprops) are set using symbol properties with
org-agenda-redo-command, which is buffer-local. However, according to the
elisp manual (at least for the upcoming 26.1 release), symbol properties aren't
buffer-local; only the value itself is. Thus, lprops are overridden by a new
agenda.
I've created the following patch to address this. The symbol property is used
as a temporary variable, but the actual lprops are stored as a buffer-local
variable to each agenda buffer.
org.diff
Description: Text Data
--
Ian Dunn
- Re: [O] Bug in Sticky Agendas,
Ian Dunn <=