emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Yuri Lensky <ydl@ydl.cm>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: [Patch] Support for dimming local to each agenda
Date: Thu, 13 Jul 2017 14:51:53 +0200	[thread overview]
Message-ID: <8760ewfqja.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CAC38U-cThtaELpmhUefQHtkjvDdcWyhP8vpsn_YiWMdj6ORJdQ@mail.gmail.com> (Yuri Lensky's message of "Tue, 11 Jul 2017 17:39:59 -0700")

Hello,

Yuri Lensky <ydl@ydl.cm> 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" <ydlensky@gmail.com>
> 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

  reply	other threads:[~2017-07-13 12:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-12  0:39 [Patch] Support for dimming local to each agenda Yuri Lensky
2017-07-13 12:51 ` Nicolas Goaziou [this message]
2017-07-13 18:09   ` Yuri Lensky
2017-07-14  8:29     ` Nicolas Goaziou
2017-07-14  9:22       ` Yuri Lensky
2017-07-14  9:39         ` Nicolas Goaziou
2017-07-14 12:18           ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8760ewfqja.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=ydl@ydl.cm \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).