From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Exclude spaces and maybe tags from SUMMARY in iCalendar export Date: Tue, 18 May 2010 14:46:08 +0200 Message-ID: <08B2CA6E-2DC1-4C88-9E3B-48C2447CA485@gmail.com> References: <87mxvxo2oz.fsf@thinkpad.tsdh.de> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=45516 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OEOXw-0000B1-0Q for emacs-orgmode@gnu.org; Tue, 18 May 2010 11:17:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OEOXo-0001Gb-PH for emacs-orgmode@gnu.org; Tue, 18 May 2010 11:17:26 -0400 Received: from ey-out-1920.google.com ([74.125.78.149]:62750) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OEOXl-0001Ev-Jh for emacs-orgmode@gnu.org; Tue, 18 May 2010 11:17:20 -0400 Received: by ey-out-1920.google.com with SMTP id 13so779117eye.34 for ; Tue, 18 May 2010 08:17:16 -0700 (PDT) In-Reply-To: <87mxvxo2oz.fsf@thinkpad.tsdh.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Tassilo Horn Cc: emacs-orgmode@gnu.org Applied, thanks. - Carsten On May 18, 2010, at 1:43 PM, Tassilo Horn wrote: > Hi all, > > I've just discovered the iCalendar export and use that to have a > visually appealing read-only agenda in KOrganizer. Basically, the > export seems perfect except for one thing. > > When I have an org entry like > > * Test :some:tags:here: > > the corresponding VEVENT will have the whole org heading including the > spaces and the tag string as SUMMARY (unless the entry has a SUMMARY > property). Having the tags there might be ok (although by default > they > are also set as CATEGORY), but the spaces between the heading title > and > the tags should be compacted. > > Appended is patch that does that when not `is-body'. > > Bye, > Tassilo > > --- > lisp/org-icalendar.el | 5 +++-- > 1 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/lisp/org-icalendar.el b/lisp/org-icalendar.el > index 9acd2f4..66da256 100644 > --- a/lisp/org-icalendar.el > +++ b/lisp/org-icalendar.el > @@ -516,11 +516,12 @@ whitespace, newlines, drawers, and timestamps, > and cut it down to MAXLENGTH > characters." > (if (not s) > nil > - (when is-body > + (if is-body > (let ((re (concat "\\(" org-drawer-regexp "\\)[^\000]*?:END:.* > \n?")) > (re2 (concat "^[ \t]*" org-keyword-time-regexp ".*\n?"))) > (while (string-match re s) (setq s (replace-match "" t t s))) > - (while (string-match re2 s) (setq s (replace-match "" t t s))))) > + (while (string-match re2 s) (setq s (replace-match "" t t s)))) > + (setq s (replace-regexp-in-string "[[:space:]]+" " " s))) > (let ((start 0)) > (while (string-match "\\([,;]\\)" s start) > (setq start (+ (match-beginning 0) 2) > -- > 1.7.1 > > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten