emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tokuya Kameshima <kames@fa2.so-net.ne.jp>
To: emacs-orgmode@gnu.org
Cc: kames@fa2.so-net.ne.jp
Subject: patch to org-exp.el fixing priority value of icalendar export
Date: Tue, 28 Oct 2008 23:02:13 +0900 ()	[thread overview]
Message-ID: <20081028.230213.222899582.kames@fa2.so-net.ne.jp> (raw)

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

             reply	other threads:[~2008-10-28 14:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-28 14:02 Tokuya Kameshima [this message]
2008-10-28 14:40 ` patch to org-exp.el fixing priority value of icalendar export Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081028.230213.222899582.kames@fa2.so-net.ne.jp \
    --to=kames@fa2.so-net.ne.jp \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).