Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mu4e rfe] Create calendar invitation #2308

Open
mankoff opened this issue Jul 29, 2022 · 8 comments
Open

[mu4e rfe] Create calendar invitation #2308

mankoff opened this issue Jul 29, 2022 · 8 comments
Labels
calendar icalendar-related issue mu4e specific for mu4e rfe

Comments

@mankoff
Copy link

mankoff commented Jul 29, 2022

Now that we can view and accept calendar invitations in mu4e, it would be nice to be able to generate them, using mu4e and the Org-style calendar interface for scheduling.

@mankoff mankoff added mu4e specific for mu4e new rfe labels Jul 29, 2022
@djcb djcb removed the new label Aug 2, 2022
@djcb
Copy link
Owner

djcb commented Aug 2, 2022

Would be useful -- if gnus has support we might be able re-use that; otherwise, it'd be a big job!

@mankoff
Copy link
Author

mankoff commented Aug 2, 2022

Or maybe Org has some support and we could reuse that too.

@djcb
Copy link
Owner

djcb commented Aug 2, 2022

Please research and share your findings!

@djcb djcb added the calendar icalendar-related issue label Aug 21, 2022
@mankoff
Copy link
Author

mankoff commented Oct 11, 2022 via email

@sje30
Copy link
Contributor

sje30 commented Dec 31, 2022

I have been thinking about the same functionality.

Here is a prototype.

In an draft Messages buffer, insert some text in the middle of your message like:


* team meeting

 this is a test meeting

<2022-12-31 Sat 14:00-15:00>

and then mark that region and run the following defun region-to-ics

which will then attach an .ics event. I've verified that Outlook on the web can parse this ics and save it to the online outlook calendar. What doesn't yet work is the gnus-icalendar code; it marks it as such:


[2. Invitation summary --- text/calendar; inviteNiUsEg.ics]...

[ Uninvited Accept ]    [ Uninvited Tentative ]    [ Uninvited Decline ]    

[ Show Agenda ]    

Summary:    team meeting
Location:   
Time:       <2022-12-31 14:00-15:00>
Organizer:  
Attendance: You are not listed as an attendee
Method:     nil

this is a test meeting

<2022-12-31 Sat 14:00>–<2022-12-31 Sat 15:00>

and hitting the uninvited accept button generates the message: This is a pseudo article.

So, work in progress. Feedback welcome!

(defun region-to-ics (beg end)
  (interactive "r")
  (let* (
	 (text (buffer-substring-no-properties beg end))
	 (filename (make-temp-file "invite" nil ".org" text))
	 ics-file
	 )
    (find-file filename)
    (org-icalendar-export-to-ics)
    (kill-buffer)
    (setq ics-file
	  (concat (file-name-sans-extension filename) ".ics")
	  )
    (mml-attach-file ics-file "text/calendar" "Invitation summary" "attachment")
    ))

@ericsfraga
Copy link

I was about to try your code and found some code that I already had in my config. It has been there since before 2013. I am not sure where I got it from, however, so I cannot give proper attribution. I had to update it slightly to work with message mode currently.

It seems to work from my limited testing.

Given the lack of provenance information, I don't know whether it should be used directly but you could definitely get some ideas for updating your code maybe?

@sje30
Copy link
Contributor

sje30 commented Jan 1, 2023

Thanks Eric. I'll rewrite and then we can GPL it.

@dschwilk
Copy link

dschwilk commented Oct 2, 2023

Is the code at the pastebin link above meant to work with current message mode? I had trouble using it in mu4e message mode as is. I see the note above: "I had to update it slightly to work with message mode currently."

If there is any progress towards this, I am happy to help test. I use mu4e with org mode and regularly receive ics invitations from folks at my university which works great. I save the invitations to org and then org-caldav syncs my org agenda with my nextcloud calendar). It would be nice to be able to /send/ invitations based on my org events with timestamps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
calendar icalendar-related issue mu4e specific for mu4e rfe
Projects
None yet
Development

No branches or pull requests

5 participants