;;; org.el --- Outline-based notes management and organizer
;; Carstens outline-mode for keeping track of everything.
-;; Copyright (C) 2004-2012 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2012 Free Software Foundation, Inc.
;;
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Maintainer: Bastien Guerry <bzg at gnu dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
-;; Version: 7.8.07
+;; Version: 7.8.09
;;
;; This file is part of GNU Emacs.
;;
requirements) is loaded."
:group 'org-babel
:set 'org-babel-do-load-languages
+ :version "24.1"
:type '(alist :tag "Babel Languages"
:key-type
(choice
Otherwise they inherit the ID property with a new unique
identifier."
:type 'boolean
+ :version "24.1"
:group 'org-id)
;;; Version
-(defconst org-version "7.8.07"
+(defconst org-version "7.8.09"
"The version number of the file org.el.")
;;;###autoload
(defcustom org-log-buffer-setup-hook nil
"Hook that is run after an Org log buffer is created."
:group 'org
+ :version "24.1"
:type 'hook)
(defvar org-modules) ; defined below
(const :tag "All headlines in active region" t)
(const :tag "In active region, headlines at the same level than the first one" 'start-level)
(string :tag "Tags/Property/Todo matcher"))
+ :version "24.1"
:group 'org-todo
:group 'org-archive)
This option can also be set with the +OPTIONS line, e.g. \"^:nil\"."
:group 'org-startup
:group 'org-export-translation
+ :version "24.1"
:type '(choice
(const :tag "Always interpret" t)
(const :tag "Only with braces" {})
#+STARTUP: beamer"
:group 'org-startup
+ :version "24.1"
:type 'boolean)
(defcustom org-startup-align-all-tables nil
#+STARTUP: inlineimages
#+STARTUP: noinlineimages"
:group 'org-startup
+ :version "24.1"
:type 'boolean)
(defcustom org-insert-mode-line-in-empty-file nil
Any other non-nil value will result in a query to the user, if it is
OK to kill that hidden subtree. When nil, kill without remorse."
:group 'org-edit-structure
+ :version "24.1"
:type '(choice
(const :tag "Do not protect hidden subtrees" nil)
(const :tag "Protect hidden subtrees with a security query" t)
allows insertion and backward-delete right before ellipses.
FIXME: maybe in this case we should not even show?"
:group 'org-edit-structure
+ :version "24.1"
:type '(choice
(const :tag "Do not check" nil)
(const :tag "Throw error when trying to edit" error)
When nil, the link search tries to match a phrase with all words
in the search text."
:group 'org-link-follow
+ :version "24.1"
:type '(choice
(const :tag "Use fuzzy text search" nil)
(const :tag "Match only exact headline" t)
(defcustom org-confirm-shell-link-not-regexp ""
"A regexp to skip confirmation for shell links."
:group 'org-link-follow
+ :version "24.1"
:type 'regexp)
(defcustom org-confirm-elisp-link-function 'yes-or-no-p
(defcustom org-confirm-elisp-link-not-regexp ""
"A regexp to skip confirmation for Elisp links."
:group 'org-link-follow
+ :version "24.1"
:type 'regexp)
(defconst org-file-apps-defaults-gnu
will temporarily be changed to `time'."
:group 'org-refile
:group 'org-progress
+ :version "24.1"
:type '(choice
(const :tag "No logging" nil)
(const :tag "Record timestamp" time)
you need to clear the cache manually by pressing `C-0 C-c C-w' or, if you
find that easier, `C-u C-u C-u C-c C-w'."
:group 'org-refile
+ :version "24.1"
:type 'boolean)
(defcustom org-refile-use-outline-path nil
do so sometimes: in that case, the first line of the region is
converted to a headline before refiling."
:group 'org-refile
+ :version "24.1"
:type 'boolean)
(defgroup org-todo nil
(defcustom org-after-todo-state-change-hook nil
"Hook which is run after the state of a TODO item was changed.
The new state (a string with a TODO keyword, or nil) is available in the
-Lisp variable `state'."
+Lisp variable `org-state'."
:group 'org-todo
:type 'hook)
in a TODO_TYP set. But you can specify another task here.
alternatively, set the :REPEAT_TO_STATE: property of the entry."
:group 'org-todo
+ :version "24.1"
:type '(choice (const :tag "Head of sequence" nil)
(string :tag "Specific state")))
The user can set a different function here, which should take a string
as an argument and return the numeric priority."
:group 'org-priorities
+ :version "24.1"
:type 'function)
(defgroup org-time nil
This may t or nil, or the symbol `org-read-date-prefer-future'."
:group 'org-agenda
:group 'org-time
+ :version "24.1"
:type '(choice
(const :tag "Use org-read-date-prefer-future"
org-read-date-prefer-future)
A workaround for this problem is to use diary sexp dates for time
stamps outside of this range."
:group 'org-time
+ :version "24.1"
:type 'boolean)
(defcustom org-read-date-display-live t
For example, if `org-extend-today-until' is 8, and it's 4am, then the
\"effective time\" of any timestamps between midnight and 8am will be
23:59 of the previous day."
- :group 'boolean
- :type 'integer)
+ :group 'org-time
+ :version "24.1"
+ :type 'boolean)
(defcustom org-edit-timestamp-down-means-later nil
"Non-nil means S-down will increase the time in a time stamp.
'org-complete-tags-always-offer-all-agenda-tags)
t)))"
:group 'org-tags
+ :version "24.1"
:type 'boolean)
(defvar org-file-tags nil
(org-entry-get (point) \"Effort\"))))
(org-minutes-to-hh:mm-string (- effort clocksum))))))"
:group 'org-properties
+ :version "24.1"
:type 'alist)
(defcustom org-use-property-inheritance nil
"Non-nil means signal an error when image creation of LaTeX snippets fails.
When nil, just push out a message."
:group 'org-latex
+ :version "24.1"
:type 'boolean)
(defcustom org-latex-to-mathml-jar-file nil
"Value of\"%j\" in `org-latex-to-mathml-convert-command'.
When using MathToWeb as the converter, specify the full-path to
your mathtoweb.jar file."
:group 'org-latex
+ :version "24.1"
:type '(choice
(const :tag "None" nil)
(file :tag "JAR file" :must-match t)))
When using MathToWeb as the converter, set this to
\"java -jar %j -unicode -force -df %o %I\"."
:group 'org-latex
+ :version "24.1"
:type '(choice
(const :tag "None" nil)
(string :tag "\nShell command")))
:group 'org-export-latex
:set 'org-set-packages-alist
:get 'org-get-packages-alist
+ :version "24.1"
:type '(repeat
(choice
(list :tag "options/package pair"
For example, a value '(title) for this list will make the document's title
appear in the buffer without the initial #+TITLE: keyword."
:group 'org-appearance
+ :version "24.1"
:type '(set (const :tag "#+AUTHOR" author)
(const :tag "#+DATE" date)
(const :tag "#+EMAIL" email)
"Non-nil means show entities as UTF8 characters.
When nil, the \\name form remains in the buffer."
:group 'org-appearance
+ :version "24.1"
:type 'boolean)
(defcustom org-pretty-entities-include-sub-superscripts t
"Non-nil means, pretty entity display includes formatting sub/superscripts."
:group 'org-appearance
+ :version "24.1"
:type 'boolean)
(defvar org-emph-re nil
;; FIXME: Occasionally check by commenting these, to make sure
;; no other functions uses these, forgetting to let-bind them.
-(defvar org-entry)
+(defvar entry)
(defvar org-last-state)
(defvar date)
(defcustom org-src-fontify-natively nil
"When non-nil, fontify code in code blocks."
:type 'boolean
+ :version "24.1"
:group 'org-appearance
:group 'org-babel)
(when (re-search-forward
(concat "^[ \t]*#\\+end" (match-string 4) "\\>.*")
nil t) ;; on purpose, we look further than LIMIT
- (setq end (match-end 0) end1 (1- (match-beginning 0)))
+ (setq end (min (point-max) (match-end 0))
+ end1 (min (point-max) (1- (match-beginning 0))))
(setq block-end (match-beginning 0))
(when quoting
(remove-text-properties beg end
'(face org-block))) ; end of source block
((not org-fontify-quote-and-verse-blocks))
((string= block-type "quote")
- (add-text-properties beg1 (1+ end1) '(face org-quote)))
+ (add-text-properties beg1 (min (point-max) (1+ end1)) '(face org-quote)))
((string= block-type "verse")
- (add-text-properties beg1 (1+ end1) '(face org-verse))))
+ (add-text-properties beg1 (min (point-max) (1+ end1)) '(face org-verse))))
(add-text-properties beg beg1 '(face org-block-begin-line))
- (add-text-properties (1+ end) (1+ end1) '(face org-block-end-line))
+ (add-text-properties (min (point-max) (1+ end)) (min (point-max) (1+ end1))
+ '(face org-block-end-line))
t))
((member dc1 '("title:" "author:" "email:" "date:"))
(add-text-properties
((not (member (char-after beg) '(?\ ?\t)))
;; just any other in-buffer setting, but not indented
(add-text-properties
- beg (1+ (match-end 0))
+ beg (match-end 0)
'(font-lock-fontified t face org-meta-line))
t)
((or (member dc1 '("begin:" "end:" "caption:" "label:"
targets tgs txt re files f desc descre fast-path-p level pos0)
(message "Getting targets...")
(with-current-buffer (or default-buffer (current-buffer))
- (while (setq org-entry (pop entries))
- (setq files (car org-entry) desc (cdr org-entry))
+ (while (setq entry (pop entries))
+ (setq files (car entry) desc (cdr entry))
(setq fast-path-p nil)
(cond
((null files) (setq files (list (current-buffer))))
(completion-ignore-case t)
(member (member this org-todo-keywords-1))
(tail (cdr member))
- (state (cond
- ((and org-todo-key-trigger
- (or (and (equal arg '(4))
- (eq org-use-fast-todo-selection 'prefix))
- (and (not arg) org-use-fast-todo-selection
- (not (eq org-use-fast-todo-selection
- 'prefix)))))
- ;; Use fast selection
- (org-fast-todo-selection))
- ((and (equal arg '(4))
- (or (not org-use-fast-todo-selection)
- (not org-todo-key-trigger)))
+ (org-state (cond
+ ((and org-todo-key-trigger
+ (or (and (equal arg '(4))
+ (eq org-use-fast-todo-selection 'prefix))
+ (and (not arg) org-use-fast-todo-selection
+ (not (eq org-use-fast-todo-selection
+ 'prefix)))))
+ ;; Use fast selection
+ (org-fast-todo-selection))
+ ((and (equal arg '(4))
+ (or (not org-use-fast-todo-selection)
+ (not org-todo-key-trigger)))
;; Read a state with completion
(org-icompleting-read
"State: " (mapcar (lambda(x) (list x))
nil)))
(t
(car tail))))
- (state (or
- (run-hook-with-args-until-success
- 'org-todo-get-default-hook state org-last-state)
- state))
- (next (if state (concat " " state " ") " "))
- (change-plist (list :type 'todo-state-change :from this :to state
+ (org-state (or
+ (run-hook-with-args-until-success
+ 'org-todo-get-default-hook org-state org-last-state)
+ org-state))
+ (next (if org-state (concat " " org-state " ") " "))
+ (change-plist (list :type 'todo-state-change :from this :to org-state
:position startpos))
dolog now-done-p)
(when org-blocker-hook
(run-hook-with-args-until-failure
'org-blocker-hook change-plist))))
(if (org-called-interactively-p 'interactive)
- (error "TODO state change from %s to %s blocked" this state)
+ (error "TODO state change from %s to %s blocked" this org-state)
;; fail silently
- (message "TODO state change from %s to %s blocked" this state)
+ (message "TODO state change from %s to %s blocked" this org-state)
(throw 'exit nil))))
(store-match-data match-data)
(replace-match next t t)
(unless (pos-visible-in-window-p hl-pos)
(message "TODO state changed to %s" (org-trim next)))
(unless head
- (setq head (org-get-todo-sequence-head state)
+ (setq head (org-get-todo-sequence-head org-state)
ass (assoc head org-todo-kwd-alist)
interpret (nth 1 ass)
done-word (nth 3 ass)
(when (memq arg '(nextset previousset))
(message "Keyword-Set %d/%d: %s"
(- (length org-todo-sets) -1
- (length (memq (assoc state org-todo-sets) org-todo-sets)))
+ (length (memq (assoc org-state org-todo-sets) org-todo-sets)))
(length org-todo-sets)
- (mapconcat 'identity (assoc state org-todo-sets) " ")))
+ (mapconcat 'identity (assoc org-state org-todo-sets) " ")))
(setq org-last-todo-state-is-todo
- (not (member state org-done-keywords)))
- (setq now-done-p (and (member state org-done-keywords)
+ (not (member org-state org-done-keywords)))
+ (setq now-done-p (and (member org-state org-done-keywords)
(not (member this org-done-keywords))))
(and logging (org-local-logging logging))
(when (and (or org-todo-log-states org-log-done)
(not (eq org-inhibit-logging t))
(not (memq arg '(nextset previousset))))
;; we need to look at recording a time and note
- (setq dolog (or (nth 1 (assoc state org-todo-log-states))
+ (setq dolog (or (nth 1 (assoc org-state org-todo-log-states))
(nth 2 (assoc this org-todo-log-states))))
(if (and (eq dolog 'note) (eq org-inhibit-logging 'note))
(setq dolog 'time))
- (when (and state
- (member state org-not-done-keywords)
+ (when (and org-state
+ (member org-state org-not-done-keywords)
(not (member this org-not-done-keywords)))
;; This is now a todo state and was not one before
;; If there was a CLOSED time stamp, get rid of it.
;; It is now done, and it was not done before
(org-add-planning-info 'closed (org-current-effective-time))
(if (and (not dolog) (eq 'note org-log-done))
- (org-add-log-setup 'done state this 'findpos 'note)))
- (when (and state dolog)
+ (org-add-log-setup 'done org-state this 'findpos 'note)))
+ (when (and org-state dolog)
;; This is a non-nil state, and we need to log it
- (org-add-log-setup 'state state this 'findpos dolog)))
+ (org-add-log-setup 'state org-state this 'findpos dolog)))
;; Fixup tag positioning
- (org-todo-trigger-tag-changes state)
+ (org-todo-trigger-tag-changes org-state)
(and org-auto-align-tags (not org-setting-tags) (org-set-tags nil t))
(when org-provide-todo-statistics
(org-update-parent-todo-statistics))
(run-hooks 'org-after-todo-state-change-hook)
- (if (and arg (not (member state org-done-keywords)))
- (setq head (org-get-todo-sequence-head state)))
+ (if (and arg (not (member org-state org-done-keywords)))
+ (setq head (org-get-todo-sequence-head org-state)))
(put-text-property (point-at-bol) (point-at-eol) 'org-todo-head head)
;; Do we need to trigger a repeat?
(when now-done-p
(save-match-data
(setq org-agenda-headline-snapshot-before-repeat
(org-get-heading))))
- (org-auto-repeat-maybe state))
+ (org-auto-repeat-maybe org-state))
;; Fixup cursor location if close to the keyword
(if (and (outline-on-heading-p)
(not (bolp))
;; Get a new set of tags from the user
(save-excursion
(setq table (append org-tag-persistent-alist
- org-tag-alist
- (org-get-buffer-tags)
+ (or org-tag-alist (org-get-buffer-tags))
(and
org-complete-tags-always-offer-all-agenda-tags
(org-global-tags-completion-table
(condition-case nil
(setq tg (org-icompleting-read
"Tag: "
- (delete-dups
- (append (or buffer-tags
- (with-current-buffer buf
- (mapcar 'car (org-get-buffer-tags))))
- (mapcar 'car table)))))
+ (or buffer-tags
+ (with-current-buffer buf
+ (org-get-buffer-tags)))))
(quit (setq tg "")))
(when (string-match "\\S-" tg)
(add-to-list 'buffer-tags (list tg))
For example, if the value of this variable is ((\"hours\" . 60)), then an
effort string \"2hours\" is equivalent to 120 minutes."
:group 'org-agenda
+ :version "24.1"
:type '(alist :key-type (string :tag "Modifier")
:value-type (number :tag "Minutes")))
(t refpos)))))
((org-at-item-p)
;; Being at an item and not looking at an the item means point
- ;; was previously moved to beginning of a visual line, whiche
+ ;; was previously moved to beginning of a visual line, which
;; doesn't contain the item. Therefore, do nothing special,
;; just stay here.
(when (looking-at org-list-full-item-re)
If the heading only contains a TODO keyword, it is still still considered
empty."
(and (looking-at "[ \t]*$")
- (save-excursion
- (beginning-of-line 1)
- (let ((case-fold-search nil))
- (looking-at org-todo-line-regexp)))
- (string= (match-string 3) "")))
+ (when org-todo-line-regexp
+ (save-excursion
+ (beginning-of-line 1)
+ (let ((case-fold-search nil))
+ (looking-at org-todo-line-regexp)
+ (string= (match-string 3) ""))))))
(defun org-at-heading-or-item-p ()
(or (org-at-heading-p) (org-at-item-p)))