From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Dunn Subject: Bug in Sticky Agendas Date: Sat, 30 Dec 2017 22:00:54 -0500 Message-ID: <87shbriot5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45653) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVTtP-0003zw-77 for emacs-orgmode@gnu.org; Sat, 30 Dec 2017 22:02:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eVTtO-0003Ct-HO for emacs-orgmode@gnu.org; Sat, 30 Dec 2017 22:02:31 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46644) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVTtO-0003B3-Bx for emacs-orgmode@gnu.org; Sat, 30 Dec 2017 22:02:30 -0500 Received: from [2604:6000:1006:8725:afb2:757c:dc05:6d23] (port=54444 helo=escafil) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eVTtN-0001AR-Mm for emacs-orgmode@gnu.org; Sat, 30 Dec 2017 22:02:30 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain I've got a few tasks that I don't want appearing in the daily agenda, so I tag them with agenda_exclude and set org-agenda-skip-function to skip any entries with that tag for my daily agenda: --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline Content-Transfer-Encoding: quoted-printable (defun id/org-skip-by-tag (&rest tags) (if (not (apply 'org-entry-has-tags-p tags)) nil (save-excursion (outline-next-visible-heading 1) (point)))) (let* ((agenda-skip '(org-agenda-skip-function (lambda nil (id/org-skip-by-tag "agenda_exclude")))= )) (setq org-agenda-custom-commands `(("d" "Day View" agenda "" ((org-agenda-span 'day) ,agenda-skip)) ("T" . "Tags View") ("Tn" "Nightly" tags-todo "nightly&TODO=3D=3D\"TODO\"")))) --=-=-= Content-Type: text/plain As you can see, I've got a second agenda view for my nightly checklist. So here's my problem: the skip-function is unset if I try using the nightly view. To reproduce: 0. Turn on sticky agendas 1. C-c a d (day view agenda) 2. C-c q (quit-window) 3. C-c a T n (Nightly view) 4. Switch back to day view agenda 5. 'r' (org-agenda-redo) Now the excluded tasks appear in the day view agenda, whereas they didn't before. -- Ian Dunn --=-=-=--