* icalendar event without description field fails on export
@ 2019-10-15 8:10 Eric S Fraga
2019-10-15 9:51 ` Robert Pluim
0 siblings, 1 reply; 4+ messages in thread
From: Eric S Fraga @ 2019-10-15 8:10 UTC (permalink / raw)
To: ding
If I receive a calendar invite which has no description field, the
gnus-icalendar-event-export function fails with a nil string.
--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil)
#f(compiled-function (event reply-status) "Return string with new `org-mode' entry describing EVENT." #<bytecode 0x156bee96abd1>)(#<gnus-icalendar-event-request gnus-icalendar-event-request-156bee49f330> nil)
apply(#f(compiled-function (event reply-status) "Return string with new `org-mode' entry describing EVENT." #<bytecode 0x156bee96abd1>) #<gnus-icalendar-event-request gnus-icalendar-event-request-156bee49f330> nil)
gnus-icalendar-event->org-entry(#<gnus-icalendar-event-request gnus-icalendar-event-request-156bee49f330> nil)
gnus-icalendar:org-event-save(#<gnus-icalendar-event-request gnus-icalendar-event-request-156bee49f330> nil)
#f(compiled-function (event reply-status) #<bytecode 0x156bee6e19b1>)(#<gnus-icalendar-event-request gnus-icalendar-event-request-156bee49f330> nil)
apply(#f(compiled-function (event reply-status) #<bytecode 0x156bee6e19b1>) #<gnus-icalendar-event-request gnus-icalendar-event-request-156bee49f330> nil)
gnus-icalendar-event:sync-to-org(#<gnus-icalendar-event-request gnus-icalendar-event-request-156bee49f330> nil)
gnus-icalendar-sync-event-to-org(#<gnus-icalendar-event-request gnus-icalendar-event-request-156bee49f330>)
gnus-icalendar-event-export()
funcall-interactively(gnus-icalendar-event-export)
call-interactively(gnus-icalendar-event-export nil nil)
command-execute(gnus-icalendar-event-export)
--8<---------------cut here---------------end--------------->8---
--
Eric S Fraga via Emacs 27.0.50 & org 9.2.4 on Debian bullseye/sid
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: icalendar event without description field fails on export
2019-10-15 8:10 icalendar event without description field fails on export Eric S Fraga
@ 2019-10-15 9:51 ` Robert Pluim
2019-10-15 13:14 ` Eric S Fraga
0 siblings, 1 reply; 4+ messages in thread
From: Robert Pluim @ 2019-10-15 9:51 UTC (permalink / raw)
To: Eric S Fraga; +Cc: ding
>>>>> On Tue, 15 Oct 2019 09:10:35 +0100, Eric S Fraga <e.fraga@ucl.ac.uk> said:
Eric> If I receive a calendar invite which has no description field, the
Eric> gnus-icalendar-event-export function fails with a nil string.
Ah yes, I guess this is my fault. Does the following work for you?
diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el
index e4779f52c0..77e73e6606 100644
--- a/lisp/gnus/gnus-icalendar.el
+++ b/lisp/gnus/gnus-icalendar.el
@@ -485,7 +485,7 @@ gnus-icalendar-event->org-entry
(narrow-to-region (point) (point))
(insert (gnus-icalendar-event:org-timestamp event)
"\n\n"
- description)
+ (or description "No description"))
(indent-region (point-min) (point-max) 2)
(fill-region (point-min) (point-max)))
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: icalendar event without description field fails on export
2019-10-15 9:51 ` Robert Pluim
@ 2019-10-15 13:14 ` Eric S Fraga
2019-10-16 6:15 ` Robert Pluim
0 siblings, 1 reply; 4+ messages in thread
From: Eric S Fraga @ 2019-10-15 13:14 UTC (permalink / raw)
To: ding
On Tuesday, 15 Oct 2019 at 11:51, Robert Pluim wrote:
>>>>>> On Tue, 15 Oct 2019 09:10:35 +0100, Eric S Fraga <e.fraga@ucl.ac.uk> said:
>
> Eric> If I receive a calendar invite which has no description field, the
> Eric> gnus-icalendar-event-export function fails with a nil string.
>
> Ah yes, I guess this is my fault. Does the following work for you?
Your fix did the job. Thanks.
--
Eric S Fraga via Emacs 27.0.50 & org 9.2.6 on Debian bullseye/sid
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: icalendar event without description field fails on export
2019-10-15 13:14 ` Eric S Fraga
@ 2019-10-16 6:15 ` Robert Pluim
0 siblings, 0 replies; 4+ messages in thread
From: Robert Pluim @ 2019-10-16 6:15 UTC (permalink / raw)
To: Eric S Fraga; +Cc: ding
>>>>> On Tue, 15 Oct 2019 14:14:04 +0100, Eric S Fraga <e.fraga@ucl.ac.uk> said:
Eric> On Tuesday, 15 Oct 2019 at 11:51, Robert Pluim wrote:
>>>>>>> On Tue, 15 Oct 2019 09:10:35 +0100, Eric S Fraga <e.fraga@ucl.ac.uk> said:
>>
Eric> If I receive a calendar invite which has no description field, the
Eric> gnus-icalendar-event-export function fails with a nil string.
>>
>> Ah yes, I guess this is my fault. Does the following work for you?
Eric> Your fix did the job. Thanks.
Thanks for testing. Fixed in emacs master.
Robert
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-16 6:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-15 8:10 icalendar event without description field fails on export Eric S Fraga
2019-10-15 9:51 ` Robert Pluim
2019-10-15 13:14 ` Eric S Fraga
2019-10-16 6:15 ` Robert Pluim
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 NNTP newsgroup(s).