From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tokuya Kameshima Subject: patch to org-exp.el fixing priority value of icalendar export Date: Tue, 28 Oct 2008 23:02:13 +0900 () Message-ID: <20081028.230213.222899582.kames@fa2.so-net.ne.jp> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KupF7-0000Jn-Om for emacs-orgmode@gnu.org; Tue, 28 Oct 2008 10:08:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KupF6-0000I4-UG for emacs-orgmode@gnu.org; Tue, 28 Oct 2008 10:08:21 -0400 Received: from [199.232.76.173] (port=43397 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KupF6-0000Hh-ON for emacs-orgmode@gnu.org; Tue, 28 Oct 2008 10:08:20 -0400 Received: from mta.airbonet.com ([202.238.82.244]:35111 helo=mx53.ms.so-net.ne.jp) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KupF6-0003eu-3w for emacs-orgmode@gnu.org; Tue, 28 Oct 2008 10:08:20 -0400 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: emacs-orgmode@gnu.org Cc: kames@fa2.so-net.ne.jp Hi, Per RFC 2445, the priority value of 1 is the highest priority and 9 is the lowest priority. But `org-print-icalendar-entries' writes the opposite ones. Thanks, --Tokuya PS. I found this bug when I started using Rainlendar to view ICS exported events and tasks. ---------------------------------------- diff --git a/lisp/org-exp.el b/lisp/org-exp.el index 744952b..a4bf3ae 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -3826,7 +3826,7 @@ END:VEVENT\n" hd (concat (substring hd 0 (match-beginning 1)) (substring hd (match-end 1)))) (setq pri org-default-priority)) - (setq pri (floor (1+ (* 8. (/ (float (- org-lowest-priority pri)) + (setq pri (floor (- 9 (* 8. (/ (float (- org-lowest-priority pri)) (- org-lowest-priority org-highest-priority)))))) (princ (format "BEGIN:VTODO