GNU bug report logs - #37887
27.0.50; icalendar-export-region: multiline Desc not handled

Previous Next

Package: emacs;

Reported by: Rajeev Narang <rajeev+jnk <at> sivalik.com>

Date: Wed, 23 Oct 2019 14:11:02 UTC

Severity: normal

Found in version 27.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 37887 in the body.
You can then email your comments to 37887 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#37887; Package emacs. (Wed, 23 Oct 2019 14:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Rajeev Narang <rajeev+jnk <at> sivalik.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 23 Oct 2019 14:11:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Rajeev Narang <rajeev+jnk <at> sivalik.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; icalendar-export-region: multiline Desc not handled
Date: Wed, 23 Oct 2019 09:58:13 -0400
icalendar-export-region does not export multi-line Desc as it is imported by icalendar-import-file.  The following patch fixes the issue.

diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el
index 1186ced3fb..1f4e582aa5 100644
--- a/lisp/calendar/icalendar.el
+++ b/lisp/calendar/icalendar.el
@@ -1244,7 +1244,7 @@ icalendar--parse-summary-and-rest
                      (concat "\\(" icalendar-import-format-uid "\\)??"))))
 	;; Need the \' regexp in order to detect multi-line items
         (setq s (concat "\\`"
-                        (replace-regexp-in-string "%s" "\\(.*?\\)" s nil t)
+                        (replace-regexp-in-string "%s" "\\([^z-a]*?\\)" s nil t)
                         "\\'"))
         (if (string-match s summary-and-rest)
             (let (cla des loc org sta url uid) ;; sum



In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, cairo version 1.16.0)
 of 2019-10-20 built on hp
Repository revision: 30deac84c4168a6315a08a0dd85f6dde9b9df439
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Debian GNU/Linux 10 (buster)

Recent messages:
nnimap read 0k from imap.sivalik.com
Exiting summary buffer and applying spam rules
Expiring articles...done
Saving /home/rajeev/.newsrc.eld...
Saving file /home/rajeev/.newsrc.eld...
Wrote /home/rajeev/.newsrc.eld
Saving /home/rajeev/.newsrc.eld...done
Mark set [2 times]
next-line: End of buffer [5 times]
Making completion list... [3 times]

Configured using:
 'configure --with-cairo --prefix=/mnt/j0/home/rajeev/tmp/build/emacs
 'LDFLAGS= -L/usr/local/lib' 'CPPFLAGS= -I/usr/local/include
 -I/usr/include/dvdnav''

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT
LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS
LIBSYSTEMD JSON PDUMPER LCMS2 GMP

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Shell

Minor modes in effect:
  icomplete-mode: t
  global-so-long-mode: t
  global-auto-revert-mode: t
  shell-dirtrack-mode: t
  display-time-mode: t
  jabber-activity-mode: t
  dirtrack-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow emacsbug bug-reference dired-aux two-column iso-transl
warnings term/xterm xterm tabify man sh-script make-mode gnus-delay
gnus-draft org-table ob-ditaa ob-plantuml org-archive org-clock
org-colview org-habit ess-tracebug ess-utils ido ess-custom executable
compile mhtml-mode css-mode smie eww mm-url url-queue color gnus-cite
gnus-async gnus-bcklg gnus-ml disp-table smtpmail sort smerge-mode
diff mm-archive url-http url-gw url-cache url-auth cus-edit cus-start
cus-load cl-print rx eieio-opt speedbar sb-image ezimage dframe
thingatpt help-fns radix-tree cal-move misearch multi-isearch
org-duration view mule-util vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs
vc-dir vc vc-dispatcher mailalias bbdb-message mail-extr edmacro
kmacro jabber-keepalive jabber-ping cl-extra help-mode sasl-scram-rfc
sasl-scram-sha-1 rfc2104 hex-util server cursor-sensor utf-7 nnml
network-stream nsm nndraft nnmh time-stamp bbdb-gnus nnfolder
gnus-agent gnus-srvr gnus-score score-mode nnvirtual nntp gnus-cache
xt-mouse face-remap adoc-mode tempo markup-faces which-func timeclock
spam spam-stat gnus-uu yenc gnus-msg semantic/util-modes semantic/util
semantic semantic/tag semantic/lex semantic/fw mode-local cedet
yaml-mode m4-mode js imenu cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs icomplete so-long
autorevert filenotify bbdb-anniv vc-git diff-mode org-indent org-rmail
org-mhe org-irc org-info org-gnus nnir org-docview doc-view jka-compr
image-mode exif org-bibtex bibtex org-bbdb org-w3m cal-iso tramp
tramp-loaddefs trampver tramp-integration files-x tramp-compat shell
ls-lisp printing ps-print ps-print-loaddefs ps-def lpr web-server
web-server-status-codes el/web midnight el/av el/loc el/wthr el/hass
el/cron el/fin org-agenda org-id lunar solar cal-dst holidays
hol-loaddefs el/calc el/diary el/remote el/script bbdb-mua bbdb-com
crm qp pp gnus-icalendar org-capture gnus-art mm-uu mml2015 mm-view
mml-smime smime dig icalendar sendmail time jabber
jabber-notifications notifications jabber-libnotify dbus
jabber-awesome jabber-osd jabber-wmii jabber-xmessage jabber-festival
jabber-sawfish jabber-ratpoison jabber-tmux jabber-screen
jabber-socks5 jabber-ft-server jabber-si-server jabber-ft-client
jabber-ft-common jabber-si-client jabber-si-common jabber-feature-neg
jabber-truncate jabber-time jabber-autoaway jabber-vcard-avatars
jabber-chatstates jabber-events jabber-vcard jabber-avatar
jabber-activity jabber-watch jabber-modeline jabber-ahc-presence
jabber-ahc jabber-version jabber-ourversion jabber-muc-nick-completion
hippie-exp jabber-browse jabber-search jabber-register jabber-roster
jabber-presence jabber-muc jabber-bookmarks jabber-private
jabber-muc-nick-coloring hexrgb jabber-widget jabber-disco jabber-chat
jabber-history jabber-chatbuffer jabber-alert jabber-iq jabber-core
jabber-console sgml-mode ewoc jabber-keymap jabber-sasl sasl
sasl-anonymous sasl-login sasl-plain fsm jabber-logon jabber-conn srv
dns starttls tls gnutls jabber-xml jabber-menu jabber-util el/xmpp
org-crypt org-element avl-tree generator org advice org-macro
org-footnote org-pcomplete pcomplete org-list org-faces org-entities
noutline outline easy-mmode org-version ob-emacs-lisp ob ob-tangle
org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint comint
ansi-color ring ob-core ob-eval org-compat org-macs org-loaddefs
find-func gnus-sum url url-proxy url-privacy url-expand url-methods
url-history mailcap shr url-cookie url-domsuf url-util svg dom
gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source
utf7 netrc nnoo parse-time iso8601 gnus-spec gnus-int gnus-range
message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec
epa derived epg epg-config mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader gnus-win gnus nnheader
gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums
text-property-search time-date mail-utils mm-util mail-prsvr wid-edit
el/org dirtrack el/shell el/doc el/mail el/tools timer-list el/timer
el/util bbdb bbdb-site timezone el/bbdb esxml pcase xml cl appt
diary-lib diary-loaddefs cal-menu calendar cal-loaddefs el/init
wombat-theme ess-generics info package easymenu browse-url
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded
nadvice loaddefs button faces cus-face macroexp files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 723818 229036)
 (symbols 48 42887 5)
 (strings 32 198931 17077)
 (string-bytes 1 6801608)
 (vectors 16 79589)
 (vector-slots 8 1728593 96076)
 (floats 8 1467 2155)
 (intervals 56 25052 2513)
 (buffers 1000 255))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37887; Package emacs. (Fri, 01 Nov 2019 09:41:01 GMT) Full text and rfc822 format available.

