[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Bug: / RET filter no longer auto-excludes FILETAGS [6.33tr

From: Carsten Dominik
Subject: Re: [Orgmode] Bug: / RET filter no longer auto-excludes FILETAGS [6.33trans (release_6.33f.34.gf806)]
Date: Thu, 26 Nov 2009 07:02:00 +0100

On Nov 25, 2009, at 7:54 PM, Bernt Hansen wrote:

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen. You don't know how to make a good report? See


Your bug report will be posted to the Org-mode mailing list.

I have a function that excludes tasks in the agenda using / RET
(auto-exclude.)  This works in release_6.33f but is broken on the
current master.

One of the following commits breaks it:

There are only 'skip'ped commits left to test.
The first bad commit could be any of:

Excluding tasks by FILETAGS only breaks for me.

The tag 'MARK' is a


entry only in mark.org.  Auto Exclusion of the MARK tag no longer
works with the current master.

My auto exclude functions are inline below:


--8<---------------cut here---------------start------------->8---
(defun bh/weekday-p ()
 (let ((wday (nth 6 (decode-time))))
   (and (< wday 6)
         (> wday 0))))

(defun bh/working-p ()
 (let ((hour (nth 2 (decode-time))))
   (and (bh/weekday-p)
         (or (and (>= hour 8) (<= hour 11))
             (and (>= hour 13) (<= hour 16))))))

(defun bh/mark-p ()
 (let ((hour (nth 2 (decode-time))))
   (or (and (bh/weekday-p)
             (or (= hour 8)
                 (and (>= hour 16) (<= hour 20))))
        (and (not (bh/weekday-p))
             (>= hour 9)
             (<= hour 20)))))

(defun bh/org-auto-exclude-function (tag)
 (and (cond
        ((string= tag "@home")
        ((string= tag "@office")
         (not (bh/working-p)))
        ((string= tag "MARK")
         (not (bh/mark-p)))
        ((or (string= tag "@errand") (string= tag "PHONE"))
         (let ((hour (nth 2 (decode-time))))
           (or (< hour 8) (> hour 21)))))
      (concat "-" tag)))

(setq org-agenda-auto-exclude-function 'bh/org-auto-exclude-function)

Hi Bernt,

do you get it back to when when replacing "MARK" with "mark" and
"PHONE" wiht "phone"?

- Carsten

reply via email to

[Prev in Thread] Current Thread [Next in Thread]