Hi Nicolas,

I've addressed each of your points in my updated patch (attached).

Thanks,
Jason

On Tue, Nov 26, 2019 at 3:22 AM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
Hello,

Jason <jasondunsmore@gmail.com> writes:

> Please find my attached patch which implements a way to capture entries
> grouped by month.

Thank you.

> I was searching for this option, but only found a way to group entries by
> week or day.
>
> I found the following posts where other people also need this feature:
> https://emacs.stackexchange.com/questions/48414/monthly-date-tree
> https://lists.gnu.org/archive/html/emacs-orgmode/2018-02/msg00092.html

I think this can be tested in "next" branch. Could you rebase your patch
against it?

> * etc/ORG-NEWS: Document new `:tree-type month' option.

No need to provide this information in the commit message, IMO. Of
course, it doesn't hurt in any case. Just sayin'.

> +    Use ~week~ to make a week tree instead of the month-day tree,
> +    i.e., place the headings for each day under a heading with the
> +    current ISO week. Use @code{month} to group entries by month
> +    only. Default is to group entries by day.

You need to put two spaces after full stops.

> +         (cond
> +          ((eq (org-capture-get :tree-type) 'week)
> +           #'org-datetree-find-iso-week-create)
> +          ((eq (org-capture-get :tree-type) 'month)
> +           #'org-datetree-find-month-create)
> +          (t
> +           #'org-datetree-find-date-create))

Could you refactor that with `case' instead? I.e.,

    (case (org-capture-get :tree-type)
     (`week ...)
     ...)
> +      (if (eq time-grouping 'day)
> +       (org-datetree--find-create
> +        "^\\*+[ \t]+%d-%02d-\\([0123][0-9]\\) \\w+$"
> +        year month day)))))

Please use `when' (or `unless') instead of one-armed `if'.

Could you send an updated patch?

Regards,

--
Nicolas Goaziou