emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* help with gnus-icalendar.el and orgmode agenda
@ 2024-02-07 20:41 Stephen J. Eglen
  2024-02-07 22:55 ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen J. Eglen @ 2024-02-07 20:41 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org; +Cc: Jan Tatarik

hi,

I have the following snippet set up so that mu4e will parse icalendar
attachments and add them to an org file ... this seems to be the
standard prescription:

(when (fboundp 'gnus-icalendar-org-setup)
  (setq gnus-icalendar-org-capture-file "~/todo.org")
  (setq gnus-icalendar-org-capture-headline '("Calendar"))
  (gnus-icalendar-org-setup))

gnus-icalendar.el is part of Emacs, authored by Jan Tatarik (cc'ed).

When I use this package on icalendar attachments, it creates entries
that look like this:

** [#B] subject of email
:PROPERTIES:
:ICAL_EVENT: t
...
:END:

   <2024-02-22 18:30-20:00>

Note that the timestamp DOES NOT include a day of the week.  With the
default settings of org-time-stamp-formats, i.e. 

("%Y-%m-%d %a" . "%Y-%m-%d %a %H:%M")

this means that the agenda does not show this entry -- which defeats the
purpose of me saving the icalendar entry!  If I manually add the dayname
then the agenda item appears.

Looking inside gnus-icalendar.el, the relevant defun seems to be
gnus-icalendar-event--org-timestamp that creates the timestamp.
e.g. it includes this text to generate the timestamp:

   (format "<%s %s-%s%s>" start-date start-time end-time repeat)

which does not include the dayname.

What is the best way to improve this code?

Best wishes,

Stephen


 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-02-08 15:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-07 20:41 help with gnus-icalendar.el and orgmode agenda Stephen J. Eglen
2024-02-07 22:55 ` Ihor Radchenko
2024-02-07 23:20   ` Stephen J. Eglen
2024-02-08 15:03   ` Ihor Radchenko

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).