all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* icalendar: icalendar-import-buffer when finds RDATE but no RRULE
@ 2008-02-15 18:34 richard_sharman
  2008-02-16 17:38 ` Ulf Jasper
  0 siblings, 1 reply; 2+ messages in thread
From: richard_sharman @ 2008-02-15 18:34 UTC (permalink / raw)
  To: ulf.jasper, bug-gnu-emacs

[-- Attachment #1: message body text --]
[-- Type: text/plain, Size: 1240 bytes --]

In function icalendar--format-ical-event,  in the inner `cond' function,
if the initial rrule condition is skipped but the second case - the rdate
one - is taken, then variable event-ok is not set to t.   So the function
then treats the event as invalid.

sharmanpc 10% diff -c icalendar.el{.orig,}
*** icalendar.el.orig	Fri Feb 15 13:19:58 2008
--- icalendar.el	Fri Feb 15 13:20:04 2008
***************
*** 1641,1647 ****
                          (setq diary-string
                                (concat diary-string
                                        (format "......"))))
!                       (icalendar--split-value rdate)))
               ;; non-recurring event
               ;; all-day event
               ((not (string= start-d end-d))
--- 1641,1648 ----
                          (setq diary-string
                                (concat diary-string
                                        (format "......"))))
!                       (icalendar--split-value rdate))
! 	      (setq event-ok t))
               ;; non-recurring event
               ;; all-day event
               ((not (string= start-d end-d))
sharmanpc 11% 


Here is the patch as a file in case this helps, and a file
to demonstrate the problem.  


[-- Attachment #2: Patch-3300 --]
[-- Type: application/octet-stream, Size: 10200 bytes --]

*** U:/System/vxImages/vxImgx86_Atlas/vxImgx86_Atlas_Src/MN3300_version.c	Thu Nov  2 11:39:45 2006
--- System/vxImages/vxImgx86_Atlas/vxImgx86_Atlas_Src/MN3300_version.c	Thu Oct 25 16:36:18 2007
***************
*** 1,40 ****
! /***************************************************************
! // MN3300_VERSION.C
! // This file gets updated at build time with the correct build
! // version, and the build date/time by the CM group
! // Created by: Cecilia Silva
! // May 16, 2001
! ****************************************************************/
! 
! #include "vxWorks.h"
! #include "MN3300_version.h"
! 
! #define VERSIONTAG(s) STRINGIFY(s)
! #define STRINGIFY(s) #s
! 
! 
! 
! 
! void mn3300_icp(void)
! {
! 	printf("Mitel Networks Image Build Version %s \n", VERSIONTAG (IMGVERSION));
! }
! 
! /* ************************************************** */
! /* get_mn3300_icp: Get the current main load version  */
! /*                                                    */
! /* RETURNS: OK     if passed                          */
! /*          ERROR  if len < 16                        */
! /* ************************************************** */
! 
! STATUS get_mn3300_icp(unsigned char *version, int len)
! {
!    /* Recommend the len size is at least 16 */
!    if(len < strlen(VERSIONTAG (IMGVERSION)))
!       return(ERROR);
! 
!    strcpy(version, VERSIONTAG (IMGVERSION));
! 
!    return(OK);
! 
! }
\ No newline at end of file
--- 1,40 ----
! /***************************************************************
! // MN3300_VERSION.C
! // This file gets updated at build time with the correct build
! // version, and the build date/time by the CM group
! // Created by: Cecilia Silva
! // May 16, 2001
! ****************************************************************/
! #include "imgversion.h"
! #include "vxWorks.h"
! #include "MN3300_version.h"
! 
! #define VERSIONTAG(s) STRINGIFY(s)
! #define STRINGIFY(s) #s
! 
! 
! 
! 
! void mn3300_icp(void)
! {
! 	printf("Mitel Networks Image Build Version %s \n", VERSIONTAG (IMGVERSION));
! }
! 
! /* ************************************************** */
! /* get_mn3300_icp: Get the current main load version  */
! /*                                                    */
! /* RETURNS: OK     if passed                          */
! /*          ERROR  if len < 16                        */
! /* ************************************************** */
! 
! STATUS get_mn3300_icp(unsigned char *version, int len)
! {
!    /* Recommend the len size is at least 16 */
!    if(len < strlen(VERSIONTAG (IMGVERSION)))
!       return(ERROR);
! 
!    strcpy(version, VERSIONTAG (IMGVERSION));
! 
!    return(OK);
! 
! }
*** U:/System/vxImages/vxImg8260RTC/vxImg8260RTC_Src/MN3300_version.c	Wed Mar 10 10:18:11 2004
--- System/vxImages/vxImg8260RTC/vxImg8260RTC_Src/MN3300_version.c	Thu Oct 25 16:36:18 2007
***************
*** 1,40 ****
! /***************************************************************
! // MN3300_VERSION.C
! // This file gets updated at build time with the correct build
! // version, and the build date/time by the CM group
! // Created by: Cecilia Silva
! // May 16, 2001
! ****************************************************************/
! 
! #include "vxWorks.h"
! #include "MN3300_version.h"
! 
! #define VERSIONTAG(s) STRINGIFY(s)
! #define STRINGIFY(s) #s
! 
! 
! 
! 
! void mn3300_icp(void)
! {
! 	printf("Mitel Networks Image Build Version %s \n", VERSIONTAG (IMGVERSION));
! }
! 
! /* ************************************************** */
! /* get_mn3300_icp: Get the current main load version  */
! /*                                                    */
! /* RETURNS: OK     if passed                          */
! /*          ERROR  if len < 16                        */
! /* ************************************************** */
! 
! STATUS get_mn3300_icp(unsigned char *version, int len)
! {
!    /* Recommend the len size is at least 16 */
!    if(len < strlen(VERSIONTAG (IMGVERSION)))
!       return(ERROR);
! 
!    strcpy(version, VERSIONTAG (IMGVERSION));
! 
!    return(OK);
! 
! }
\ No newline at end of file
--- 1,40 ----
! /***************************************************************
! // MN3300_VERSION.C
! // This file gets updated at build time with the correct build
! // version, and the build date/time by the CM group
! // Created by: Cecilia Silva
! // May 16, 2001
! ****************************************************************/
! #include "imgversion.h"
! #include "vxWorks.h"
! #include "MN3300_version.h"
! 
! #define VERSIONTAG(s) STRINGIFY(s)
! #define STRINGIFY(s) #s
! 
! 
! 
! 
! void mn3300_icp(void)
! {
! 	printf("Mitel Networks Image Build Version %s \n", VERSIONTAG (IMGVERSION));
! }
! 
! /* ************************************************** */
! /* get_mn3300_icp: Get the current main load version  */
! /*                                                    */
! /* RETURNS: OK     if passed                          */
! /*          ERROR  if len < 16                        */
! /* ************************************************** */
! 
! STATUS get_mn3300_icp(unsigned char *version, int len)
! {
!    /* Recommend the len size is at least 16 */
!    if(len < strlen(VERSIONTAG (IMGVERSION)))
!       return(ERROR);
! 
!    strcpy(version, VERSIONTAG (IMGVERSION));
! 
!    return(OK);
! 
! }
*** U:/System/vxImages/vxImg8260E2T/vxImg8260E2T_Src/MN3300_version.c	Wed Mar 10 10:18:11 2004
--- System/vxImages/vxImg8260E2T/vxImg8260E2T_Src/MN3300_version.c	Thu Oct 25 16:36:18 2007
***************
*** 1,40 ****
! /***************************************************************
! // MN3300_VERSION.C
! // This file gets updated at build time with the correct build
! // version, and the build date/time by the CM group
! // Created by: Cecilia Silva
! // May 16, 2001
! ****************************************************************/
! 
! #include "vxWorks.h"
! #include "MN3300_version.h"
! 
! #define VERSIONTAG(s) STRINGIFY(s)
! #define STRINGIFY(s) #s
! 
! 
! 
! 
! void mn3300_icp(void)
! {
! 	printf("Mitel Networks Image Build Version %s \n", VERSIONTAG (IMGVERSION));
! }
! 
! /* ************************************************** */
! /* get_mn3300_icp: Get the current main load version  */
! /*                                                    */
! /* RETURNS: OK     if passed                          */
! /*          ERROR  if len < 16                        */
! /* ************************************************** */
! 
! STATUS get_mn3300_icp(unsigned char *version, int len)
! {
!    /* Recommend the len size is at least 16 */
!    if(len < strlen(VERSIONTAG (IMGVERSION)))
!       return(ERROR);
! 
!    strcpy(version, VERSIONTAG (IMGVERSION));
! 
!    return(OK);
! 
! }
\ No newline at end of file
--- 1,40 ----
! /***************************************************************
! // MN3300_VERSION.C
! // This file gets updated at build time with the correct build
! // version, and the build date/time by the CM group
! // Created by: Cecilia Silva
! // May 16, 2001
! ****************************************************************/
! #include "imgversion.h"
! #include "vxWorks.h"
! #include "MN3300_version.h"
! 
! #define VERSIONTAG(s) STRINGIFY(s)
! #define STRINGIFY(s) #s
! 
! 
! 
! 
! void mn3300_icp(void)
! {
! 	printf("Mitel Networks Image Build Version %s \n", VERSIONTAG (IMGVERSION));
! }
! 
! /* ************************************************** */
! /* get_mn3300_icp: Get the current main load version  */
! /*                                                    */
! /* RETURNS: OK     if passed                          */
! /*          ERROR  if len < 16                        */
! /* ************************************************** */
! 
! STATUS get_mn3300_icp(unsigned char *version, int len)
! {
!    /* Recommend the len size is at least 16 */
!    if(len < strlen(VERSIONTAG (IMGVERSION)))
!       return(ERROR);
! 
!    strcpy(version, VERSIONTAG (IMGVERSION));
! 
!    return(OK);
! 
! }
*** U:/ESM/ESM_Inc/IPOC.h	Mon Nov 20 15:29:06 2006
--- ESM/ESM_Inc/IPOC.h	Thu Oct 25 13:54:31 2007
***************
*** 27,32 ****
--- 27,35 ----
  #ifndef _IPOC_
  #define _IPOC_
  
+ #define IPOP_FEATURE_VERSION_TAG 3
+ #define MISYNC_RELEASE_STRING "\"3300-8.0\""
+ 
  typedef struct IPOC_Layout1 {
      unsigned int User_Licenses; 
      unsigned int ACD_Agent_Licenses;
*** u:/System/vxImages/BSP_Atlas/BSP_Atlas_Src/kernelAMods.s	Thu Nov  2 11:39:45 2006
--- build/System/vxImages/BSP_Atlas/BSP_Atlas_Src/kernelAMods.s	Tue Oct 23 12:38:22 2007
***************
*** 361,368 ****
  /***************************************************************************/
  /* semALib mods                                                            */
  
! 	.global	semGive
! 	.global	semTake
  	.global	semBGive
  	.global	semBTake
  	.global	semQGet
--- 361,368 ----
  /***************************************************************************/
  /* semALib mods                                                            */
  
! 	.global	vxWorks_semGive
! 	.global	vxWorks_semTake
  	.global	semBGive
  	.global	semBTake
  	.global	semQGet
***************
*** 379,385 ****
  	call		skyHook_popf   
  	ret    
  
! semGive:
  	mov		0x4(%esp),%ecx
  	test		$0x1,%ecx
  	jne		_semGiveGlobal
--- 379,385 ----
  	call		skyHook_popf   
  	ret    
  
! vxWorks_semGive:
  	mov		0x4(%esp),%ecx
  	test		$0x1,%ecx
  	jne		_semGiveGlobal
***************
*** 537,543 ****
  _semIsInvalid:
  	jmp		semInvalid
  
! semTake:
  	mov		0x4(%esp),%ecx
  	test		$0x1,%ecx
  	jne		_semTakeGlobal
--- 537,543 ----
  _semIsInvalid:
  	jmp		semInvalid
  
! vxWorks_semTake:
  	mov		0x4(%esp),%ecx
  	test		$0x1,%ecx
  	jne		_semTakeGlobal
***************
*** 759,765 ****
  	call		*%eax
  	add		$0x4,%esp
  	mov		%eax,0x8(%esp)
! 	jmp		semTake
  
  semOTake:
  	push		$0xffffffff
--- 759,765 ----
  	call		*%eax
  	add		$0x4,%esp
  	mov		%eax,0x8(%esp)
! 	jmp		vxWorks_semTake
  
  semOTake:
  	push		$0xffffffff
***************
*** 1000,1006 ****
  	call		*%eax
  	addl		$0x4,%esp
  	movl		%eax,0x8(%esp,1)
! 	jmp		semTake
  
  
  
--- 1000,1006 ----
  	call		*%eax
  	addl		$0x4,%esp
  	movl		%eax,0x8(%esp,1)
! 	jmp		vxWorks_semTake
  
  
  

[-- Attachment #3: vcalendar file to demonstrate the problem --]
[-- Type: application/octet-stream, Size: 1894 bytes --]

BEGIN:VCALENDAR
X-LOTUS-CHARSET:UTF-8
VERSION:2.0
PRODID:-//Lotus Development Corporation//NONSGML Notes 6.0//EN
METHOD:REQUEST
BEGIN:VTIMEZONE
TZID:Eastern
BEGIN:STANDARD
DTSTART:19501105T020000
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
RRULE:FREQ=YEARLY;BYMINUTE=0;BYHOUR=2;BYDAY=1SU;BYMONTH=11
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:19500312T020000
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
RRULE:FREQ=YEARLY;BYMINUTE=0;BYHOUR=2;BYDAY=2SU;BYMONTH=3
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DTSTART;TZID="Eastern":20080215T143000
DTEND;TZID="Eastern":20080215T150000
TRANSP:OPAQUE
RDATE;TZID="Eastern";VALUE=PERIOD:20080215T143000/20080215T150000
RECURRENCE-ID:20080215T190000Z
X-LOTUS-RECURID:20080215T190000Z
X-LOTUS-LASTALL-RDATES;TZID="Eastern":20080118T133000,20080215T143000,
 20080321T133000,20080418T133000,20080516T133000,20080620T133000
 ,20080718T133000,20080815T133000,20080919T133000,20081017T133000
X-LOTUS-CHANGE-INST-DATES:20080215T190000Z
X-LOTUS-INITIAL-RDATES:20080118T190000Z,20080215T190000Z
 ,20080321T180000Z,20080418T180000Z,20080516T180000Z,20080620T180000Z
 ,20080718T180000Z,20080815T180000Z,20080919T180000Z,20081017T180000Z
DTSTAMP:20080214T174437Z
COMMENT:the comment has been removed
SEQUENCE:3
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE
 :mailto:richard_sharman@Mitel.COM
CLASS:PUBLIC
DESCRIPTION:Agenda\nremoved from this example
SUMMARY:removed again
ORGANIZER;CN="undisclodes":mailto:someone@here.com
UID:5C650195C3592172852573B60079983E-Lotus_Notes_Generated
X-LOTUS-BROADCAST:FALSE
X-LOTUS-UPDATE-SEQ:1
X-LOTUS-UPDATE-WISL:$S:1;$L:1;$B:1;$E:1;$R:3
X-LOTUS-ORIGSTART;TZID="Eastern":20080215T143000
X-LOTUS-ORIGEND;TZID="Eastern":20080215T160000
X-LOTUS-START;TZID="Eastern":20080215T143000
X-LOTUS-END;TZID="Eastern":20080215T150000
X-LOTUS-NOTESVERSION:2
X-LOTUS-NOTICETYPE:U
X-LOTUS-CHILD_UID:7ABC52F95636B6CB852573EF0060FAD6
END:VEVENT
END:VCALENDAR

[-- Attachment #4: message body text --]
[-- Type: text/plain, Size: 10 bytes --]


Richard


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

* Re: icalendar: icalendar-import-buffer when finds RDATE but no RRULE
  2008-02-15 18:34 icalendar: icalendar-import-buffer when finds RDATE but no RRULE richard_sharman
@ 2008-02-16 17:38 ` Ulf Jasper
  0 siblings, 0 replies; 2+ messages in thread
From: Ulf Jasper @ 2008-02-16 17:38 UTC (permalink / raw)
  To: richard_sharman; +Cc: bug-gnu-emacs

richard_sharman@mitel.com writes:
> In function icalendar--format-ical-event,  in the inner `cond' function,

That is icalendar--convert-ical-to-diary.

> if the initial rrule condition is skipped but the second case - the rdate
> one - is taken, then variable event-ok is not set to t.   So the function
> then treats the event as invalid.

Simply setting event-ok to t is not enough. The RDATE handling is just
missing so that by setting event-ok to t diary entries are created that
are missing start and end time. I just started to implement the RDATE
stuff.

Thanks for pointing out and thanks for the example! (BTW you attached
the wrong patch file.)

Ulf

-- 
HOME UNTERNEHMEN DERIVATE ROHSTOFFE EXPERTEN DEVISEN KONJUNKTUR FONDS




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

end of thread, other threads:[~2008-02-16 17:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-15 18:34 icalendar: icalendar-import-buffer when finds RDATE but no RRULE richard_sharman
2008-02-16 17:38 ` Ulf Jasper

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.