From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: #+PRIORITIES: in XEmacs Date: Thu, 31 May 2007 16:39:17 +0200 Message-ID: References: Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HtloA-00015g-1M for emacs-orgmode@gnu.org; Thu, 31 May 2007 10:39:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Htlo7-00015U-Uy for emacs-orgmode@gnu.org; Thu, 31 May 2007 10:39:20 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Htlo7-00014v-K7 for emacs-orgmode@gnu.org; Thu, 31 May 2007 10:39:19 -0400 Received: from korteweg.uva.nl ([146.50.98.70]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Htlo6-0006Y5-Ae for emacs-orgmode@gnu.org; Thu, 31 May 2007 10:39:19 -0400 In-Reply-To: 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: Wes Nakamura Cc: emacs-orgmode This is a bug discussed a few days ago, will be fixed in the next version. - Carsten On May 30, 2007, at 20:55, Wes Nakamura wrote: > > When I attempt to use the new #+PRIORITIES: feature from 4.75 in = XEmacs > 21.5, I get the following trace when opening the file. It doesn't > matter if I'm using letters or numbers as priorities, or whether > variables such as org-lowest-priority are set. > > Any pointers? I'm particurly interested in using numbers as=20 > priorities. > > thanks, > Wes > > > (1) (file-mode-spec/warning) Error in File mode specification: Wrong=20= > type argument: arrayp, ?A > > Backtrace follows: > > aref(?A 0) > (org-set-local (quote org-highest-priority) (aref (nth 0 prio) 0)) > (progn (if (< (length prio) 3) (setq prio (quote ("A" "C" "B"))))=20 > (setq prio (mapcar (quote string-to-char) prio)) (org-set-local (quote=20= > org-highest-priority) (aref (nth 0 prio) 0)) (org-set-local (quote=20 > org-lowest-priority) (aref (nth 1 prio) 0)) (org-set-local (quote=20 > org-default-priority) (aref (nth 2 prio) 0))) > (if prio (progn (if (< (length prio) 3) (setq prio (quote ("A" "C"=20= > "B")))) (setq prio (mapcar (quote string-to-char) prio))=20 > (org-set-local (quote org-highest-priority) (aref (nth 0 prio) 0))=20 > (org-set-local (quote org-lowest-priority) (aref (nth 1 prio) 0))=20 > (org-set-local (quote org-default-priority) (aref (nth 2 prio) 0)))) > (when prio (if (< (length prio) 3) (setq prio (quote ("A" "C"=20 > "B")))) (setq prio (mapcar (quote string-to-char) prio))=20 > (org-set-local (quote org-highest-priority) (aref (nth 0 prio) 0))=20 > (org-set-local (quote org-lowest-priority) (aref (nth 1 prio) 0))=20 > (org-set-local (quote org-default-priority) (aref (nth 2 prio) 0))) > # bind (prio kws1 sep tail dws hw links tags arch cat value key kwds=20= > splitre re) > (let ((re (org-make-options-regexp (quote ("CATEGORY" "SEQ_TODO"=20 > "PRI_TODO" "TYP_TODO" "STARTUP" "ARCHIVE" "TAGS" "LINK"=20 > "PRIORITIES")))) (splitre "[ ]+") kwds key value cat arch tags links=20= > hw dws tail sep kws1 prio) (save-excursion (save-restriction (widen)=20= > (goto-char (point-min)) (while (re-search-forward re nil t) (setq key=20= > (match-string 1) value (org-match-string-no-properties 2)) (cond=20 > ((equal key "CATEGORY") (if (string-match "[ ]+$" value) (setq value=20= > (replace-match "" t t value))) (setq cat (intern value))) ((equal key=20= > "SEQ_TODO") (push (cons (quote sequence) (org-split-string value=20 > splitre)) kwds)) ((equal key "TYP_TODO") (push (cons (quote type)=20 > (org-split-string value splitre)) kwds)) ((equal key "TAGS") (setq=20 > tags (append tags (org-split-string value splitre)))) ((equal key=20 > "LINK") (when (string-match "^\\(\\S-+\\)[ ]+\\(.+\\)" value) (push=20= > (cons (match-string 1 value) (org-trim (match-string 2 value)))=20 > links))) ((equal key "PRIORITIES") (setq prio (org-split > -string " +" value))) ((equal key "STARTUP") (let ((opts=20 > (org-split-string value splitre)) l var val) (while (setq l (pop=20 > opts)) (when (setq l (assoc l org-startup-options)) (setq var (nth 1=20= > l) val (nth 2 l)) (if (not (nth 3 l)) (set (make-local-variable var)=20= > val) (if (not (listp (symbol-value var))) (set (make-local-variable=20 > var) nil)) (set (make-local-variable var) (symbol-value var))=20 > (add-to-list var val)))))) ((equal key "ARCHIVE") (string-match " *$"=20= > value) (setq arch (replace-match "" t t value))=20 > (remove-text-properties 0 (length arch) (quote (face t fontified t))=20= > arch)))))) (and cat (org-set-local (quote org-category) cat)) (when=20 > prio (if (< (length prio) 3) (setq prio (quote ("A" "C" "B")))) (setq=20= > prio (mapcar (quote string-to-char) prio)) (org-set-local (quote=20 > org-highest-priority) (aref (nth 0 prio) 0)) (org-set-local (quote=20 > org-lowest-priority) (aref (nth 1 prio) 0)) (org-set-local (quote=20 > org-default-priority) (aref (nth 2 prio) 0))) (and arch (org-set-local=20= > (quot > e org-archive-location) arch)) (and links (setq=20 > org-link-abbrev-alist-local (nreverse links))) (unless kwds (setq kwds=20= > (default-value (quote org-todo-keywords))) (if (stringp (car kwds))=20 > (setq kwds (list (cons org-todo-interpretation (default-value (quote=20= > org-todo-keywords)))))) (setq kwds (reverse kwds))) (setq kwds=20 > (nreverse kwds)) (let (inter kws) (while (setq kws (pop kwds)) (setq=20= > inter (pop kws) sep (member "|" kws) kws1 (delete "|" (copy-sequence=20= > kws)) hw (car kws1) dws (if sep (cdr sep) (last kws1)) tail (list=20 > inter hw (car dws) (org-last dws))) (add-to-list (quote=20 > org-todo-heads) hw (quote append)) (push kws1 org-todo-sets) (setq=20 > org-done-keywords (append org-done-keywords dws nil)) (mapc (lambda=20 > (x) (push (cons x tail) org-todo-kwd-alist)) kws1) (setq=20 > org-todo-keywords-1 (append org-todo-keywords-1 kws1 nil))) (setq=20 > org-todo-sets (nreverse org-todo-sets) org-todo-kwd-alist (nreverse=20 > org-todo-kwd-alist))) (when tags (let (e tgs) (while (setq e (pop=20 > tags)) (cond ((equ > al e "{") (push (quote (:startgroup)) tgs)) ((equal e "}") (push=20 > (quote (:endgroup)) tgs)) ((string-match=20 > "^\\([0-9a-zA-Z_@]+\\)(\\(.\\))$" e) (push (cons (match-string 1 e)=20 > (string-to-char (match-string 2 e))) tgs)) (t (push (list e) tgs))))=20= > (org-set-local (quote org-tag-alist) nil) (while (setq e (pop tgs))=20 > (or (and (stringp (car e)) (assoc (car e) org-tag-alist)) (push e=20 > org-tag-alist)))))) > (progn (org-set-local (quote org-todo-kwd-alist) nil) (org-set-local=20= > (quote org-todo-keywords-1) nil) (org-set-local (quote=20 > org-done-keywords) nil) (org-set-local (quote org-todo-heads) nil)=20 > (org-set-local (quote org-todo-sets) nil) (let ((re=20 > (org-make-options-regexp (quote ("CATEGORY" "SEQ_TODO" "PRI_TODO"=20 > "TYP_TODO" "STARTUP" "ARCHIVE" "TAGS" "LINK" "PRIORITIES")))) (splitre=20= > "[ ]+") kwds key value cat arch tags links hw dws tail sep kws1 = prio)=20 > (save-excursion (save-restriction (widen) (goto-char (point-min))=20 > (while (re-search-forward re nil t) (setq key (match-string 1) value=20= > (org-match-string-no-properties 2)) (cond ((equal key "CATEGORY") (if=20= > (string-match "[ ]+$" value) (setq value (replace-match "" t t=20 > value))) (setq cat (intern value))) ((equal key "SEQ_TODO") (push=20 > (cons (quote sequence) (org-split-string value splitre)) kwds))=20 > ((equal key "TYP_TODO") (push (cons (quote type) (org-split-string=20 > value splitre)) kwds)) ((equal key "TAGS") (setq tags (append tags=20 > (org > -split-string value splitre)))) ((equal key "LINK") (when=20 > (string-match "^\\(\\S-+\\)[ ]+\\(.+\\)" value) (push (cons=20 > (match-string 1 value) (org-trim (match-string 2 value))) links)))=20 > ((equal key "PRIORITIES") (setq prio (org-split-string " +" value)))=20= > ((equal key "STARTUP") (let ((opts (org-split-string value splitre)) l=20= > var val) (while (setq l (pop opts)) (when (setq l (assoc l=20 > org-startup-options)) (setq var (nth 1 l) val (nth 2 l)) (if (not (nth=20= > 3 l)) (set (make-local-variable var) val) (if (not (listp=20 > (symbol-value var))) (set (make-local-variable var) nil)) (set=20 > (make-local-variable var) (symbol-value var)) (add-to-list var=20 > val)))))) ((equal key "ARCHIVE") (string-match " *$" value) (setq arch=20= > (replace-match "" t t value)) (remove-text-properties 0 (length arch)=20= > (quote (face t fontified t)) arch)))))) (and cat (org-set-local (quote=20= > org-category) cat)) (when prio (if (< (length prio) 3) (setq prio=20 > (quote ("A" "C" "B")))) (setq prio (mapcar (quote string-to-char)=20 > prio) > ) (org-set-local (quote org-highest-priority) (aref (nth 0 prio) 0))=20= > (org-set-local (quote org-lowest-priority) (aref (nth 1 prio) 0))=20 > (org-set-local (quote org-default-priority) (aref (nth 2 prio) 0)))=20 > (and arch (org-set-local (quote org-archive-location) arch)) (and=20 > links (setq org-link-abbrev-alist-local (nreverse links))) (unless=20 > kwds (setq kwds (default-value (quote org-todo-keywords))) (if=20 > (stringp (car kwds)) (setq kwds (list (cons org-todo-interpretation=20 > (default-value (quote org-todo-keywords)))))) (setq kwds (reverse=20 > kwds))) (setq kwds (nreverse kwds)) (let (inter kws) (while (setq kws=20= > (pop kwds)) (setq inter (pop kws) sep (member "|" kws) kws1 (delete=20 > "|" (copy-sequence kws)) hw (car kws1) dws (if sep (cdr sep) (last=20 > kws1)) tail (list inter hw (car dws) (org-last dws))) (add-to-list=20 > (quote org-todo-heads) hw (quote append)) (push kws1 org-todo-sets)=20 > (setq org-done-keywords (append org-done-keywords dws nil)) (mapc=20 > (lambda (x) (push (cons x tail) org-todo-kwd-alist > )) kws1) (setq org-todo-keywords-1 (append org-todo-keywords-1 kws1=20= > nil))) (setq org-todo-sets (nreverse org-todo-sets) org-todo-kwd-alist=20= > (nreverse org-todo-kwd-alist))) (when tags (let (e tgs) (while (setq e=20= > (pop tags)) (cond ((equal e "{") (push (quote (:startgroup)) tgs))=20 > ((equal e "}") (push (quote (:endgroup)) tgs)) ((string-match=20 > "^\\([0-9a-zA-Z_@]+\\)(\\(.\\))$" e) (push (cons (match-string 1 e)=20 > (string-to-char (match-string 2 e))) tgs)) (t (push (list e) tgs))))=20= > (org-set-local (quote org-tag-alist) nil) (while (setq e (pop tgs))=20 > (or (and (stringp (car e)) (assoc (car e) org-tag-alist)) (push e=20 > org-tag-alist)))))) (if (not org-done-keywords) (setq=20 > org-done-keywords (list (org-last org-todo-keywords-1)))) (setq=20 > org-ds-keyword-length (+ 2 (max (length org-deadline-string) (length=20= > org-scheduled-string))) org-not-done-keywords (org-delete-all=20 > org-done-keywords (copy-sequence org-todo-keywords-1)) org-todo-regexp=20= > (concat "\\<\\(" (mapconcat (quote regexp-quote) org-todo-k > eywords-1 "\\|") "\\)\\>") org-not-done-regexp (concat "\\<\\("=20 > (mapconcat (quote regexp-quote) org-not-done-keywords "\\|") "\\)\\>")=20= > org-todo-line-regexp (concat "^\\(\\*+\\)[ ]*\\(?:\\(" (mapconcat=20= > (quote regexp-quote) org-todo-keywords-1 "\\|") "\\)\\>\\)?=20 > *\\(.*\\)") org-nl-done-regexp (concat "[\n]\\*+[ ]+" "\\(?:"=20 > (mapconcat (quote regexp-quote) org-done-keywords "\\|") "\\)" "\\>")=20= > org-todo-line-tags-regexp (concat "^\\(\\*+\\)[ ]*\\(?:\\("=20 > (mapconcat (quote regexp-quote) org-todo-keywords-1 "\\|") "\\)\\>\\)?=20= > *\\(.*?\\([ ]:[a-zA-Z0-9:_@]+:[ ]*\\)?$\\)")=20 > org-looking-at-done-regexp (concat "^" "\\(?:" (mapconcat (quote=20 > regexp-quote) org-done-keywords "\\|") "\\)" "\\>")=20 > org-deadline-regexp (concat "\\<" org-deadline-string)=20 > org-deadline-time-regexp (concat "\\<" org-deadline-string "=20 > *<\\([^>]+\\)>") org-deadline-line-regexp (concat "\\<\\("=20 > org-deadline-string "\\).*") org-scheduled-regexp (concat "\\<"=20 > org-scheduled-string) org-scheduled-time-regexp (concat "\\ > <" org-scheduled-string " *<\\([^>]+\\)>") org-closed-time-regexp=20 > (concat "\\<" org-closed-string " *\\[\\([^]]+\\)\\]")=20 > org-keyword-time-regexp (concat "\\<\\(" org-scheduled-string "\\|"=20 > org-deadline-string "\\|" org-closed-string "\\|" org-clock-string=20 > "\\)" " *[[<]\\([^]>]+\\)[]>]") org-keyword-time-not-clock-regexp=20 > (concat "\\<\\(" org-scheduled-string "\\|" org-deadline-string "\\|"=20= > org-closed-string "\\)" " *[[<]\\([^]>]+\\)[]>]")=20 > org-maybe-keyword-time-regexp (concat "\\(\\<\\(" org-scheduled-string=20= > "\\|" org-deadline-string "\\|" org-closed-string "\\|"=20 > org-clock-string "\\)\\)?" "=20 > *\\([[<][0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}=20 > [^]\n>]*?[]>]\\|<%%([^\n>]*>\\)") org-planning-or-clock-line-re=20 > (concat "\\(?:^[ ]*\\(" org-scheduled-string "\\|"=20 > org-deadline-string "\\|" org-closed-string "\\|" org-clock-string=20 > "\\)\\>\\)")) (org-set-font-lock-defaults)) > (if (org-mode-p) (progn (org-set-local (quote org-todo-kwd-alist)=20 > nil) (org-set-local (quote org-todo-keywords-1) nil) (org-set-local=20 > (quote org-done-keywords) nil) (org-set-local (quote org-todo-heads)=20= > nil) (org-set-local (quote org-todo-sets) nil) (let ((re=20 > (org-make-options-regexp (quote ("CATEGORY" "SEQ_TODO" "PRI_TODO"=20 > "TYP_TODO" "STARTUP" "ARCHIVE" "TAGS" "LINK" "PRIORITIES")))) (splitre=20= > "[ ]+") kwds key value cat arch tags links hw dws tail sep kws1 = prio)=20 > (save-excursion (save-restriction (widen) (goto-char (point-min))=20 > (while (re-search-forward re nil t) (setq key (match-string 1) value=20= > (org-match-string-no-properties 2)) (cond ((equal key "CATEGORY") (if=20= > (string-match "[ ]+$" value) (setq value (replace-match "" t t=20 > value))) (setq cat (intern value))) ((equal key "SEQ_TODO") (push=20 > (cons (quote sequence) (org-split-string value splitre)) kwds))=20 > ((equal key "TYP_TODO") (push (cons (quote type) (org-split-string=20 > value splitre)) kwds)) ((equal key "TAGS") (setq tags > (append tags (org-split-string value splitre)))) ((equal key "LINK")=20= > (when (string-match "^\\(\\S-+\\)[ ]+\\(.+\\)" value) (push (cons=20= > (match-string 1 value) (org-trim (match-string 2 value))) links)))=20 > ((equal key "PRIORITIES") (setq prio (org-split-string " +" value)))=20= > ((equal key "STARTUP") (let ((opts (org-split-string value splitre)) l=20= > var val) (while (setq l (pop opts)) (when (setq l (assoc l=20 > org-startup-options)) (setq var (nth 1 l) val (nth 2 l)) (if (not (nth=20= > 3 l)) (set (make-local-variable var) val) (if (not (listp=20 > (symbol-value var))) (set (make-local-variable var) nil)) (set=20 > (make-local-variable var) (symbol-value var)) (add-to-list var=20 > val)))))) ((equal key "ARCHIVE") (string-match " *$" value) (setq arch=20= > (replace-match "" t t value)) (remove-text-properties 0 (length arch)=20= > (quote (face t fontified t)) arch)))))) (and cat (org-set-local (quote=20= > org-category) cat)) (when prio (if (< (length prio) 3) (setq prio=20 > (quote ("A" "C" "B")))) (setq prio (mapcar (quote stri > ng-to-char) prio)) (org-set-local (quote org-highest-priority) (aref=20= > (nth 0 prio) 0)) (org-set-local (quote org-lowest-priority) (aref (nth=20= > 1 prio) 0)) (org-set-local (quote org-default-priority) (aref (nth 2=20= > prio) 0))) (and arch (org-set-local (quote org-archive-location)=20 > arch)) (and links (setq org-link-abbrev-alist-local (nreverse links)))=20= > (unless kwds (setq kwds (default-value (quote org-todo-keywords))) (if=20= > (stringp (car kwds)) (setq kwds (list (cons org-todo-interpretation=20 > (default-value (quote org-todo-keywords)))))) (setq kwds (reverse=20 > kwds))) (setq kwds (nreverse kwds)) (let (inter kws) (while (setq kws=20= > (pop kwds)) (setq inter (pop kws) sep (member "|" kws) kws1 (delete=20 > "|" (copy-sequence kws)) hw (car kws1) dws (if sep (cdr sep) (last=20 > kws1)) tail (list inter hw (car dws) (org-last dws))) (add-to-list=20 > (quote org-todo-heads) hw (quote append)) (push kws1 org-todo-sets)=20 > (setq org-done-keywords (append org-done-keywords dws nil)) (mapc=20 > (lambda (x) (push (cons x tail) o > rg-todo-kwd-alist)) kws1) (setq org-todo-keywords-1 (append=20 > org-todo-keywords-1 kws1 nil))) (setq org-todo-sets (nreverse=20 > org-todo-sets) org-todo-kwd-alist (nreverse org-todo-kwd-alist)))=20 > (when tags (let (e tgs) (while (setq e (pop tags)) (cond ((equal e=20 > "{") (push (quote (:startgroup)) tgs)) ((equal e "}") (push (quote=20 > (:endgroup)) tgs)) ((string-match "^\\([0-9a-zA-Z_@]+\\)(\\(.\\))$" e)=20= > (push (cons (match-string 1 e) (string-to-char (match-string 2 e)))=20 > tgs)) (t (push (list e) tgs)))) (org-set-local (quote org-tag-alist)=20= > nil) (while (setq e (pop tgs)) (or (and (stringp (car e)) (assoc (car=20= > e) org-tag-alist)) (push e org-tag-alist)))))) (if (not=20 > org-done-keywords) (setq org-done-keywords (list (org-last=20 > org-todo-keywords-1)))) (setq org-ds-keyword-length (+ 2 (max (length=20= > org-deadline-string) (length org-scheduled-string)))=20 > org-not-done-keywords (org-delete-all org-done-keywords (copy-sequence=20= > org-todo-keywords-1)) org-todo-regexp (concat "\\<\\(" (mapconcat=20 > (quote regexp- > quote) org-todo-keywords-1 "\\|") "\\)\\>") org-not-done-regexp=20 > (concat "\\<\\(" (mapconcat (quote regexp-quote) org-not-done-keywords=20= > "\\|") "\\)\\>") org-todo-line-regexp (concat "^\\(\\*+\\)[=20 > ]*\\(?:\\(" (mapconcat (quote regexp-quote) org-todo-keywords-1=20= > "\\|") "\\)\\>\\)? *\\(.*\\)") org-nl-done-regexp (concat "[\n]\\*+[=20= > ]+" "\\(?:" (mapconcat (quote regexp-quote) org-done-keywords = "\\|")=20 > "\\)" "\\>") org-todo-line-tags-regexp (concat "^\\(\\*+\\)[=20 > ]*\\(?:\\(" (mapconcat (quote regexp-quote) org-todo-keywords-1=20= > "\\|") "\\)\\>\\)? *\\(.*?\\([ ]:[a-zA-Z0-9:_@]+:[ = ]*\\)?$\\)")=20 > org-looking-at-done-regexp (concat "^" "\\(?:" (mapconcat (quote=20 > regexp-quote) org-done-keywords "\\|") "\\)" "\\>")=20 > org-deadline-regexp (concat "\\<" org-deadline-string)=20 > org-deadline-time-regexp (concat "\\<" org-deadline-string "=20 > *<\\([^>]+\\)>") org-deadline-line-regexp (concat "\\<\\("=20 > org-deadline-string "\\).*") org-scheduled-regexp (concat "\\<"=20 > org-scheduled-string) org-scheduled-time-r > egexp (concat "\\<" org-scheduled-string " *<\\([^>]+\\)>")=20 > org-closed-time-regexp (concat "\\<" org-closed-string "=20 > *\\[\\([^]]+\\)\\]") org-keyword-time-regexp (concat "\\<\\("=20 > org-scheduled-string "\\|" org-deadline-string "\\|" org-closed-string=20= > "\\|" org-clock-string "\\)" " *[[<]\\([^]>]+\\)[]>]")=20 > org-keyword-time-not-clock-regexp (concat "\\<\\("=20 > org-scheduled-string "\\|" org-deadline-string "\\|" org-closed-string=20= > "\\)" " *[[<]\\([^]>]+\\)[]>]") org-maybe-keyword-time-regexp (concat=20= > "\\(\\<\\(" org-scheduled-string "\\|" org-deadline-string "\\|"=20 > org-closed-string "\\|" org-clock-string "\\)\\)?" "=20 > *\\([[<][0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}=20 > [^]\n>]*?[]>]\\|<%%([^\n>]*>\\)") org-planning-or-clock-line-re=20 > (concat "\\(?:^[ ]*\\(" org-scheduled-string "\\|"=20 > org-deadline-string "\\|" org-closed-string "\\|" org-clock-string=20 > "\\)\\>\\)")) (org-set-font-lock-defaults))) > (when (org-mode-p) (org-set-local (quote org-todo-kwd-alist) nil)=20 > (org-set-local (quote org-todo-keywords-1) nil) (org-set-local (quote=20= > org-done-keywords) nil) (org-set-local (quote org-todo-heads) nil)=20 > (org-set-local (quote org-todo-sets) nil) (let ((re=20 > (org-make-options-regexp (quote ("CATEGORY" "SEQ_TODO" "PRI_TODO"=20 > "TYP_TODO" "STARTUP" "ARCHIVE" "TAGS" "LINK" "PRIORITIES")))) (splitre=20= > "[ ]+") kwds key value cat arch tags links hw dws tail sep kws1 = prio)=20 > (save-excursion (save-restriction (widen) (goto-char (point-min))=20 > (while (re-search-forward re nil t) (setq key (match-string 1) value=20= > (org-match-string-no-properties 2)) (cond ((equal key "CATEGORY") (if=20= > (string-match "[ ]+$" value) (setq value (replace-match "" t t=20 > value))) (setq cat (intern value))) ((equal key "SEQ_TODO") (push=20 > (cons (quote sequence) (org-split-string value splitre)) kwds))=20 > ((equal key "TYP_TODO") (push (cons (quote type) (org-split-string=20 > value splitre)) kwds)) ((equal key "TAGS") (setq tags (appe > nd tags (org-split-string value splitre)))) ((equal key "LINK") (when=20= > (string-match "^\\(\\S-+\\)[ ]+\\(.+\\)" value) (push (cons=20 > (match-string 1 value) (org-trim (match-string 2 value))) links)))=20 > ((equal key "PRIORITIES") (setq prio (org-split-string " +" value)))=20= > ((equal key "STARTUP") (let ((opts (org-split-string value splitre)) l=20= > var val) (while (setq l (pop opts)) (when (setq l (assoc l=20 > org-startup-options)) (setq var (nth 1 l) val (nth 2 l)) (if (not (nth=20= > 3 l)) (set (make-local-variable var) val) (if (not (listp=20 > (symbol-value var))) (set (make-local-variable var) nil)) (set=20 > (make-local-variable var) (symbol-value var)) (add-to-list var=20 > val)))))) ((equal key "ARCHIVE") (string-match " *$" value) (setq arch=20= > (replace-match "" t t value)) (remove-text-properties 0 (length arch)=20= > (quote (face t fontified t)) arch)))))) (and cat (org-set-local (quote=20= > org-category) cat)) (when prio (if (< (length prio) 3) (setq prio=20 > (quote ("A" "C" "B")))) (setq prio (mapcar (quote string-to > -char) prio)) (org-set-local (quote org-highest-priority) (aref (nth=20= > 0 prio) 0)) (org-set-local (quote org-lowest-priority) (aref (nth 1=20 > prio) 0)) (org-set-local (quote org-default-priority) (aref (nth 2=20 > prio) 0))) (and arch (org-set-local (quote org-archive-location)=20 > arch)) (and links (setq org-link-abbrev-alist-local (nreverse links)))=20= > (unless kwds (setq kwds (default-value (quote org-todo-keywords))) (if=20= > (stringp (car kwds)) (setq kwds (list (cons org-todo-interpretation=20 > (default-value (quote org-todo-keywords)))))) (setq kwds (reverse=20 > kwds))) (setq kwds (nreverse kwds)) (let (inter kws) (while (setq kws=20= > (pop kwds)) (setq inter (pop kws) sep (member "|" kws) kws1 (delete=20 > "|" (copy-sequence kws)) hw (car kws1) dws (if sep (cdr sep) (last=20 > kws1)) tail (list inter hw (car dws) (org-last dws))) (add-to-list=20 > (quote org-todo-heads) hw (quote append)) (push kws1 org-todo-sets)=20 > (setq org-done-keywords (append org-done-keywords dws nil)) (mapc=20 > (lambda (x) (push (cons x tail) org-to > do-kwd-alist)) kws1) (setq org-todo-keywords-1 (append=20 > org-todo-keywords-1 kws1 nil))) (setq org-todo-sets (nreverse=20 > org-todo-sets) org-todo-kwd-alist (nreverse org-todo-kwd-alist)))=20 > (when tags (let (e tgs) (while (setq e (pop tags)) (cond ((equal e=20 > "{") (push (quote (:startgroup)) tgs)) ((equal e "}") (push (quote=20 > (:endgroup)) tgs)) ((string-match "^\\([0-9a-zA-Z_@]+\\)(\\(.\\))$" e)=20= > (push (cons (match-string 1 e) (string-to-char (match-string 2 e)))=20 > tgs)) (t (push (list e) tgs)))) (org-set-local (quote org-tag-alist)=20= > nil) (while (setq e (pop tgs)) (or (and (stringp (car e)) (assoc (car=20= > e) org-tag-alist)) (push e org-tag-alist)))))) (if (not=20 > org-done-keywords) (setq org-done-keywords (list (org-last=20 > org-todo-keywords-1)))) (setq org-ds-keyword-length (+ 2 (max (length=20= > org-deadline-string) (length org-scheduled-string)))=20 > org-not-done-keywords (org-delete-all org-done-keywords (copy-sequence=20= > org-todo-keywords-1)) org-todo-regexp (concat "\\<\\(" (mapconcat=20 > (quote regexp-quote > ) org-todo-keywords-1 "\\|") "\\)\\>") org-not-done-regexp (concat=20 > "\\<\\(" (mapconcat (quote regexp-quote) org-not-done-keywords "\\|")=20= > "\\)\\>") org-todo-line-regexp (concat "^\\(\\*+\\)[ ]*\\(?:\\("=20 > (mapconcat (quote regexp-quote) org-todo-keywords-1 "\\|") "\\)\\>\\)?=20= > *\\(.*\\)") org-nl-done-regexp (concat "[\n]\\*+[ ]+" "\\(?:"=20 > (mapconcat (quote regexp-quote) org-done-keywords "\\|") "\\)" "\\>")=20= > org-todo-line-tags-regexp (concat "^\\(\\*+\\)[ ]*\\(?:\\("=20 > (mapconcat (quote regexp-quote) org-todo-keywords-1 "\\|") "\\)\\>\\)?=20= > *\\(.*?\\([ ]:[a-zA-Z0-9:_@]+:[ ]*\\)?$\\)")=20 > org-looking-at-done-regexp (concat "^" "\\(?:" (mapconcat (quote=20 > regexp-quote) org-done-keywords "\\|") "\\)" "\\>")=20 > org-deadline-regexp (concat "\\<" org-deadline-string)=20 > org-deadline-time-regexp (concat "\\<" org-deadline-string "=20 > *<\\([^>]+\\)>") org-deadline-line-regexp (concat "\\<\\("=20 > org-deadline-string "\\).*") org-scheduled-regexp (concat "\\<"=20 > org-scheduled-string) org-scheduled-time-regexp > (concat "\\<" org-scheduled-string " *<\\([^>]+\\)>")=20 > org-closed-time-regexp (concat "\\<" org-closed-string "=20 > *\\[\\([^]]+\\)\\]") org-keyword-time-regexp (concat "\\<\\("=20 > org-scheduled-string "\\|" org-deadline-string "\\|" org-closed-string=20= > "\\|" org-clock-string "\\)" " *[[<]\\([^]>]+\\)[]>]")=20 > org-keyword-time-not-clock-regexp (concat "\\<\\("=20 > org-scheduled-string "\\|" org-deadline-string "\\|" org-closed-string=20= > "\\)" " *[[<]\\([^]>]+\\)[]>]") org-maybe-keyword-time-regexp (concat=20= > "\\(\\<\\(" org-scheduled-string "\\|" org-deadline-string "\\|"=20 > org-closed-string "\\|" org-clock-string "\\)\\)?" "=20 > *\\([[<][0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}=20 > [^]\n>]*?[]>]\\|<%%([^\n>]*>\\)") org-planning-or-clock-line-re=20 > (concat "\\(?:^[ ]*\\(" org-scheduled-string "\\|"=20 > org-deadline-string "\\|" org-closed-string "\\|" org-clock-string=20 > "\\)\\>\\)")) (org-set-font-lock-defaults)) > org-set-regexps-and-options() > # bind (delay-mode-hooks) > (let ((delay-mode-hooks t)) (outline-mode) (setq major-mode (quote=20= > org-mode)) (setq mode-name "Org") (progn (if (get (quote outline-mode)=20= > (quote mode-class)) (put (quote org-mode) (quote mode-class) (get=20 > (quote outline-mode) (quote mode-class)))) (unless (keymap-parent=20 > org-mode-map) (set-keymap-parents org-mode-map (list=20 > (current-local-map)))) (derived-mode-merge-syntax-tables=20 > (syntax-table) org-mode-syntax-table)) (use-local-map org-mode-map)=20 > (set-syntax-table org-mode-syntax-table) (setq local-abbrev-table=20 > org-mode-abbrev-table) (if (featurep (quote xemacs)) (when (boundp=20 > (quote outline-mode-menu-heading)) (easy-menu-remove=20 > outline-mode-menu-heading) (easy-menu-remove outline-mode-menu-show)=20= > (easy-menu-remove outline-mode-menu-hide)) (define-key org-mode-map=20 > [menu-bar headings] (quote undefined)) (define-key org-mode-map=20 > [menu-bar hide] (quote undefined)) (define-key org-mode-map [menu-bar=20= > show] (quote undefined))) (easy-menu-add org-org-menu) (easy-menu-add=20= > org-tbl-menu) > (org-install-agenda-files-menu) (if org-descriptive-links=20 > (org-add-to-invisibility-spec (quote (org-link))))=20 > (org-add-to-invisibility-spec (quote (org-cwidth))) (when (featurep=20 > (quote xemacs)) (org-set-local (quote line-move-ignore-invisible) t))=20= > (setq outline-regexp "\\*+") (setq outline-level (quote=20 > org-outline-level)) (when (and org-ellipsis (stringp org-ellipsis)=20 > (fboundp (quote set-display-table-slot)) (boundp (quote=20 > buffer-display-table))) (unless org-display-table (setq=20 > org-display-table (make-display-table))) (set-display-table-slot=20 > org-display-table 4 (string-to-vector org-ellipsis)) (setq=20 > buffer-display-table org-display-table)) (org-set-regexps-and-options)=20= > (org-set-local (quote calc-embedded-open-mode) "# ")=20 > (modify-syntax-entry ?\# "<") (modify-syntax-entry ?@ "w") (if=20 > org-startup-truncated (setq truncate-lines t)) (org-set-local (quote=20= > font-lock-unfontify-region-function) (quote org-unfontify-region))=20 > (org-set-local (quote org-table-may-need-update) t) (org-ad > d-hook (quote before-change-functions) (quote=20 > org-before-change-function) nil (quote local)) (org-add-hook (quote=20 > kill-buffer-hook) (quote org-check-running-clock) nil (quote local))=20= > (org-set-autofill-regexps) (setq indent-line-function (quote=20 > org-indent-line-function)) (org-update-radio-target-regexp)=20 > (org-set-local (quote comment-padding) " ") (if (or (featurep (quote=20= > xemacs)) (not (boundp (quote=20 > outline-isearch-open-invisible-function)))) (org-add-hook (quote=20 > isearch-mode-end-hook) (quote org-isearch-end) (quote append) (quote=20= > local)) (org-set-local (quote outline-isearch-open-invisible-function)=20= > (lambda (&rest ignore) (org-show-context (quote isearch))))) (if (and=20= > org-insert-mode-line-in-empty-file (interactive-p) (=3D (point-min)=20 > (point-max))) (insert "# -*- mode: org -*-\n\n")) (unless=20 > org-inhibit-startup (when org-startup-align-all-tables (let ((bmp=20 > (buffer-modified-p))) (org-table-map-tables (quote org-table-align))=20= > (set-buffer-modified-p bmp))) (cond ((eq org-start > up-folded t) (org-cycle (quote (4)))) ((eq org-startup-folded (quote=20= > content)) (let ((this-command (quote org-cycle)) (last-command (quote=20= > org-cycle))) (org-cycle (quote (4))) (org-cycle (quote (4)))))))) > (progn (make-local-variable (quote delay-mode-hooks)) (let=20 > ((delay-mode-hooks t)) (outline-mode) (setq major-mode (quote=20 > org-mode)) (setq mode-name "Org") (progn (if (get (quote outline-mode)=20= > (quote mode-class)) (put (quote org-mode) (quote mode-class) (get=20 > (quote outline-mode) (quote mode-class)))) (unless (keymap-parent=20 > org-mode-map) (set-keymap-parents org-mode-map (list=20 > (current-local-map)))) (derived-mode-merge-syntax-tables=20 > (syntax-table) org-mode-syntax-table)) (use-local-map org-mode-map)=20 > (set-syntax-table org-mode-syntax-table) (setq local-abbrev-table=20 > org-mode-abbrev-table) (if (featurep (quote xemacs)) (when (boundp=20 > (quote outline-mode-menu-heading)) (easy-menu-remove=20 > outline-mode-menu-heading) (easy-menu-remove outline-mode-menu-show)=20= > (easy-menu-remove outline-mode-menu-hide)) (define-key org-mode-map=20 > [menu-bar headings] (quote undefined)) (define-key org-mode-map=20 > [menu-bar hide] (quote undefined)) (define-key org-mode-map [menu-bar=20= > show] (quote undefined))) (ea > sy-menu-add org-org-menu) (easy-menu-add org-tbl-menu)=20 > (org-install-agenda-files-menu) (if org-descriptive-links=20 > (org-add-to-invisibility-spec (quote (org-link))))=20 > (org-add-to-invisibility-spec (quote (org-cwidth))) (when (featurep=20 > (quote xemacs)) (org-set-local (quote line-move-ignore-invisible) t))=20= > (setq outline-regexp "\\*+") (setq outline-level (quote=20 > org-outline-level)) (when (and org-ellipsis (stringp org-ellipsis)=20 > (fboundp (quote set-display-table-slot)) (boundp (quote=20 > buffer-display-table))) (unless org-display-table (setq=20 > org-display-table (make-display-table))) (set-display-table-slot=20 > org-display-table 4 (string-to-vector org-ellipsis)) (setq=20 > buffer-display-table org-display-table)) (org-set-regexps-and-options)=20= > (org-set-local (quote calc-embedded-open-mode) "# ")=20 > (modify-syntax-entry ?\# "<") (modify-syntax-entry ?@ "w") (if=20 > org-startup-truncated (setq truncate-lines t)) (org-set-local (quote=20= > font-lock-unfontify-region-function) (quote org-unfontify-region))=20 > (org- > set-local (quote org-table-may-need-update) t) (org-add-hook (quote=20= > before-change-functions) (quote org-before-change-function) nil (quote=20= > local)) (org-add-hook (quote kill-buffer-hook) (quote=20 > org-check-running-clock) nil (quote local)) (org-set-autofill-regexps)=20= > (setq indent-line-function (quote org-indent-line-function))=20 > (org-update-radio-target-regexp) (org-set-local (quote=20 > comment-padding) " ") (if (or (featurep (quote xemacs)) (not (boundp=20= > (quote outline-isearch-open-invisible-function)))) (org-add-hook=20 > (quote isearch-mode-end-hook) (quote org-isearch-end) (quote append)=20= > (quote local)) (org-set-local (quote=20 > outline-isearch-open-invisible-function) (lambda (&rest ignore)=20 > (org-show-context (quote isearch))))) (if (and=20 > org-insert-mode-line-in-empty-file (interactive-p) (=3D (point-min)=20 > (point-max))) (insert "# -*- mode: org -*-\n\n")) (unless=20 > org-inhibit-startup (when org-startup-align-all-tables (let ((bmp=20 > (buffer-modified-p))) (org-table-map-tables (quote org-table-alig > n)) (set-buffer-modified-p bmp))) (cond ((eq org-startup-folded t)=20 > (org-cycle (quote (4)))) ((eq org-startup-folded (quote content)) (let=20= > ((this-command (quote org-cycle)) (last-command (quote org-cycle)))=20 > (org-cycle (quote (4))) (org-cycle (quote (4))))))))) > (delay-mode-hooks (outline-mode) (setq major-mode (quote org-mode))=20= > (setq mode-name "Org") (progn (if (get (quote outline-mode) (quote=20 > mode-class)) (put (quote org-mode) (quote mode-class) (get (quote=20 > outline-mode) (quote mode-class)))) (unless (keymap-parent=20 > org-mode-map) (set-keymap-parents org-mode-map (list=20 > (current-local-map)))) (derived-mode-merge-syntax-tables=20 > (syntax-table) org-mode-syntax-table)) (use-local-map org-mode-map)=20 > (set-syntax-table org-mode-syntax-table) (setq local-abbrev-table=20 > org-mode-abbrev-table) (if (featurep (quote xemacs)) (when (boundp=20 > (quote outline-mode-menu-heading)) (easy-menu-remove=20 > outline-mode-menu-heading) (easy-menu-remove outline-mode-menu-show)=20= > (easy-menu-remove outline-mode-menu-hide)) (define-key org-mode-map=20 > [menu-bar headings] (quote undefined)) (define-key org-mode-map=20 > [menu-bar hide] (quote undefined)) (define-key org-mode-map [menu-bar=20= > show] (quote undefined))) (easy-menu-add org-org-menu) (easy-menu-add=20= > org-tbl-menu) (org-inst > all-agenda-files-menu) (if org-descriptive-links=20 > (org-add-to-invisibility-spec (quote (org-link))))=20 > (org-add-to-invisibility-spec (quote (org-cwidth))) (when (featurep=20 > (quote xemacs)) (org-set-local (quote line-move-ignore-invisible) t))=20= > (setq outline-regexp "\\*+") (setq outline-level (quote=20 > org-outline-level)) (when (and org-ellipsis (stringp org-ellipsis)=20 > (fboundp (quote set-display-table-slot)) (boundp (quote=20 > buffer-display-table))) (unless org-display-table (setq=20 > org-display-table (make-display-table))) (set-display-table-slot=20 > org-display-table 4 (string-to-vector org-ellipsis)) (setq=20 > buffer-display-table org-display-table)) (org-set-regexps-and-options)=20= > (org-set-local (quote calc-embedded-open-mode) "# ")=20 > (modify-syntax-entry ?\# "<") (modify-syntax-entry ?@ "w") (if=20 > org-startup-truncated (setq truncate-lines t)) (org-set-local (quote=20= > font-lock-unfontify-region-function) (quote org-unfontify-region))=20 > (org-set-local (quote org-table-may-need-update) t) (org-add-hook (qu > ote before-change-functions) (quote org-before-change-function) nil=20= > (quote local)) (org-add-hook (quote kill-buffer-hook) (quote=20 > org-check-running-clock) nil (quote local)) (org-set-autofill-regexps)=20= > (setq indent-line-function (quote org-indent-line-function))=20 > (org-update-radio-target-regexp) (org-set-local (quote=20 > comment-padding) " ") (if (or (featurep (quote xemacs)) (not (boundp=20= > (quote outline-isearch-open-invisible-function)))) (org-add-hook=20 > (quote isearch-mode-end-hook) (quote org-isearch-end) (quote append)=20= > (quote local)) (org-set-local (quote=20 > outline-isearch-open-invisible-function) (lambda (&rest ignore)=20 > (org-show-context (quote isearch))))) (if (and=20 > org-insert-mode-line-in-empty-file (interactive-p) (=3D (point-min)=20 > (point-max))) (insert "# -*- mode: org -*-\n\n")) (unless=20 > org-inhibit-startup (when org-startup-align-all-tables (let ((bmp=20 > (buffer-modified-p))) (org-table-map-tables (quote org-table-align))=20= > (set-buffer-modified-p bmp))) (cond ((eq org-startup-folded > t) (org-cycle (quote (4)))) ((eq org-startup-folded (quote content))=20= > (let ((this-command (quote org-cycle)) (last-command (quote=20 > org-cycle))) (org-cycle (quote (4))) (org-cycle (quote (4)))))))) > org-mode() > # bind (alist mode name keep-going) > # (unwind-protect ...) > # bind (just-from-file-name) > set-auto-mode() > #() > # (unwind-protect ...) > call-with-condition-handler(# (__call_trapping_errors_arg__) "...(17)" [__call_trapping_errors_arg__=20= > errstr error-message-string lwarn file-mode-spec warning "Error in %s:=20= > %s\n\nBacktrace follows:\n\n%s" "File mode specification"=20 > backtrace-in-condition-handler-eliminating-handler] 8>=20 > #) > # (condition-case ... . ((error))) > # bind (find-file) > normal-mode(t) > # bind (nomodes after-find-file-from-revert-buffer noauto warn = error) > after-find-file(nil t) > # (unwind-protect ...) > # bind (inhibit-read-only error number truename rawfile nowarn=20 > filename buf) > find-file-noselect-1(# "/home/wknaka/doit/hi.org"=20= > nil nil "/home/wknaka/doit/hi.org" (1786546 772)) > byte-code("..." [number truename rawfile nowarn filename buf=20 > set-buffer-major-mode find-file-noselect-1] 7) > # (condition-case ... . ((t (byte-code "=C2=08!=88=C3 @ = A\"=87" [buf data=20 > kill-buffer signal] 3)))) > # bind (number truename buf wildcards rawfile nowarn filename) > find-file-noselect("/home/wknaka/doit/hi.org" nil nil nil) > # bind (wildcards codesys filename) > find-file("/home/wknaka/doit/hi.org") > # bind (line path client frame device dest-frame new-frame=20 > old-device-num quick view flags list type) > gnuserv-edit-files((x ":0.0") ((1 . "/home/wknaka/doit/hi.org"))) > eval((gnuserv-edit-files (quote (x ":0.0")) (quote ((1 .=20 > "/home/wknaka/doit/hi.org"))))) > byte-code("..." [header gnuserv-string eval read-from-string] 4) > # (condition-case ... . ((error (byte-code "=C3=10\n=AB=85=C4\n = \"=88=C5=12=C6 @ A\"=87"=20 > [gnuserv-string oops gnuserv-current-client "" gnuserv-write-to-client=20= > nil signal] 3)) (quit (byte-code "=C3=11\n=AB=85=C4\n=08\"=88=C5=12=C6=C7= =C5\"=87" [oops=20 > gnuserv-string gnuserv-current-client "" gnuserv-write-to-client nil=20= > signal quit] 3)))) > # bind (header string proc) > gnuserv-process-filter(# "5=20= > (gnuserv-edit-files '(x \":0.0\") '((1 .=20 > \"/home/wknaka/doit/hi.org\")))=04") > ("execute_internal_event()" "[internal]") > (dispatch-event "[internal]") > # (condition-case ... . error) > # (catch top-level ...) > > > > _______________________________________________ > Emacs-orgmode mailing list > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > -- Carsten Dominik Sterrenkundig Instituut "Anton Pannekoek" Universiteit van Amsterdam Kruislaan 403 NL-1098SJ Amsterdam phone: +31 20 525 7477