[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATCH] org-clock: Fix CLOCK_INTO_DRAWER property check
From: |
Nicolas Goaziou |
Subject: |
Re: [O] [PATCH] org-clock: Fix CLOCK_INTO_DRAWER property check |
Date: |
Thu, 16 Oct 2014 22:25:10 +0200 |
Hello,
Kyle Meyer <address@hidden> writes:
> A question on Stack Overflow [1] reported an issue overriding
> `org-clock-into-drawer' with properties (specifically, overriding a
> global value of t with a property value nil). Looking into the function
> `org-clock-into-drawer', the actual behavior did not match the
> documented behavior. The attached patch should fix the issue.
Thanks for the patch.
> - (let ((p (org-entry-get nil "CLOCK_INTO_DRAWER" 'inherit))
> - (q (org-entry-get nil "LOG_INTO_DRAWER" 'inherit)))
> + (let ((p (org-entry-get nil "CLOCK_INTO_DRAWER" 'inherit t))
> + (q (org-entry-get nil "LOG_INTO_DRAWER" 'inherit t)))
> (cond
> - ((or (not (or p q)) (equal p "nil") (equal q "nil"))
> org-clock-into-drawer)
> - ((or (equal p "t") (equal q "t")) "LOGBOOK")
> - ((not p) q)
> - (t p))))
> + ((not (or p q)) org-clock-into-drawer)
> + ((equal p "nil") nil)
> + ((equal p "t") "LOGBOOK")
> + ((equal q "nil") nil)
> + ((equal q "t") "LOGBOOK"))))
This is wrong.
If p is a string, e.g. "FOO", return value should be "FOO". Ditto if
q contains a string.
Regards,
--
Nicolas Goaziou