1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-21 06:55:35 +00:00

Release 5.18

This commit is contained in:
Carsten Dominik 2008-01-31 11:38:36 +01:00
parent 8079032340
commit 218feee70e
12 changed files with 704 additions and 617 deletions

View File

@ -1,3 +1,27 @@
2008-01-06 Carsten Dominik <dominik@science.uva.nl>
* org-publish.el (org-publish-current-project): Fix bug with
forcing publication.
2008-01-04 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-table-sort-lines): Make sure sorting works on link
descritions only, and ignores the link.
2008-01-03 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-sort-entries-or-items): Make sure the end of the
subtree is included.
(org-refile-use-outline-path): New allowed values `file' and
`full-file-path'.
(org-get-refile-targets): Respect new values for
`org-refile-use-outline-path'.
(org-agenda-get-restriction-and-command): DEL goes back to initial
list.
(org-export-as-xoxo): Restore point when done.
(org-open-file): Allow multiple %s in command.
(org-clock-in-switch-to-state): New option.
2007-12-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-first-list-item-p): New function.

View File

@ -28,7 +28,12 @@ infodir = $(prefix)/info
# Using emacs in batch mode.
# BATCH=$(EMACS) -batch -q
BATCH=$(EMACS) -batch -q -eval "(add-to-list (quote load-path) \".\")"
# BATCH=$(EMACS) -batch -q -eval "(add-to-list (quote load-path) \".\")"
BATCH=$(EMACS) -batch -q -eval \
"(progn (add-to-list (quote load-path) \".\") \
(add-to-list (quote load-path) \"$(lispdir)\"))"
# Specify the byte-compiler for compiling org-mode files
ELC= $(BATCH) -f batch-byte-compile

928
org

File diff suppressed because it is too large Load Diff

0
org-export-latex.el Executable file → Normal file
View File

View File

@ -8,7 +8,7 @@
;;;;;; org-remember-insinuate org-open-at-point-global org-insert-link-global
;;;;;; org-store-link orgtbl-mode turn-on-orgtbl org-run-like-in-org-mode
;;;;;; turn-on-orgstruct++ turn-on-orgstruct orgstruct-mode org-global-cycle
;;;;;; org-cycle org-mode) "org" "org.el" (18282 28738))
;;;;;; org-cycle org-mode) "org" "org.el" (18304 36012))
;;; Generated autoloads from org.el
(autoload (quote org-mode) "org" "\
@ -441,7 +441,7 @@ The file is stored under the name `org-combined-agenda-icalendar-file'.
;;;***
;;;### (autoloads (org-publish-all org-publish-current-file org-publish-current-project
;;;;;; org-publish) "org-publish" "org-publish.el" (18207 29024))
;;;;;; org-publish) "org-publish" "org-publish.el" (18304 28298))
;;; Generated autoloads from org-publish.el
(autoload (quote org-publish) "org-publish" "\

View File

@ -1,10 +1,10 @@
;;; org-mouse.el --- Better mouse support for org-mode
;; Copyright (c) 2006 Piotr Zielinski, 2007 Free Software Foundation
;; Copyright (c) 2006 Piotr Zielinski, 2007, 2008 Free Software Foundation
;;
;; Author: Piotr Zielinski <piotr dot zielinski at gmail dot com>
;; Maintainer: Carsten Dominik <carsten at orgmode dot org>
;; Version: 5.11
;; Version: 5.18
;;
;; This file is part of GNU Emacs.
;;

View File

@ -1,10 +1,10 @@
;;; org-publish.el --- publish related org-mode files as a website
;; Copyright (C) 2006, 2007 Free Software Foundation, Inc.
;; Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
;; Author: David O'Toole <dto@gnu.org>
;; Keywords: hypermedia, outlines
;; Version: 1.80a
;; Version: 1.80b
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@ -572,11 +572,10 @@ default is 'index.org'."
With prefix argument, force publishing all files in project."
(interactive "P")
(save-window-excursion
(let* ((project-name (org-publish-get-project-from-filename (buffer-file-name)))
(org-publish-use-timestamps-flag (if force nil t)))
(let* ((project-name (org-publish-get-project-from-filename (buffer-file-name))))
(if (not project-name)
(error (format "File %s is not part of any known project." (buffer-file-name))))
(org-publish project-name))))
(org-publish project-name (if force nil t)))))
;;;###autoload

198
org.el
View File

