unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#37887: 27.0.50; icalendar-export-region: multiline Desc not handled
@ 2019-10-23 13:58 Rajeev Narang via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2019-11-01  9:40 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Rajeev Narang via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2019-10-23 13:58 UTC (permalink / raw)
  To: 37887


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))





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

* bug#37887: 27.0.50; icalendar-export-region: multiline Desc not handled
  2019-10-23 13:58 bug#37887: 27.0.50; icalendar-export-region: multiline Desc not handled Rajeev Narang via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2019-11-01  9:40 ` Eli Zaretskii
  2020-08-25 23:43 ` Stefan Kangas
  2021-08-11 12:58 ` Lars Ingebrigtsen
  2 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2019-11-01  9:40 UTC (permalink / raw)
  To: Rajeev Narang; +Cc: 37887

> 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@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?





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

* bug#37887: 27.0.50; icalendar-export-region: multiline Desc not handled
  2019-10-23 13:58 bug#37887: 27.0.50; icalendar-export-region: multiline Desc not handled Rajeev Narang via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2019-11-01  9:40 ` Eli Zaretskii
@ 2020-08-25 23:43 ` Stefan Kangas
  2020-08-26  1:13   ` Rajeev Narang via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-08-11 12:58 ` Lars Ingebrigtsen
  2 siblings, 1 reply; 5+ messages in thread
From: Stefan Kangas @ 2020-08-25 23:43 UTC (permalink / raw)
  To: Rajeev Narang; +Cc: 37887

Rajeev Narang <rajeev+jnk@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





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

* bug#37887: 27.0.50; icalendar-export-region: multiline Desc not handled
  2020-08-25 23:43 ` Stefan Kangas
@ 2020-08-26  1:13   ` Rajeev Narang via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 5+ messages in thread
From: Rajeev Narang via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-08-26  1:13 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 37887

[-- Attachment #1: Type: text/plain, Size: 158 bytes --]

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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: t0.ics --]
[-- Type: text/calendar, Size: 587 bytes --]

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


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

* bug#37887: 27.0.50; icalendar-export-region: multiline Desc not handled
  2019-10-23 13:58 bug#37887: 27.0.50; icalendar-export-region: multiline Desc not handled Rajeev Narang via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2019-11-01  9:40 ` Eli Zaretskii
  2020-08-25 23:43 ` Stefan Kangas
@ 2021-08-11 12:58 ` Lars Ingebrigtsen
  2 siblings, 0 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-11 12:58 UTC (permalink / raw)
  To: Rajeev Narang; +Cc: 37887

Rajeev Narang <rajeev+jnk@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





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

end of thread, other threads:[~2021-08-11 12:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-23 13:58 bug#37887: 27.0.50; icalendar-export-region: multiline Desc not handled Rajeev Narang via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-11-01  9:40 ` Eli Zaretskii
2020-08-25 23:43 ` Stefan Kangas
2020-08-26  1:13   ` Rajeev Narang via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-11 12:58 ` Lars Ingebrigtsen

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).