From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [Patch] Support for dimming local to each agenda Date: Thu, 13 Jul 2017 14:51:53 +0200 Message-ID: <8760ewfqja.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43887) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVdb5-0006dF-W1 for emacs-orgmode@gnu.org; Thu, 13 Jul 2017 08:52:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVdb2-0000LP-QD for emacs-orgmode@gnu.org; Thu, 13 Jul 2017 08:52:00 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:52134) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dVdb2-0000L7-JH for emacs-orgmode@gnu.org; Thu, 13 Jul 2017 08:51:56 -0400 In-Reply-To: (Yuri Lensky's message of "Tue, 11 Jul 2017 17:39:59 -0700") 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: Yuri Lensky Cc: "emacs-orgmode@gnu.org" Hello, Yuri Lensky writes: > Composite agenda views can now set org-agenda-dim-blocked-tasks locally. > From 52f8bf79a198fa2e7f131c2a015a7c9400a403ac Mon Sep 17 00:00:00 2001 > From: "Yuri D. Lensky" > Date: Mon, 10 Jul 2017 19:21:39 -0700 > Subject: [PATCH 2/2] org-agenda.el: Support for dimming local to each > agenda. Thank you. Some comments follow. > Composite agenda views could not separately specify whether to dim > blocked tasks. The commit message is lacking information about modified and created functions, e.g., lisp/org-agenda.el (org-agenda-mark-blocked-entry): New function. ... > +(defun org-agenda-mark-blocked-entry (entry) Since this is meant to be an internal function, I suggest to name it `org-agenda--mark-blocked-entry'. > + "Mark a blocked entry in text properties." The docstring should specifiy what ENTRY is. > + (when (get-text-property 0 'todo-state entry) > + (let ((entry-marker (get-text-property 0 'org-hd-marker entry)) > + (org-blocked-by-checkboxes nil) > + ;; Necessary so that org-entry-blocked-p does not change the buffer `org-entry-blocked-p' Missing full stop, too. > + (org-depend-tag-blocked nil)) > + (let ((blocked > + (with-current-buffer (marker-buffer entry-marker) > + (save-mark-and-excursion Why is `save-mark-and-excursion' needed? > + (when (and org-agenda-dim-blocked-tasks org-blocker-hook) > + (setq list (mapcar 'org-agenda-mark-blocked-entry list))) Nitpick: (mapcar #'org-agenda-mark-blocked-entry list) Bonus points if you can write tests in test-org-agenda.el. Regards, -- Nicolas Goaziou