emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Assistance Writing Test for Org Agenda Custom Bulk Function


From: Kevin Foley
Subject: Re: Assistance Writing Test for Org Agenda Custom Bulk Function
Date: Thu, 18 Feb 2021 09:08:47 -0500

Kyle Meyer <kyle@kyleam.com> writes:

> Unrelated note: there's a missing a space between the second "*" and
> "TODO".

Good catch, thank you.

> Perhaps you're not capturing the environment due to your quoting:
>
>   ;; -*- lexical-binding: t; -*-
>
>   (let ((x 0))
>     '(t (lambda () x)))  ;; => (y (lambda nil x))
>   
>   (let ((x 0))
>     (list t (lambda () x)))  ;; => (t (closure ((x . 0) t) nil x))
>
> So try something like
>
>   (org-agenda-bulk-custom-functions
>    `((?P ,(lambda (&rest args)
>             (message "test" args)
>             (setq f-called-cnt (1+ f-called-cnt)
>                   f-called-args args))
>          ,(lambda ()
>             (setq arg-f-call-cnt (1+ arg-f-call-cnt))
>             '(1 2 3)))))

This was exactly it, thank you.  I'll hopefully have this in a patch
shortly.

Kevin




reply via email to

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