Nick Dokos <nicholas.do...@hp.com> wrote:

> Adding
> 
>       ...
>       (org-agenda-start-day (ndk/org-first-of-month))
>       (org-agenda-span 'month)
>       ...
> 
> to your custom agenda command, with
> 
> (defun ndk/org-first-of-month ()
>   (let ((d (calendar-current-date)))
>     (calendar-absolute-from-gregorian (list (car d) 1 (caddr d)))))
> 
> should do it.
> 

Same thing but somewhat more readable:

--8<---------------cut here---------------start------------->8---
(defun ndk/org-first-of-month ()
  (let* ((d (calendar-current-date))
         (m (calendar-extract-month d))
         (y (calendar-extract-year d)))
    (calendar-absolute-from-gregorian (list m 1 y))))
--8<---------------cut here---------------end--------------->8---

Nick

Reply via email to