From debbugs-submit-bounces@debbugs.gnu.org Sun May 20 09:55:59 2012 Received: (at submit) by debbugs.gnu.org; 20 May 2012 13:55:59 +0000 Received: from localhost ([127.0.0.1]:35461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SW6c2-0003oK-4J for submit@debbugs.gnu.org; Sun, 20 May 2012 09:55:58 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53228) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SW6bg-0003nv-4Y for submit@debbugs.gnu.org; Sun, 20 May 2012 09:55:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SW6b2-00031K-MN for submit@debbugs.gnu.org; Sun, 20 May 2012 09:54:58 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:48033) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SW6b2-00031C-GD for submit@debbugs.gnu.org; Sun, 20 May 2012 09:54:56 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42644) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SW6b0-0005sx-Id for bug-gnu-emacs@gnu.org; Sun, 20 May 2012 09:54:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SW6ay-00030c-Hn for bug-gnu-emacs@gnu.org; Sun, 20 May 2012 09:54:53 -0400 Received: from mail-pz0-f41.google.com ([209.85.210.41]:42465) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SW6ay-00030L-1F for bug-gnu-emacs@gnu.org; Sun, 20 May 2012 09:54:52 -0400 Received: by dakp5 with SMTP id p5so6102892dak.0 for ; Sun, 20 May 2012 06:54:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:x-debbugs-cc:date:message-id:mime-version :content-type; bh=TxfvVMFMKfxeU7XsgncLds2mFxwIX8wSScoOu9D2CzQ=; b=ifREUiygygXAPV36GXZEYuyflN52lD5Llpn+J4DOlnKVqkIre5HfpMb1qyIhAdSqkE n+Z+RaWr0yb5TmoMVFadruk4sototir0HIOhAPEUL0NCBZJ6opRkmZclGXas0T4KxnyM 3AgF+VAHwgoMxAHSIWYQ00TPmYDUW6q97v60jz+NrxmK7aTttYo6c+Ll1xmTKGyTPh36 Zys6aQr2wsNBhLvYrfK1T2v5PhRAqzrkKRo6hWbC9xYyeZwWZRJZmn3LC4hpvtUpgqDz Zvp8dMK3GyJuHLre+RzZGN6irWs7Jn6/XLGLXjQHNaStJ77LYxFfNWZe4EH2FanU0uMQ WThw== Received: by 10.68.232.129 with SMTP id to1mr37864945pbc.27.1337522089121; Sun, 20 May 2012 06:54:49 -0700 (PDT) Received: from Victoria.local ([222.130.133.18]) by mx.google.com with ESMTPS id u5sm19646333pbu.76.2012.05.20.06.54.44 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 20 May 2012 06:54:48 -0700 (PDT) From: Leo To: bug-gnu-emacs@gnu.org Subject: 24.0.97; Add icalendar-import-format-uid X-Debbugs-CC: Ulf Jasper Date: Sun, 20 May 2012 21:54:34 +0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) --=-=-= Content-Type: text/plain Hello Ulf, I am teaching Gnus to add invitation/events to diary and so I have found UID in icalendar useful to identify events. Does it make sense to apply the following patch, which I have been using since may 2011? Thanks. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=ical.diff Content-Description: ical.diff === modified file 'lisp/calendar/icalendar.el' --- lisp/calendar/icalendar.el 2012-03-13 06:54:37 +0000 +++ lisp/calendar/icalendar.el 2012-05-20 13:45:46 +0000 @@ -130,6 +130,7 @@ %s Summary, see `icalendar-import-format-summary' %t Status, see `icalendar-import-format-status' %u URL, see `icalendar-import-format-url' +%U UID, see `icalendar-import-format-uid' A formatting FUNCTION will be called with a VEVENT as its only argument. It must return a string. See @@ -179,6 +180,14 @@ :type 'string :group 'icalendar) +(defcustom icalendar-import-format-uid + "\n UID: %s" + "Format string defining how the UID element is formatted. +This applies only if the UID is not empty! `%s' is replaced by +the UID." + :type 'string + :group 'icalendar) + (defcustom icalendar-import-format-status "\n Status: %s" "Format string defining how the status element is formatted. @@ -1098,7 +1107,8 @@ ;; can't do anything nil ;; split summary-and-rest - (let* ((s icalendar-import-format) + (let* ((case-fold-search nil) + (s icalendar-import-format) (p-cla (or (string-match "%c" icalendar-import-format) -1)) (p-des (or (string-match "%d" icalendar-import-format) -1)) (p-loc (or (string-match "%l" icalendar-import-format) -1)) @@ -1106,9 +1116,10 @@ (p-sum (or (string-match "%s" icalendar-import-format) -1)) (p-sta (or (string-match "%t" icalendar-import-format) -1)) (p-url (or (string-match "%u" icalendar-import-format) -1)) - (p-list (sort (list p-cla p-des p-loc p-org p-sta p-sum p-url) '<)) + (p-uid (or (string-match "%U" icalendar-import-format) -1)) + (p-list (sort (list p-cla p-des p-loc p-org p-sta p-sum p-url p-uid) '<)) (ct 0) - pos-cla pos-des pos-loc pos-org pos-sta pos-sum pos-url) + pos-cla pos-des pos-loc pos-org pos-sta pos-sum pos-url pos-uid) (dotimes (i (length p-list)) ;; Use 'ct' to keep track of current position in list (cond ((and (>= p-cla 0) (= (nth i p-list) p-cla)) @@ -1131,7 +1142,10 @@ (setq pos-sum (* 2 ct))) ((and (>= p-url 0) (= (nth i p-list) p-url)) (setq ct (+ ct 1)) - (setq pos-url (* 2 ct)))) ) + (setq pos-url (* 2 ct))) + ((and (>= p-uid 0) (= (nth i p-list) p-uid)) + (setq ct (+ ct 1)) + (setq pos-uid (* 2 ct)))) ) (mapc (lambda (ij) (setq s (icalendar--rris (car ij) (cadr ij) s t t))) (list @@ -1149,13 +1163,15 @@ (list "%t" (concat "\\(" icalendar-import-format-status "\\)??")) (list "%u" - (concat "\\(" icalendar-import-format-url "\\)??")))) + (concat "\\(" icalendar-import-format-url "\\)??")) + (list "%U" + (concat "\\(" icalendar-import-format-uid "\\)??")))) ;; Need the \' regexp in order to detect multi-line items (setq s (concat "\\`" (icalendar--rris "%s" "\\(.*?\\)" s nil t) "\\'")) (if (string-match s summary-and-rest) - (let (cla des loc org sta sum url) + (let (cla des loc org sta sum url uid) (if (and pos-sum (match-beginning pos-sum)) (setq sum (substring summary-and-rest (match-beginning pos-sum) @@ -1184,13 +1200,18 @@ (setq url (substring summary-and-rest (match-beginning pos-url) (match-end pos-url)))) + (if (and pos-uid (match-beginning pos-uid)) + (setq uid (substring summary-and-rest + (match-beginning pos-uid) + (match-end pos-uid)))) (list (if cla (cons 'cla cla) nil) (if des (cons 'des des) nil) (if loc (cons 'loc loc) nil) (if org (cons 'org org) nil) (if sta (cons 'sta sta) nil) ;;(if sum (cons 'sum sum) nil) - (if url (cons 'url url) nil)))))))) + (if url (cons 'url url) nil) + (if uid (cons 'uid uid) nil)))))))) ;; subroutines for icalendar-export-region (defun icalendar--convert-ordinary-to-ical (nonmarker entry-main) @@ -1864,6 +1885,7 @@ (if (functionp icalendar-import-format) (funcall icalendar-import-format event) (let ((string icalendar-import-format) + (case-fold-search nil) (conversion-list '(("%c" CLASS icalendar-import-format-class) ("%d" DESCRIPTION icalendar-import-format-description) @@ -1871,7 +1893,8 @@ ("%o" ORGANIZER icalendar-import-format-organizer) ("%s" SUMMARY icalendar-import-format-summary) ("%t" STATUS icalendar-import-format-status) - ("%u" URL icalendar-import-format-url)))) + ("%u" URL icalendar-import-format-url) + ("%U" UID icalendar-import-format-uid)))) ;; convert the specifiers in the format string (mapc (lambda (i) (let* ((spec (car i)) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon May 21 14:17:06 2012 Received: (at 11525) by debbugs.gnu.org; 21 May 2012 18:17:06 +0000 Received: from localhost ([127.0.0.1]:37558 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SWXAI-0005gP-E1 for submit@debbugs.gnu.org; Mon, 21 May 2012 14:17:06 -0400 Received: from mo-p05-ob.rzone.de ([81.169.146.181]:23431) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SWXAE-0005fv-4H for 11525@debbugs.gnu.org; Mon, 21 May 2012 14:17:04 -0400 X-RZG-AUTH: :OWACVUW4a/MW23Dy3JvWYzB9ib5hHLJRJ2XqtRyYWgVkgkqLLeiGkYceSCZx/n4= X-RZG-CLASS-ID: mo05 Received: from p55m-ud2 (p54B0AB35.dip.t-dialin.net [84.176.171.53]) by smtp.strato.de (josoe mo15) (RZmta 29.7 DYNA|AUTH) with ESMTPA id U01021o4LFR1tC ; Mon, 21 May 2012 20:15:14 +0200 (CEST) From: Ulf Jasper To: Leo Subject: Re: bug#11525: 24.0.97; Add icalendar-import-format-uid References: Date: Mon, 21 May 2012 20:13:07 +0200 In-Reply-To: (Leo's message of "Sun, 20 May 2012 21:54:34 +0800") Message-ID: <87vcjp1jyk.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11525 Cc: 11525@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Leo writes: > Hello Ulf, > > I am teaching Gnus to add invitation/events to diary and so I have found > UID in icalendar useful to identify events. Does it make sense to apply > the following patch, which I have been using since may 2011? Thanks. Makes perfect sense! I shall apply the patch the next days. From debbugs-submit-bounces@debbugs.gnu.org Tue May 29 15:48:04 2012 Received: (at 11525) by debbugs.gnu.org; 29 May 2012 19:48:05 +0000 Received: from localhost ([127.0.0.1]:48756 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SZSOi-0007Iy-J7 for submit@debbugs.gnu.org; Tue, 29 May 2012 15:48:04 -0400 Received: from mo-p05-ob.rzone.de ([81.169.146.180]:31906) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SZSOg-0007Ic-D7 for 11525@debbugs.gnu.org; Tue, 29 May 2012 15:48:03 -0400 X-RZG-AUTH: :OWACVUW4a/MW23Dy3JvWYzB9ib5hHLJRJ2XqtRyYWgVkgkqLLeiGkYcdTyZ2+RPy X-RZG-CLASS-ID: mo05 Received: from p55m-ud2 (p54B092F0.dip.t-dialin.net [84.176.146.240]) by smtp.strato.de (jorabe mo99) (RZmta 29.9 DYNA|AUTH) with ESMTPA id i01666o4TJivzY ; Tue, 29 May 2012 21:46:34 +0200 (CEST) From: Ulf Jasper To: Leo Subject: Re: bug#11525: 24.0.97; Add icalendar-import-format-uid References: <87vcjp1jyk.fsf@web.de> Date: Tue, 29 May 2012 21:44:20 +0200 In-Reply-To: <87vcjp1jyk.fsf@web.de> (Ulf Jasper's message of "Mon, 21 May 2012 20:13:07 +0200") Message-ID: <87pq9mzsa3.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11525 Cc: 11525@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Added/modified Unit Tests and applied to trunk. Done From debbugs-submit-bounces@debbugs.gnu.org Tue May 29 23:06:49 2012 Received: (at control) by debbugs.gnu.org; 30 May 2012 03:06:49 +0000 Received: from localhost ([127.0.0.1]:49115 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SZZFI-0000Je-Pn for submit@debbugs.gnu.org; Tue, 29 May 2012 23:06:49 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:36484 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SZZEu-0000JB-GP for control@debbugs.gnu.org; Tue, 29 May 2012 23:06:47 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SZZDV-0007yv-Jx for control@debbugs.gnu.org; Tue, 29 May 2012 23:04:57 -0400 Date: Tue, 29 May 2012 23:04:57 -0400 Message-Id: Subject: control message for bug 11525 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) close 11525 24.2 From unknown Wed Sep 10 03:03:10 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 27 Jun 2012 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator