From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] org-clock: Fix CLOCK_INTO_DRAWER property check Date: Thu, 16 Oct 2014 23:01:36 +0200 Message-ID: <874mv33f0v.fsf@nicolasgoaziou.fr> References: <87d29rajwv.fsf@kmlap.domain.org> <878ukf3gpl.fsf@nicolasgoaziou.fr> <87wq7z92bp.fsf@kmlap.domain.org> <87siin91qr.fsf@kmlap.domain.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XesAO-0004Nv-6G for emacs-orgmode@gnu.org; Thu, 16 Oct 2014 17:01:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XesAH-00006i-Cn for emacs-orgmode@gnu.org; Thu, 16 Oct 2014 17:01:00 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:54976) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XesAH-00006W-6V for emacs-orgmode@gnu.org; Thu, 16 Oct 2014 17:00:53 -0400 In-Reply-To: <87siin91qr.fsf@kmlap.domain.org> (Kyle Meyer's message of "Thu, 16 Oct 2014 16:51:56 -0400") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Kyle Meyer Cc: Org-mode Kyle Meyer writes: > This new patch should handle that correctly. Thanks. > (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") > + (t (or p q))))) Actually, it doesn't work either. Under some circumstances (e.g, when p is a drawer name and q is "t"), q will have precedence over p, which is not desirable. What about this? (cond ((equal p "nil") nil) ((equal p "t") t) (p) ((equal q "nil") nil) ((equal q "t") t) (q) (t org-clock-into-drawer)) Regards,