emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Screenshot of agenda: agenda is not shown in time


From: Karl Voit
Subject: Re: [O] Screenshot of agenda: agenda is not shown in time
Date: Fri, 15 Apr 2016 17:39:10 +0200
User-agent: slrn/pre1.0.0-18 (Linux)

* Michael Welle <address@hidden> wrote:
> Hello,

Hi Michael!

> Karl Voit <address@hidden> writes:
>
>> I'd like to get a screenshot (PNG) of an agenda of mine by following
>> snippet:
[...]
>>   (sleep-for 1)
> waits without updating the display. Mayby that is the problem? Try
> sit-for.

You seem to have found the root cause. What works at my side:

(defun my-export-month-agenda-to-png-via-screenshot()
  (interactive)
  (org-agenda nil "n") ; generates agenda "n" (one month without todos)
  (if (my-buffer-exists "*Org Agenda*")
  (switch-to-buffer "*Org Agenda*")
    (org-agenda-list)
    )
  (message "Waiting for Screenshot ...")
  (sit-for 1)
  (message "Say cheese ...")

  (setq myoutput
        (shell-command-to-string "/usr/bin/import -window root 
/home/vk/agenda.png"))
  (message (concat "Screenshot done (" myoutput ")"))
  )

HTH

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
       > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




reply via email to

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