* Michael Welle <mwe012...@gmx.net> wrote: > Hello, Hi Michael!
> Karl Voit <devn...@karl-voit.at> 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