@ -1,11 +1,11 @@
;;; org.el --- Outline-based notes management and organizer
;; Carstens outline-mode for keeping track of everything.
;; Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
;; Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
;;
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 5.17a
;; Version: 5.18
;;
;; This file is part of GNU Emacs.
;;
@ -1455,7 +1455,7 @@ Furthermore, the following %-escapes will be replaced with content:
%:keyword specific information for certain link types, see below
%[pathname] insert the contents of the file given by `pathname'
%(sexp) evaluate elisp `(sexp)' and replace with the result
%! Store this note immediately after filling the template
%? After completing the template, position cursor here.
@ -1544,9 +1544,15 @@ This is list of cons cells. Each cell contains:
(defcustom org-refile-use-outline-path nil
"Non-nil means, provide refile targets as paths.
So a level 3 headline will be available as level1/level2/level3."
So a level 3 headline will be available as level1/level2/level3.
When the value is `file', also include the file name (without directory)
into the path. When `full-file-path', include the full file path."
:group 'org-remember
:type 'boolean)
:type '(choice
(const :tag "Not" nil)
(const :tag "Yes" t)
(const :tag "Start with file name" file)
(const :tag "Start with full file path" full-file-path)))
(defgroup org-todo nil
"Options concerning TODO items in Org-mode."
@ -1769,6 +1775,15 @@ Nil means, clock will keep running until stopped explicitly with
:group 'org-progress
:type 'boolean)
(defcustom org-clock-in-switch-to-state nil
"Set task to a special todo state while clocking it.
The value should be the state to which the entry should be switched."
:group 'org-progress
:group 'org-todo
:type '(choice
(const :tag "Don't force a state" nil)
(string :tag "State")))
(defgroup org-priorities nil
"Priorities in Org-mode."
:tag "Org Priorities"
@ -2048,7 +2063,7 @@ for valid values of a property."
:type '(choice
(const :tag "Not" nil)
(const :tag "Always" nil)
(repeat :tag "Specific properties")))
(repeat :tag "Specific properties" (string :tag "Property"))))
(defcustom org-columns-default-format "%25ITEM %TODO %3PRIORITY %TAGS"
"The default column format, if no other format has been defined.
@ -2705,7 +2720,7 @@ contents, with a context symbol in the car of the list, any of
`agenda', `todo', `tags' for the corresponding agenda views."
:group 'org-agenda-sorting
:type `(choice
(repeat :tag "General" org-sorting-choice)
(repeat :tag "General" ,org-sorting-choice)
(list :tag "Individually"
(cons (const :tag "Strategy for Weekly/Daily agenda" agenda)
(repeat ,org-sorting-choice))
@ -4148,6 +4163,8 @@ If it is less than 8, the level-1 face gets re-used for level N+1 etc."
(defvar remember-data-file)
(defvar remember-register)
(defvar remember-buffer)
(defvar remember-handler-functions)
(defvar remember-annotation-functions)
(declare-function rmail-narrow-to-non-pruned-header "rmail" ())
(declare-function rmail-show-message "rmail" (&optional n no-summary))
(declare-function rmail-what-message "rmail" ())
@ -4698,7 +4715,9 @@ Works on both Emacs and XEmacs."
nil
(if (featurep 'xemacs)
(and zmacs-regions (region-active-p))
(and transient-mark-mode mark-active))))
(if (fboundp 'use-region-p)
(use-region-p)
(and transient-mark-mode mark-active))))) ; Emacs 22 and before
;; Invisibility compatibility
@ -5366,7 +5385,7 @@ between words."
'("^[ \t]*\\(\\(|\\|\\+-[-+]\\).*\\S-\\)"
(1 'org-table t))
;; Table internals
'("| *\\(:?=[^|\n]*\\)" (1 'org-formula t))
'("^[ \t]*|\\(?:.*?|\\)? *\\(:?=[^|\n]*\\)" (1 'org-formula t))
'("^[ \t]*| *\\([#*]\\) *|" (1 'org-formula t))
'("^[ \t]*|\\( *\\([$!_^/]\\) *|.*\\)|" (1 'org-formula t))
;; Drawers
@ -5723,6 +5742,16 @@ This function is the default value of the hook `org-cycle-hook'."
((eq state 'children) (or (org-subtree-end-visible-p) (recenter 1)))
((eq state 'subtree) (or (org-subtree-end-visible-p) (recenter 1))))))
(defun org-compact-display-after-subtree-move ()
(let (beg end)
(save-excursion
(if (org-up-heading-safe)
(progn
(hide-subtree)
(show-entry)
(show-children)
(org-cycle-show-empty-lines 'children))
(org-overview)))))
(defun org-cycle-show-empty-lines (state)
"Show empty lines above all visible headlines.
@ -6320,13 +6349,16 @@ is signaled in this case."
(setq cnt (1- cnt)))
(if (> arg 0)
;; Moving forward - still need to move over subtree
(progn (outline-end-of-subtree)
(org-back-over-empty-lines)
(or (bolp) (newline))))
(progn (org-end-of-subtree t t)
(save-excursion
(org-back-over-empty-lines)
(or (bolp) (newline)))))
(setq ne-ins (org-back-over-empty-lines))
(move-marker ins-point (point))
(setq txt (buffer-substring beg end))
(delete-region beg end)
(outline-flag-region (1- beg) beg nil)
(outline-flag-region (1- (point)) (point) nil)
(insert txt)
(or (bolp) (insert "\n"))
(setq ins-end (point))
@ -6341,8 +6373,11 @@ is signaled in this case."
(let ((kill-whole-line t))
(kill-line (- ne-ins ne-beg)) (point)))
(insert (make-string (- ne-ins ne-beg) ?\n)))
(if folded (hide-subtree))
(move-marker ins-point nil)))
(move-marker ins-point nil)
(org-compact-display-after-subtree-move)
(unless folded
(org-show-entry)
(show-children))))
(defvar org-subtree-clip ""
"Clipboard for cut and paste of subtrees.
@ -6366,7 +6401,7 @@ With prefix arg N, cut this many sequential subtrees.
This is a short-hand for marking the subtree and then copying it.
If CUT is non-nil, actually cut the subtree."
(interactive "p")
(let (beg end folded)
(let (beg end folded (beg0 (point)))
(if (interactive-p)
(org-back-to-heading nil) ; take what looks like a subtree
(org-back-to-heading t)) ; take what is really there
@ -6382,7 +6417,7 @@ If CUT is non-nil, actually cut the subtree."
(org-end-of-subtree t t))
(org-back-over-empty-lines)
(setq end (point))
(goto-char beg)
(goto-char beg0)
(when (> end beg)
(setq org-subtree-clip-folded folded)
(if cut (kill-region beg end) (copy-region-as-kill beg end))
@ -6458,8 +6493,9 @@ If optional TREE is given, use this text instead of the kill ring."
(delete-region (point-at-bol) (point)))
;; Paste
(beginning-of-line 1)
(org-back-over-empty-lines) ;; FIXME: correct fix????
(setq beg (point))
(insert txt)
(insert-before-markers txt) ;; FIXME: correct fix????
(unless (string-match "\n\\'" txt) (insert "\n"))
(setq end (point))
(goto-char beg)
@ -6566,7 +6602,11 @@ WITH-CASE, the sorting considers case as well."
(condition-case nil (progn (org-back-to-heading) t) (error nil)))
;; we will sort the children of the current headline
(org-back-to-heading)
(setq start (point) end (org-end-of-subtree) what "children")
(setq start (point)
end (progn (org-end-of-subtree t t)
(org-back-over-empty-lines)
(point))
what "children")
(goto-char start)
(show-subtree)
(outline-next-heading))
@ -6721,7 +6761,8 @@ If WITH-CASE is non-nil, the sorting will be case-sensitive."
(setq extractfun 'string-to-number
comparefun (if (= dcst sorting-type) '< '>)))
((= dcst ?a)
(setq extractfun (if with-case 'identity 'downcase)
(setq extractfun (if with-case (lambda(x) (org-sort-remove-invisible x))
(lambda(x) (downcase (org-sort-remove-invisible x))))
comparefun (if (= dcst sorting-type)
'string<
(lambda (a b) (and (not (string< a b))
@ -7046,6 +7087,13 @@ Error if not at a plain list, or if this is the first item in the list."
(error (goto-char pos)
(error "On first item")))))
(defun org-first-list-item-p ()
"Is this heading the item in a plain list?"
(unless (org-at-item-p)
(error "Not at a plain list item"))
(org-beginning-of-item)
(= (point) (save-excursion (org-beginning-of-item-list))))
(defun org-move-item-down ()
"Move the plain list item at point down, i.e. swap with following item.
Subitems (items with larger indentation) are considered part of the item,
@ -7476,7 +7524,7 @@ off orgstruct-mode will *not* remove these additonal settings."
(defun orgstruct-error ()
"Error when there is no default binding for a structure key."
(interactive)
(error "This key is has no function outside structure elements"))
(error "This key has no function outside structure elements"))
(defun orgstruct-setup ()
"Setup orgstruct keymaps."
@ -9030,8 +9078,11 @@ should be done in reverse order."
(skip-chars-backward "^|")
(setq ecol (1- (current-column)))
(org-table-goto-column column)
(setq lns (mapcar (lambda(x) (cons (org-sort-remove-invisible
(org-trim (substring x bcol ecol))) x))
(setq lns (mapcar (lambda(x) (cons
(org-sort-remove-invisible
(nth (1- column)
(org-split-string x "[ \t]*|[ \t]*")))
x))
(org-split-string (buffer-substring beg end) "\n")))
(setq lns (org-do-sort lns "Table" with-case sorting-type))
(delete-region beg end)
@ -9045,9 +9096,10 @@ should be done in reverse order."
;; FIXME: maybe we will not need this? Table sorting is broken....
(defun org-sort-remove-invisible (s)
(remove-text-properties 0 (length s) org-rm-props s)
(if (string-match org-bracket-link-regexp s)
(setq s (replace-match (if (match-end 2) (match-string 3 s)
(match-string 1 s)))))
(while (string-match org-bracket-link-regexp s)
(setq s (replace-match (if (match-end 2)
(match-string 3 s)
(match-string 1 s)) t t s)))
s)
(defun org-table-cut-region (beg end)
@ -11064,7 +11116,7 @@ to execute outside of tables."
(defun orgtbl-error ()
"Error when there is no default binding for a table key."
(interactive)
(error "This key is has no function outside tables"))
(error "This key has no function outside tables"))
(defun orgtbl-setup ()
"Setup orgtbl keymaps."
@ -11763,7 +11815,7 @@ For file links, arg negates `org-context-in-file-links'."
(elmo-msgdb-overview-get-entity
msgnum (wl-summary-buffer-msgdb))))
(from (wl-summary-line-from))
(to (elmo-message-entity-field wl-message-entity 'to))
(to (car (elmo-message-entity-field wl-message-entity 'to)))
(subject (let (wl-thr-indent-string wl-parent-message-entity)
(wl-summary-line-subject))))
(org-store-link-props :type "wl" :from from :to to
@ -11999,8 +12051,10 @@ according to FMT (default from `org-email-link-description-format')."
(error "Empty link"))
(when (stringp description)
;; Remove brackets from the description, they are fatal.
(while (string-match "\\[\\|\\]" description)
(setq description (replace-match "" t t description))))
(while (string-match "\\[" description)
(setq description (replace-match "{" t t description)))
(while (string-match "\\]" description)
(setq description (replace-match "}" t t description))))
(when (equal (org-link-escape link) description)
;; No description needed, it is identical
(setq description nil))
@ -12014,7 +12068,7 @@ according to FMT (default from `org-email-link-description-format')."
(defconst org-link-escape-chars
'((?\ . "%20")
(?\[ . "%5B")
(?\] . "%5d")
(?\] . "%5D")
(?\340 . "%E0") ; `a
(?\342 . "%E2") ; ^a
(?\347 . "%E7") ; ,c
@ -12035,7 +12089,6 @@ This is the list that is used for internal purposes.")
(defconst org-link-escape-chars-browser
'((?\ . "%20")) ; 32 for the SPC char
"Association list of escapes for some characters problematic in links.
This is the list that is used before handing over to the browser.")
@ -13116,9 +13169,10 @@ If the file does not exist, an error is thrown."
(cond
((and (stringp cmd) (not (string-match "^\\s-*$" cmd)))
;; Remove quotes around the file name - we'll use shell-quote-argument.
(if (string-match "['\"]%s['\"]" cmd)
(setq cmd (replace-match "%s" t t cmd)))
(setq cmd (format cmd (shell-quote-argument file)))
(while (string-match "['\"]%s['\"]" cmd)
(setq cmd (replace-match "%s" t t cmd)))
(while (string-match "%s" cmd)
(setq cmd (replace-match (shell-quote-argument file) t t cmd)))
(save-window-excursion
(start-process-shell-command cmd nil cmd)))
((or (stringp cmd)
@ -13383,7 +13437,7 @@ to be run from that hook to function properly."
(member char '("u" "U"))
nil nil (list org-end-time-was-given)))
(t
(insert (completing-read
(insert (org-completing-read
(concat (if prompt prompt "Enter string")
(if default (concat " [" default "]"))
": ")
@ -13427,7 +13481,7 @@ associated with a template in `org-remember-tempates'."
((equal goto '(4)) (org-go-to-remember-target))
((equal goto '(16)) (org-remember-goto-last-stored))
(t
(if (eq org-finish-function 'remember-buffer)
(if (memq org-finish-function '(remember-buffer remember-finalize))
(progn
(when (< (length org-remember-templates) 2)
(error "No other template available"))
@ -13528,6 +13582,8 @@ See also the variable `org-reverse-note-order'."
(setq file (car org-remember-previous-location)
heading (cdr org-remember-previous-location)))
(setq current-prefix-arg nil)
(if (string-match "[ \t\n]+\\'" txt)
(setq txt (replace-match "" t t txt)))
;; Modify text so that it becomes a nice subtree which can be inserted
;; into an org tree.
(let* ((lines (split-string txt "\n"))
@ -13735,8 +13791,14 @@ See also the variable `org-reverse-note-order'."
(setq re (concat re "[ \t]*$"))
(when org-refile-use-outline-path
(setq txt (mapconcat 'identity
(append (org-get-outline-path)
(list txt))
(append
(if (eq org-refile-use-outline-path 'file)
(list (file-name-nondirectory
(buffer-file-name (buffer-base-buffer))))
(if (eq org-refile-use-outline-path 'full-file-path)
(list (buffer-file-name (buffer-base-buffer)))))
(org-get-outline-path)
(list txt))
"/")))
(push (list txt f re (point)) targets))
(goto-char (point-at-eol))))))))
@ -18172,6 +18234,11 @@ If necessary, clock-out of the currently active clock."
(let (ts)
(save-excursion
(org-back-to-heading t)
(when (and org-clock-in-switch-to-state
(not (looking-at (concat outline-regexp "[ \t]*"
org-clock-in-switch-to-state
"\\>"))))
(org-todo org-clock-in-switch-to-state))
(if (and org-clock-heading-function
(functionp org-clock-heading-function))
(setq org-clock-heading (funcall org-clock-heading-function))
@ -19084,6 +19151,7 @@ Pressing `<' twice means to restrict to the current subtree or region
(interactive "P")
(catch 'exit
(let* ((prefix-descriptions nil)
(org-agenda-custom-commands-orig org-agenda-custom-commands)
(org-agenda-custom-commands
;; normalize different versions
(delq nil
@ -19168,7 +19236,9 @@ Pressing `<' twice means to restrict to the current subtree or region
(org-let lprops '(funcall type match)))
(t (error "Invalid custom agenda command type %s" type))))
(org-run-agenda-series (nth 1 entry) (cddr entry))))
((equal keys "C") (customize-variable 'org-agenda-custom-commands))
((equal keys "C")
(setq org-agenda-custom-commands org-agenda-custom-commands-orig)
(customize-variable 'org-agenda-custom-commands))
((equal keys "a") (call-interactively 'org-agenda-list))
((equal keys "t") (call-interactively 'org-todo-list))
((equal keys "T") (org-call-with-arg 'org-todo-list (or arg '(4))))
@ -19336,8 +19406,12 @@ L Timeline for current buffer # List stuck projects (!=configure)
((eq c ?>)
(org-agenda-remove-restriction-lock 'noupdate)
(setq restriction nil))
((and (equal selstring "") (memq c '(?a ?t ?m ?L ?C ?e ?T ?M ?# ?/)))
((and (equal selstring "") (memq c '(?a ?t ?m ?L ?C ?e ?T ?M ?# ?! ?/)))
(throw 'exit (cons (setq selstring (char-to-string c)) restriction)))
((and (> (length selstring) 0) (eq c ?\d))
(delete-window)
(org-agenda-get-restriction-and-command prefix-descriptions))
((equal c ?q) (error "Abort"))
(t (error "Invalid key %c" c))))))))
@ -19618,7 +19692,8 @@ is currently in place."
(setq files (apply 'append
(mapcar (lambda (f)
(if (file-directory-p f)
(directory-files f t "\\.org\\'")
(directory-files f t
org-agenda-file-regexp)
(list f)))
files)))
(if org-agenda-skip-unavailable-files
@ -19734,7 +19809,7 @@ Optional argument FILE means, use this file instead of the current."
(org-store-new-agenda-file-list files)
(org-install-agenda-files-menu)
(message "Removed file: %s" afile))
(message "File was not in list: %s" afile))))
(message "File was not in list: %s (not removed)" afile))))
(defun org-file-menu-entry (file)
(vector file (list 'find-file file) t))
@ -20417,12 +20492,12 @@ to skip this subtree. This is a function that can be put into
(defun org-agenda-skip-entry-if (&rest conditions)
"Skip entry if any of CONDITIONS is true.
See `org-agenda-skip-if for details."
See `org-agenda-skip-if' for details."
(org-agenda-skip-if nil conditions))
(defun org-agenda-skip-subtree-if (&rest conditions)
"Skip entry if any of CONDITIONS is true.
See `org-agenda-skip-if for details."
See `org-agenda-skip-if' for details."
(org-agenda-skip-if t conditions))
(defun org-agenda-skip-if (subtree conditions)
@ -20440,8 +20515,8 @@ notdeadline Check if there is no deadline
regexp Check if regexp matches
notregexp Check if regexp does not match.
The regexp is taken from the conditions list, it must com right after the
`regexp' of `notregexp' element.
The regexp is taken from the conditions list, it must come right after
the `regexp' or `notregexp' element.
If any of these conditions is met, this function returns the end point of
the entity, causing the search to continue from there. This is a function
@ -24435,14 +24510,16 @@ the body tags themselves."
(umax nil)
(umax-toc nil)
(filename (if to-buffer nil
(concat (file-name-as-directory
(org-export-directory :html opt-plist))
(file-name-sans-extension
(or (and subtree-p
(org-entry-get (region-beginning)
"EXPORT_FILE_NAME" t))
(file-name-nondirectory buffer-file-name)))
"." org-export-html-extension)))
(expand-file-name
(concat
(file-name-sans-extension
(or (and subtree-p
(org-entry-get (region-beginning)
"EXPORT_FILE_NAME" t))
(file-name-nondirectory buffer-file-name)))
"." org-export-html-extension)
(file-name-as-directory
(org-export-directory :html opt-plist)))))
(current-dir (if buffer-file-name
(file-name-directory buffer-file-name)
default-directory))
@ -25889,8 +25966,8 @@ The XOXO buffer is named *xoxo-<source buffer name>*"
;; Output everything as XOXO
(with-current-buffer (get-buffer buffer)
(goto-char (point-min)) ;; CD: beginning-of-buffer is not allowed.
(let* ((opt-plist (org-combine-plists (org-default-export-plist)
(let* ((pos (point))
(opt-plist (org-combine-plists (org-default-export-plist)
(org-infile-export-plist)))
(filename (concat (file-name-as-directory
(org-export-directory :xoxo opt-plist))
@ -25900,6 +25977,7 @@ The XOXO buffer is named *xoxo-<source buffer name>*"
(out (find-file-noselect filename))
(last-level 1)
(hanging-li nil))
(goto-char (point-min)) ;; CD: beginning-of-buffer is not allowed.
;; Check the output buffer is empty.
(with-current-buffer out (erase-buffer))
;; Kick off the output
@ -25952,6 +26030,7 @@ The XOXO buffer is named *xoxo-<source buffer name>*"
(org-export-as-xoxo-insert-into out "</li>\n"))
(org-export-as-xoxo-insert-into out "</ol>\n"))
(goto-char pos)
;; Finish the buffer off and clean it up.
(switch-to-buffer-other-window out)
(indent-region (point-min) (point-max) nil)
@ -27678,13 +27757,6 @@ Still experimental, may disappear in the future."
;; make tree, check each match with the callback
(org-occur "CLOSED: +\\[\\(.*?\\)\\]" nil callback)))
(defun org-first-list-item-p ()
"Is this heading the item in a plain list?"
(unless (org-at-item-p)
(error "Not at a plain list item"))
(org-beginning-of-item)
(= (point) (save-excursion (org-beginning-of-item-list))))
;;;; Finish up
(provide 'org)

BIN
org.pdf

Binary file not shown.

139
org.texi
View File

@ -3,8 +3,8 @@
@setfilename ../../info/org
@settitle Org Mode Manual
@set VERSION 5.17
@set DATE December 2007
@set VERSION 5.18
@set DATE January 2008
@dircategory Emacs
@direntry
@ -35,7 +35,7 @@
@copying
This manual is for Org-mode (version @value{VERSION}).
Copyright @copyright{} 2004, 2005, 2006, 2007 Free Software Foundation
Copyright @copyright{} 2004, 2005, 2006, 2007, 2008 Free Software Foundation
@quotation
Permission is granted to copy, distribute and/or modify this document
@ -387,7 +387,7 @@ agenda that utilizes and smoothly integrates much of the Emacs calendar
and diary. Plain text URL-like links connect to websites, emails,
Usenet messages, BBDB entries, and any files related to the projects.
For printing and sharing of notes, an Org-mode file can be exported as a
structured ASCII file, as HTML, or (todo and agenda items only) as an
structured ASCII file, as HTML, or (TODO and agenda items only) as an
iCalendar file. It can also serve as a publishing tool for a set of
linked webpages.
@ -1452,11 +1452,6 @@ that are not fully visible (@pxref{Narrow columns}). When called with a
@kbd{C-u} prefix, just make the full field visible, so that it can be
edited in place.
@c
@kindex C-c @key{TAB}
@item C-c @key{TAB}
This is an alias for @kbd{C-u C-c `} to make the current field fully
visible.
@c
@item M-x org-table-import
Import a file as a table. The table should be TAB- or whitespace
separated. Useful, for example, to import a spreadsheet table or data
@ -1723,8 +1718,8 @@ line like
@noindent
Also properties (@pxref{Properties and columns}) can be used as
constants in table formulas: For a property @samp{:XYZ:} use the name
@samp{$PROP_XYZ}, and the property will be searched in the current
constants in table formulas: For a property @samp{:Xyz:} use the name
@samp{$PROP_Xyz}, and the property will be searched in the current
outline entry and in the hierarchy above it. If you have the
@file{constants.el} package, it will also be used to resolve constants,
including natural constants like @samp{$h} for Planck's constant, and
@ -2686,7 +2681,7 @@ View TODO items in a @emph{sparse tree} (@pxref{Sparse trees}). Folds
the entire buffer, but shows all TODO items and the headings hierarchy
above them. With prefix arg, search for a specific TODO. You will be
prompted for the keyword, and you can also give a list of keywords like
@code{kwd1|kwd2|...}. With numerical prefix N, show the tree for the
@code{KWD1|KWD2|...}. With numerical prefix N, show the tree for the
Nth keyword in the variable @code{org-todo-keywords}. With two prefix
args, find all TODO and DONE entries.
@kindex C-c a t
@ -2934,7 +2929,7 @@ a TODO item.
If you want to keep track of @emph{when} a certain TODO item was
finished, turn on logging with@footnote{The corresponding in-buffer
setting is: @code{#+STARTUP: logdone}. You may also set this for the
scope of a subtree by adding a @code{LOGGING} property with one or more
scope of a subtree by adding a @code{:LOGGING:} property with one or more
of the logging keywords in the value.}
@lisp
@ -3356,7 +3351,7 @@ Select headlines tagged @samp{:work:}, but discard those also tagged
Selects lines tagged @samp{:work:} or @samp{:laptop:}.
@item work|laptop&night
Like before, but require the @samp{:laptop:} lines to be tagged also
@samp{night}.
@samp{:night:}.
@end table
@cindex TODO keyword matching, with tags search
@ -3387,7 +3382,7 @@ Select @samp{:work:}-tagged TODO lines that are either @samp{WAITING} or
Any element of the tag/todo match can be a regular expression - in this
case it must be enclosed in curly braces. For example,
@samp{work+@{^boss.*@}} matches headlines that contain the tag
@samp{work} and any tag @i{starting} with @samp{boss}.
@samp{:work:} and any tag @i{starting} with @samp{boss}.
@cindex level, require for tags/property match
@cindex category, require for tags/property match
@ -3408,7 +3403,7 @@ implement (very basic) database capabilities in an Org-mode buffer. For
an example of the first application, imagine maintaining a file where
you document bugs and plan releases of a piece of software. Instead of
using tags like @code{:release_1:}, @code{:release_2:}, one can use a
property, say @code{Release}, that in different subtrees has different
property, say @code{:Release:}, that in different subtrees has different
values, such as @code{1.0} or @code{2.0}. For an example of the second
application of properties, imagine keeping track of one's music CD's,
where properties could be things such as the album artist, date of
@ -3417,18 +3412,13 @@ release, number of tracks, and so on.
Properties can be conveiently edited and viewed in column view
(@pxref{Column view}).
are like tags, but with a value. For example, in a file where you
document bugs and plan releases of a piece of software, instead of using
tags like @code{:release_1:}, @code{:release_2:}, it can be more
efficient to use a property @code{Release} with a value @code{1.0} or
@code{2.0}. Second, you can use properties to implement (very basic)
database capabilities in an Org-mode buffer, for example to create a
list of Music CD's you own. You can edit and view properties
Properties are like tags, but with a value. For example, in a file
where you document bugs and plan releases of a piece of software,
instead of using tags like @code{:release_1:}, @code{:release_2:}, it
can be more efficient to use a property @code{:Release:} with a value
@code{1.0} or @code{2.0}. Second, you can use properties to implement
(very basic) database capabilities in an Org-mode buffer, for example to
create a list of Music CD's you own. You can edit and view properties
conveniently in column view (@pxref{Column view}).
@menu
@ -3463,8 +3453,8 @@ first, and the value after it. Here is an example:
:END:
@end example
You may define the allowed values for a particular property @samp{Xyz}
by setting a property @samp{Xyz_ALL}. This special property is
You may define the allowed values for a particular property @samp{:Xyz:}
by setting a property @samp{:Xyz_ALL:}. This special property is
@emph{inherited}, so if you set it in a level 1 entry, it will apply to
the entire tree. When allowed values are defined, setting the
corresponding property becomes easier and is less prone to typing
@ -3602,16 +3592,16 @@ least for the special applications for which they are used:
@table @code
@item COLUMNS
The column property defines the format of column view (@pxref{Column
view}). It is inherited in the sense that the level where a
@code{COLUMNS} property is defined is used as the starting point for a
column view table, independently of the location in the subtree from
where columns view is turned on.
The @code{:COLUMNS:} property defines the format of column view
(@pxref{Column view}). It is inherited in the sense that the level
where a @code{:COLUMNS:} property is defined is used as the starting
point for a column view table, independently of the location in the
subtree from where columns view is turned on.
@item CATEGORY
For agenda view, a category set through a @code{CATEGORY} property
For agenda view, a category set through a @code{:CATEGORY:} property
applies to the entire subtree.
@item ARCHIVE
For archiving, the @code{ARCHIVE} property may define the archive
For archiving, the @code{:ARCHIVE:} property may define the archive
location for the entire subtree (@pxref{Moving subtrees}).
@end table
@ -3660,8 +3650,9 @@ To define a column format for an entire file, use a line like
#+COLUMNS: %25ITEM %TAGS %PRIORITY %TODO
@end example
To specify a format that only applies to a specific tree, add a COLUMNS
property to the top node of that tree, for example
To specify a format that only applies to a specific tree, add a
@code{:COLUMNS:} property to the top node of that tree, for example:
@example
** Top node for columns view
:PROPERTIES:
@ -3669,7 +3660,7 @@ property to the top node of that tree, for example
:END:
@end example
If a @code{COLUMNS} property is present in an entry, it defines columns
If a @code{:COLUMNS:} property is present in an entry, it defines columns
for the entry itself, and for the entire subtree below it. Since the
column definition is part of the hierarchical structure of the document,
you can define columns on level 1 that are general enough for all
@ -3737,9 +3728,9 @@ an @samp{[X]} status if all children have been checked.
@kindex C-c C-x C-c
@item C-c C-x C-c
Create the column view for the local environment. This command searches
the hierarchy, up from point, for a @code{COLUMNS} property that defines
the hierarchy, up from point, for a @code{:COLUMNS:} property that defines
a format. When one is found, the column view table is established for
the entire tree, starting from the entry that contains the @code{COLUMNS}
the entire tree, starting from the entry that contains the @code{:COLUMNS:}
property. If none is found, the format is taken from the @code{#+COLUMNS}
line or from the variable @code{org-columns-default-format}, and column
view is established for the current entry and its subtree.
@ -5522,14 +5513,14 @@ search types:
(setq org-agenda-custom-commands
'(("w" todo "WAITING")
("W" todo-tree "WAITING")
("u" tags "+BOSS-URGENT")
("v" tags-todo "+BOSS-URGENT")
("U" tags-tree "+BOSS-URGENT")
("u" tags "+boss-urgent")
("v" tags-todo "+boss-urgent")
("U" tags-tree "+boss-urgent")
("f" occur-tree "\\<FIXME\\>")
("h" . "HOME+Name tags searches") ; description for "h" prefix
("hl" tags "+HOME+Lisa")
("hp" tags "+HOME+Peter")
("hk" tags "+HOME+Kim")))
("hl" tags "+home+Lisa")
("hp" tags "+home+Peter")
("hk" tags "+home+Kim")))
@end group
@end lisp
@ -5553,8 +5544,8 @@ keyword
as the same search, but only in the current buffer and displaying the
results as a sparse tree
@item C-c a u
as a global tags search for headlines marked @samp{:BOSS:} but not
@samp{:URGENT:}
as a global tags search for headlines marked @samp{:boss:} but not
@samp{:urgent:}
@item C-c a v
as the same search as @kbd{C-c a u}, but limiting the search to
headlines that are also TODO items
@ -5588,12 +5579,12 @@ matching commands discussed above: @code{todo}, @code{tags}, and
(setq org-agenda-custom-commands
'(("h" "Agenda and Home-related tasks"
((agenda)
(tags-todo "HOME")
(tags "GARDEN")))
(tags-todo "home")
(tags "garden")))
("o" "Agenda and Office-related tasks"
((agenda)
(tags-todo "WORK")
(tags "OFFICE")))))
(tags-todo "work")
(tags "office")))))
@end group
@end lisp
@ -5601,7 +5592,7 @@ matching commands discussed above: @code{todo}, @code{tags}, and
This will define @kbd{C-c a h} to create a multi-block view for stuff
you need to attend to at home. The resulting agenda buffer will contain
your agenda for the current week, all TODO items that carry the tag
@samp{HOME}, and also all lines tagged with @samp{GARDEN}. Finally the
@samp{home}, and also all lines tagged with @samp{garden}. Finally the
command @kbd{C-c a o} provides a similar view for office tasks.
@ -5622,7 +5613,7 @@ right spot in @code{org-agenda-custom-commands}. For example:
'(("w" todo "WAITING"
((org-agenda-sorting-strategy '(priority-down))
(org-agenda-prefix-format " Mixed: ")))
("U" tags-tree "+BOSS-URGENT"
("U" tags-tree "+boss-urgent"
((org-show-following-heading nil)
(org-show-hierarchy-above nil)))))
@end group
@ -5630,7 +5621,7 @@ right spot in @code{org-agenda-custom-commands}. For example:
@noindent
Now the @kbd{C-c a w} command will sort the collected entries only by
priority, and the prefix format is modified to just say @samp{ Mixed:}
priority, and the prefix format is modified to just say @samp{ Mixed: }
instead of giving the category of the entry. The sparse tags tree of
@kbd{C-c a U} will now turn out ultra-compact, because neither the
headline hierarchy above the match, nor the headline following the match
@ -5652,14 +5643,14 @@ the results for GARDEN tags query in the opposite order,
(setq org-agenda-custom-commands
'(("h" "Agenda and Home-related tasks"
((agenda)
(tags-todo "HOME")
(tags "GARDEN"
(tags-todo "home")
(tags "garden"
((org-agenda-sorting-strategy '(priority-up)))))
((org-agenda-sorting-strategy '(priority-down))))
("o" "Agenda and Office-related tasks"
((agenda)
(tags-todo "WORK")
(tags "OFFICE")))))
(tags-todo "work")
(tags "office")))))
@end group
@end lisp
@ -5718,14 +5709,14 @@ or absolute.
("Y" alltodo "" nil ("todo.html" "todo.txt" "todo.ps"))
("h" "Agenda and Home-related tasks"
((agenda)
(tags-todo "HOME")
(tags "GARDEN"))
(tags-todo "home")
(tags "garden"))
nil
("~/views/home.html"))
("o" "Agenda and Office-related tasks"
((agenda)
(tags-todo "WORK")
(tags "OFFICE"))
(tags-todo "work")
(tags "office"))
nil
("~/views/office.ps"))))
@end group
@ -6166,7 +6157,8 @@ will be @file{myfile.txt}. The file will be overwritten without
warning. If there is an active region, only the region will be
exported. If the selected region is a single tree, the tree head will
become the document title. If the tree head entry has or inherits an
EXPORT_FILE_NAME property, that name will be used for the export.
@code{:EXPORT_FILE_NAME:} property, that name will be used for the
export.
@kindex C-c C-e v a
@item C-c C-e v a
Export only the visible part of the document.
@ -6221,8 +6213,8 @@ Export as HTML file @file{myfile.html}. For an org file
will be overwritten without warning. If there is an active region, only
the region will be exported. If the selected region is a single tree,
the tree head will become the document title. If the tree head entry
has or inherits an EXPORT_FILE_NAME property, that name will be used for
the export.
has or inherits an @code{:EXPORT_FILE_NAME:} property, that name will be
used for the export.
@kindex C-c C-e b
@item C-c C-e b
Export as HTML file and immediately open it with a browser.
@ -6854,11 +6846,11 @@ Each element of the list configures one project, and may be in one of
the two following forms:
@lisp
("project-name" :property value :property value ...)
("project-name" :property value :property value ...)
@r{or}
("project-name" :components ("project-name" "project-name" ...))
("project-name" :components ("project-name" "project-name" ...))
@end lisp
@ -7264,7 +7256,8 @@ for all subsequent lines until the next @samp{#+CATEGORY} line, or the
end of the file. The first such line also applies to any entries before it.
@item #+COLUMNS: %25ITEM .....
Set the default format for columns view. This format applies when
columns view is invoked in location where no COLUMNS property applies.
columns view is invoked in location where no @code{COLUMNS} property
applies.
@item #+CONSTANTS: name1=value1 ...
Set file-local values for constants to be used in table formulas. This
line set the local variable @code{org-table-formula-constants-local}.
@ -8314,7 +8307,7 @@ search should continue from there.
(defun my-skip-unless-waiting ()
"Skip trees that are not waiting"
(let ((subtree-end (save-excursion (org-end-of-subtree t))))
(if (re-search-forward ":WAITING:" subtree-end t)
(if (re-search-forward ":waiting:" subtree-end t)
nil ; tag found, do not skip
subtree-end))) ; tag not found, continue after end of subtree
@end lisp
@ -8360,7 +8353,7 @@ like this, even without defining a special function:
(org-add-agenda-custom-command
'("b" todo "PROJECT"
((org-agenda-skip-function '(org-agenda-skip-subtree-if
'regexp ":WAITING:"))
'regexp ":waiting:"))
(org-agenda-overriding-header "Projects waiting for something: "))))
@end lisp

Binary file not shown.

View File

@ -1,7 +1,7 @@
% Reference Card for Org Mode
\def\orgversionnumber{5.17}
\def\versionyear{2007} % latest update
\def\year{2007} % latest copyright year
\def\orgversionnumber{5.18}
\def\versionyear{2008} % latest update
\def\year{2008} % latest copyright year
%**start of header
\newcount\columnsperpage
@ -19,7 +19,7 @@
% Nothing else needs to be changed below this line.
% Copyright (C) 1987, 1993, 1996, 1997, 2001, 2002, 2003, 2004,
% 2005, 2006, 2007 Free Software Foundation, Inc.
% 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
% This file is part of GNU Emacs.