unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: James Thomas via "Emacs development discussions." <emacs-devel@gnu.org>
To: emacs-devel@gnu.org
Subject: Re: 'No applicable method' error when calling 'gnus-icalendar-save-part'
Date: Sun, 13 Oct 2024 05:41:01 +0530	[thread overview]
Message-ID: <86h69guaju.fsf@gmx.net> (raw)
In-Reply-To: 87bjzulfnl.fsf@fabionatali.com

Fabio Natali wrote:

> Hi All,
>
> This is to bring up an issue I found while using gnus-icalendar. It's
> the first time I use this library, not sure whether this is a bug or
> simply incorrect usage on my part.
>
> My setup is Emacs 29.4 + Notmuch 0.38.2.
>
> My Emacs configuration includes:
>
> (require 'org-agenda)
> (require 'gnus-icalendar)
> (setq gnus-icalendar-org-capture-file "~/calendar.org")
> (setq gnus-icalendar-org-capture-headline '("Calendar"))
> (gnus-icalendar-org-setup)
>
> (defun notmuch-show-import-icalendar-part ()
>   "Import the iCalendar part at point to Org Agenda."
>   (interactive)
>   (notmuch-show-apply-to-current-part-handle #'gnus-icalendar-save-part))
>
>
> Calling 'notmuch-show-import-icalendar-part' when on top of an iCalendar
> attachment results in this error:

(I don't use this, yet, so this is all speculative)

Have you tried using gnus-icalendar-sync-event-to-org? Something like:

(defun notmuch-show-import-icalendar-part ()
  "Import the iCalendar part at point to Org Agenda."
  (interactive)
  (let (gnus-icalendar-reply-status)
    (notmuch-show-apply-to-current-part-handle
    #'gnus-icalendar-sync-event-to-org)))

Because gnus-icalendar-save-part is not interactive. That honor falls to
gnus-icalendar-save-event and seems to be integrated with Gnus.

Regards,
James




  parent reply	other threads:[~2024-10-13  0:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-08 16:31 'No applicable method' error when calling 'gnus-icalendar-save-part' Fabio Natali
2024-10-09 19:54 ` Emanuel Berg
2024-10-13  0:11 ` James Thomas via Emacs development discussions. [this message]
2024-10-13 19:11   ` Fabio Natali
2024-10-13 22:50     ` James Thomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86h69guaju.fsf@gmx.net \
    --to=emacs-devel@gnu.org \
    --cc=jimjoe@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).