[Top][All Lists]

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

Re: [O] [Patch] Support for dimming local to each agenda

From: Yuri Lensky
Subject: Re: [O] [Patch] Support for dimming local to each agenda
Date: Thu, 13 Jul 2017 11:09:39 -0700

Thanks. I have attached an updated patch that addresses your points (with some additional cleanup).

On Thu, Jul 13, 2017 at 5:51 AM, Nicolas Goaziou <address@hidden> wrote:

Yuri Lensky <address@hidden> 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" <address@hidden>
> 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

> +  "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


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?
Because we are moving point to get to the heading, and in principle hooks in org-blocker-hook can change point/mark. 

> +    (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.
Don't have time at the moment, but as this is a fairly simple feature it is easy to see if it works.


Nicolas Goaziou

Attachment: 0001-org-agenda.el-Support-for-dimming-local-to-each-agen.patch
Description: Binary data

reply via email to

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