Message #8 received at 37887 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Rajeev Narang <rajeev+jnk <at> sivalik.com>
Cc: 37887 <at> debbugs.gnu.org
Subject: Re: bug#37887: 27.0.50;
 icalendar-export-region: multiline Desc not handled
Date: Fri, 01 Nov 2019 11:40:50 +0200
> Date: Wed, 23 Oct 2019 09:58:13 -0400
> From: Rajeev Narang via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> 
> icalendar-export-region does not export multi-line Desc as it is imported by icalendar-import-file.  The following patch fixes the issue.
> 
> diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el
> index 1186ced3fb..1f4e582aa5 100644
> --- a/lisp/calendar/icalendar.el
> +++ b/lisp/calendar/icalendar.el
> @@ -1244,7 +1244,7 @@ icalendar--parse-summary-and-rest
>                       (concat "\\(" icalendar-import-format-uid "\\)??"))))
>  	;; Need the \' regexp in order to detect multi-line items
>          (setq s (concat "\\`"
> -                        (replace-regexp-in-string "%s" "\\(.*?\\)" s nil t)
> +                        (replace-regexp-in-string "%s" "\\([^z-a]*?\\)" s nil t)
>                          "\\'"))
>          (if (string-match s summary-and-rest)
>              (let (cla des loc org sta url uid) ;; sum

Is [^a-z] really correct here?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37887; Package emacs. (Tue, 25 Aug 2020 23:44:02 GMT) Full text and rfc822 format available.

Message #11 received at 37887 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Rajeev Narang <rajeev+jnk <at> sivalik.com>
Cc: 37887 <at> debbugs.gnu.org
Subject: Re: bug#37887: 27.0.50;
 icalendar-export-region: multiline Desc not handled
Date: Tue, 25 Aug 2020 16:43:28 -0700
Rajeev Narang <rajeev+jnk <at> sivalik.com> writes:

> icalendar-export-region does not export multi-line Desc as it is imported by icalendar-import-file.  The following patch fixes the issue.
>
> diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el
> index 1186ced3fb..1f4e582aa5 100644
> --- a/lisp/calendar/icalendar.el
> +++ b/lisp/calendar/icalendar.el
> @@ -1244,7 +1244,7 @@ icalendar--parse-summary-and-rest
>                       (concat "\\(" icalendar-import-format-uid "\\)??"))))
>  	;; Need the \' regexp in order to detect multi-line items
>          (setq s (concat "\\`"
> -                        (replace-regexp-in-string "%s" "\\(.*?\\)" s nil t)
> +                        (replace-regexp-in-string "%s" "\\([^z-a]*?\\)" s nil t)
>                          "\\'"))
>          (if (string-match s summary-and-rest)
>              (let (cla des loc org sta url uid) ;; sum

Could you please provide an example of how to reproduce this bug?

Best regards,
Stefan Kangas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37887; Package emacs. (Wed, 26 Aug 2020 01:14:02 GMT) Full text and rfc822 format available.

Message #14 received at 37887 <at> debbugs.gnu.org (full text, mbox):

From: Rajeev Narang <rajeev+jnk <at> sivalik.com>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 37887 <at> debbugs.gnu.org
Subject: Re: bug#37887: 27.0.50; icalendar-export-region: multiline Desc not
 handled
Date: Tue, 25 Aug 2020 21:13:16 -0400
[Message part 1 (text/plain, inline)]
If you import the attached file (icalendar-import-file) and then export it back (icalendar-export-file) you will see that the Desc is lost in the re-export.

[t0.ics (text/calendar, inline)]
BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
BEGIN:VEVENT
DTSTART:20200822T180000Z
DTEND:20200822T190000Z
DTSTAMP:20200825T203517Z
CREATED:20200822T180043Z
DESCRIPTION:To see detailed information for automatically created events li
 ke this one\, use the official Google Calendar app. https://g.co/calendar\n
 \nThis event was created from an email you received in Gmail. https://mail.
 google.com/mail?extsrc=cal&plid=ACUX6DPSxIW80hA4eZMPB6pDuC8RNU1IYLQ\n
LAST-MODIFIED:20200822T180043Z
SEQUENCE:0
SUMMARY:Reservation at Place
END:VEVENT
END:VCALENDAR


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37887; Package emacs. (Wed, 11 Aug 2021 12:59:02 GMT) Full text and rfc822 format available.

Message #17 received at 37887 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Rajeev Narang <rajeev+jnk <at> sivalik.com>
Cc: 37887 <at> debbugs.gnu.org
Subject: Re: bug#37887: 27.0.50; icalendar-export-region: multiline Desc not
 handled
Date: Wed, 11 Aug 2021 14:58:11 +0200
Rajeev Narang <rajeev+jnk <at> sivalik.com> writes:

> icalendar-export-region does not export multi-line Desc as it is imported by icalendar-import-file.  The following patch fixes the issue.

Thanks; applied to Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 28.1, send any further explanations to 37887 <at> debbugs.gnu.org and Rajeev Narang <rajeev+jnk <at> sivalik.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 11 Aug 2021 12:59:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 09 Sep 2021 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 229 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.