diff --git a/doc/org.texi b/doc/org.texi index 52bcee352..cfb53146c 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -5225,9 +5225,12 @@ following will show up in the agenda every Wednesday: @end example @item Diary-style sexp entries -For more complex date specifications, Org-mode supports using the -special sexp diary entries implemented in the Emacs calendar/diary -package. For example +For more complex date specifications, Org-mode supports using the special +sexp diary entries implemented in the Emacs calendar/diary +package@footnote{Note that in diary sexp functions, the order of the +arguments sometimes evilly depend on the variable @code{calendar-date-style}, +e.g. @code{(diary-date 12 1 2005)} versus @code{(diary-date 1 12 2005)}.}. +For example @example * The nerd meeting on every 2nd Thursday of the month diff --git a/lisp/org-list.el b/lisp/org-list.el index 516022455..a8520fd8b 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -2629,10 +2629,10 @@ compare entries." "Parse the list at point and maybe DELETE it. Return a list whose car is a symbol of list type, among -`ordered', `unordered' and `descriptive'. Then, each item is a -list whose car is counter, and cdr are strings and other -sub-lists. Inside strings, checkboxes are replaced by \"[CBON]\" -and \"[CBOFF]\". +`ordered', `unordered' and `descriptive'. Then, each item is +a list whose car is counter, and cdr are strings and other +sub-lists. Inside strings, check-boxes are replaced by +\"[CBON]\", \"[CBOFF]\" and \"[CBTRANS]\". For example, the following list: @@ -2666,9 +2666,13 @@ Point is left at list end." ;; checkboxes replaced. (lambda (beg end) (let ((text (org-trim (buffer-substring beg end)))) - (if (string-match "\\`\\[\\([X ]\\)\\]" text) + (if (string-match "\\`\\[\\([-X ]\\)\\]" text) (replace-match - (if (equal (match-string 1 text) " ") "CBOFF" "CBON") + (let ((box (match-string 1 text))) + (cond + ((equal box " ") "CBOFF") + ((equal box "-") "CBTRANS") + (t "CBON"))) t nil text 1) text))))) (parse-sublist @@ -2834,8 +2838,9 @@ Valid parameters PARAMS are :lsep String to separate sublists :csep String to separate text from a sub-list -:cboff String to insert for an unchecked checkbox -:cbon String to insert for a checked checkbox +:cboff String to insert for an unchecked check-box +:cbon String to insert for a checked check-box +:cbtrans String to insert for a check-box in transitional state Alternatively, each parameter can also be a form returning a string. These sexp can use keywords `counter' and `depth', @@ -2864,6 +2869,7 @@ items." (csep (plist-get p :csep)) (cbon (plist-get p :cbon)) (cboff (plist-get p :cboff)) + (cbtrans (plist-get p :cbtrans)) export-sublist ; for byte-compiler (export-item (function @@ -2893,8 +2899,8 @@ items." (setq first (replace-match cbon t t first))) ((string-match "\\[CBOFF\\]" first) (setq first (replace-match cboff t t first))) - ((string-match "\\[-\\]" first) - (setq first (replace-match "$\\boxminus$" t t first)))) + ((string-match "\\[CBTRANS\\]" first) + (setq first (replace-match cbtrans t t first)))) ;; Insert descriptive term if TYPE is `descriptive'. (when (eq type 'descriptive) (let* ((complete (string-match "^\\(.*\\)[ \t]+::" first)) @@ -2953,7 +2959,8 @@ with overruling parameters for `org-list-to-generic'." enum (1- counter)) "\\item ")) :csep "\n" - :cbon "\\texttt{[X]}" :cboff "\\texttt{[ ]}") + :cbon "\\texttt{[X]}" :cboff "\\texttt{[ ]}" + :cbtrans "$\\boxminus$") params))) (defun org-list-to-html (list &optional params) @@ -2971,7 +2978,8 @@ with overruling parameters for `org-list-to-generic'." :istart "
[X]
" :cboff "[ ]
")
+ :cbon "[X]
" :cboff "[ ]
"
+ :cbtrans "[-]
")
params)))
(defun org-list-to-texinfo (list &optional params)
@@ -2988,7 +2996,8 @@ with overruling parameters for `org-list-to-generic'."
:istart "@item\n" :iend "\n"
:icount "@item\n"
:csep "\n"
- :cbon "@code{[X]}" :cboff "@code{[ ]}")
+ :cbon "@code{[X]}" :cboff "@code{[ ]}"
+ :cbtrans "@code{[-]}")
params)))
(defun org-list-to-subtree (list &optional params)
@@ -3022,7 +3031,7 @@ with overruling parameters for `org-list-to-generic'."
:icount (funcall get-stars depth)
:isep (if blankp "\n\n" "\n")
:csep (if blankp "\n\n" "\n")
- :cbon "DONE" :cboff "TODO")
+ :cbon "DONE" :cboff "TODO" :cbtrans "TODO")
params))))
(provide 'org-list)