From efc77ab6f5e8883fc38d8c6f75b6db54a0965c15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Delafond?= Date: Sun, 13 Jul 2014 13:35:32 +0200 Subject: Imported Upstream version 8.2.5h --- lisp/ob-C.el | 2 +- lisp/ob-R.el | 2 +- lisp/ob-asymptote.el | 2 +- lisp/ob-awk.el | 2 +- lisp/ob-calc.el | 2 +- lisp/ob-clojure.el | 2 +- lisp/ob-comint.el | 2 +- lisp/ob-core.el | 4 +- lisp/ob-css.el | 2 +- lisp/ob-ditaa.el | 2 +- lisp/ob-dot.el | 2 +- lisp/ob-emacs-lisp.el | 2 +- lisp/ob-eval.el | 2 +- lisp/ob-exp.el | 281 ++++++++++++++++++++++--------------------------- lisp/ob-fortran.el | 2 +- lisp/ob-gnuplot.el | 4 +- lisp/ob-haskell.el | 2 +- lisp/ob-io.el | 2 +- lisp/ob-java.el | 2 +- lisp/ob-js.el | 2 +- lisp/ob-keys.el | 2 +- lisp/ob-latex.el | 4 +- lisp/ob-ledger.el | 2 +- lisp/ob-lilypond.el | 2 +- lisp/ob-lisp.el | 2 +- lisp/ob-lob.el | 7 +- lisp/ob-makefile.el | 5 +- lisp/ob-matlab.el | 2 +- lisp/ob-maxima.el | 5 +- lisp/ob-mscgen.el | 2 +- lisp/ob-ocaml.el | 2 +- lisp/ob-octave.el | 2 +- lisp/ob-org.el | 2 +- lisp/ob-perl.el | 2 +- lisp/ob-picolisp.el | 2 +- lisp/ob-plantuml.el | 2 +- lisp/ob-python.el | 4 +- lisp/ob-ref.el | 6 +- lisp/ob-ruby.el | 2 +- lisp/ob-sass.el | 2 +- lisp/ob-scala.el | 2 +- lisp/ob-scheme.el | 5 +- lisp/ob-screen.el | 2 +- lisp/ob-sh.el | 2 +- lisp/ob-shen.el | 2 +- lisp/ob-sql.el | 2 +- lisp/ob-sqlite.el | 2 +- lisp/ob-table.el | 14 +-- lisp/ob-tangle.el | 2 +- lisp/ob.el | 2 +- lisp/org-agenda.el | 161 +++++++++++++++------------- lisp/org-archive.el | 2 +- lisp/org-attach.el | 7 +- lisp/org-bbdb.el | 2 +- lisp/org-bibtex.el | 2 +- lisp/org-capture.el | 2 +- lisp/org-clock.el | 6 +- lisp/org-colview.el | 2 +- lisp/org-compat.el | 8 +- lisp/org-crypt.el | 2 +- lisp/org-ctags.el | 2 +- lisp/org-datetree.el | 2 +- lisp/org-docview.el | 2 +- lisp/org-element.el | 48 +++++---- lisp/org-entities.el | 8 +- lisp/org-eshell.el | 2 +- lisp/org-faces.el | 2 +- lisp/org-feed.el | 2 +- lisp/org-footnote.el | 2 +- lisp/org-gnus.el | 2 +- lisp/org-habit.el | 6 +- lisp/org-id.el | 2 +- lisp/org-indent.el | 2 +- lisp/org-info.el | 2 +- lisp/org-inlinetask.el | 5 +- lisp/org-irc.el | 6 +- lisp/org-list.el | 4 +- lisp/org-loaddefs.el | 78 +++++++------- lisp/org-macro.el | 2 +- lisp/org-macs.el | 2 +- lisp/org-mhe.el | 2 +- lisp/org-mobile.el | 3 +- lisp/org-mouse.el | 2 +- lisp/org-pcomplete.el | 2 +- lisp/org-plot.el | 2 +- lisp/org-protocol.el | 2 +- lisp/org-rmail.el | 10 +- lisp/org-src.el | 2 +- lisp/org-table.el | 13 ++- lisp/org-timer.el | 2 +- lisp/org-version.el | 4 +- lisp/org-w3m.el | 2 +- lisp/org.el | 158 ++++++++++++++------------- lisp/ox-ascii.el | 72 ++++++++----- lisp/ox-beamer.el | 8 +- lisp/ox-html.el | 23 +--- lisp/ox-icalendar.el | 6 +- lisp/ox-latex.el | 41 ++++++-- lisp/ox-man.el | 2 +- lisp/ox-md.el | 35 ++++-- lisp/ox-odt.el | 46 ++------ lisp/ox-org.el | 16 ++- lisp/ox-publish.el | 4 +- lisp/ox-texinfo.el | 8 +- lisp/ox.el | 29 ++--- 105 files changed, 660 insertions(+), 626 deletions(-) (limited to 'lisp') diff --git a/lisp/ob-C.el b/lisp/ob-C.el index ddceb14..c460be3 100644 --- a/lisp/ob-C.el +++ b/lisp/ob-C.el @@ -1,6 +1,6 @@ ;;; ob-C.el --- org-babel functions for C and similar languages -;; Copyright (C) 2010-2013 Free Software Foundation, Inc. +;; Copyright (C) 2010-2014 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/ob-R.el b/lisp/ob-R.el index 58f5536..93d6fe2 100644 --- a/lisp/ob-R.el +++ b/lisp/ob-R.el @@ -1,6 +1,6 @@ ;;; ob-R.el --- org-babel functions for R code evaluation -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Dan Davison diff --git a/lisp/ob-asymptote.el b/lisp/ob-asymptote.el index 4ea68df..21c0a17 100644 --- a/lisp/ob-asymptote.el +++ b/lisp/ob-asymptote.el @@ -1,6 +1,6 @@ ;;; ob-asymptote.el --- org-babel functions for asymptote evaluation -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/ob-awk.el b/lisp/ob-awk.el index a9215d0..ed98afd 100644 --- a/lisp/ob-awk.el +++ b/lisp/ob-awk.el @@ -1,6 +1,6 @@ ;;; ob-awk.el --- org-babel functions for awk evaluation -;; Copyright (C) 2011-2013 Free Software Foundation, Inc. +;; Copyright (C) 2011-2014 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/ob-calc.el b/lisp/ob-calc.el index b4201a1..cdb528a 100644 --- a/lisp/ob-calc.el +++ b/lisp/ob-calc.el @@ -1,6 +1,6 @@ ;;; ob-calc.el --- org-babel functions for calc code evaluation -;; Copyright (C) 2010-2013 Free Software Foundation, Inc. +;; Copyright (C) 2010-2014 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/ob-clojure.el b/lisp/ob-clojure.el index 25b39f7..78f3c6d 100644 --- a/lisp/ob-clojure.el +++ b/lisp/ob-clojure.el @@ -1,6 +1,6 @@ ;;; ob-clojure.el --- org-babel functions for clojure evaluation -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Author: Joel Boehland ;; Eric Schulte diff --git a/lisp/ob-comint.el b/lisp/ob-comint.el index 8b03e2d..40bfaf7 100644 --- a/lisp/ob-comint.el +++ b/lisp/ob-comint.el @@ -1,6 +1,6 @@ ;;; ob-comint.el --- org-babel functions for interaction with comint buffers -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, comint diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 84caed7..e8943c6 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -1,6 +1,6 @@ ;;; ob-core.el --- working with code blocks in org-mode -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Authors: Eric Schulte ;; Dan Davison @@ -217,7 +217,7 @@ Returns non-nil if match-data set" (let ((src-at-0-p (save-excursion (beginning-of-line 1) (string= "src" (thing-at-point 'word)))) - (first-line-p (= 1 (line-number-at-pos))) + (first-line-p (= (line-beginning-position) (point-min))) (orig (point))) (let ((search-for (cond ((and src-at-0-p first-line-p "src_")) (first-line-p "[[:punct:] \t]src_") diff --git a/lisp/ob-css.el b/lisp/ob-css.el index a1205f5..2fedb35 100644 --- a/lisp/ob-css.el +++ b/lisp/ob-css.el @@ -1,6 +1,6 @@ ;;; ob-css.el --- org-babel functions for css evaluation -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/ob-ditaa.el b/lisp/ob-ditaa.el index 36681d0..26f0e4f 100644 --- a/lisp/ob-ditaa.el +++ b/lisp/ob-ditaa.el @@ -1,6 +1,6 @@ ;;; ob-ditaa.el --- org-babel functions for ditaa evaluation -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/ob-dot.el b/lisp/ob-dot.el index 7504264..b35d7bb 100644 --- a/lisp/ob-dot.el +++ b/lisp/ob-dot.el @@ -1,6 +1,6 @@ ;;; ob-dot.el --- org-babel functions for dot evaluation -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/ob-emacs-lisp.el b/lisp/ob-emacs-lisp.el index a30e369..3219344 100644 --- a/lisp/ob-emacs-lisp.el +++ b/lisp/ob-emacs-lisp.el @@ -1,6 +1,6 @@ ;;; ob-emacs-lisp.el --- org-babel functions for emacs-lisp code evaluation -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/ob-eval.el b/lisp/ob-eval.el index 85a8c4e..057590f 100644 --- a/lisp/ob-eval.el +++ b/lisp/ob-eval.el @@ -1,6 +1,6 @@ ;;; ob-eval.el --- org-babel functions for external code evaluation -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, comint diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el index d6d4566..cb64136 100644 --- a/lisp/ob-exp.el +++ b/lisp/ob-exp.el @@ -1,6 +1,6 @@ ;;; ob-exp.el --- Exportation of org-babel source blocks -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Authors: Eric Schulte ;; Dan Davison @@ -150,19 +150,17 @@ this template." :type 'string) (defvar org-babel-default-lob-header-args) -(defun org-babel-exp-non-block-elements (start end) - "Process inline source and call lines between START and END for export." +(defun org-babel-exp-process-buffer () + "Execute all Babel blocks in current buffer." (interactive) - (save-excursion - (goto-char start) - (unless (markerp end) - (let ((m (make-marker))) - (set-marker m end (current-buffer)) - (setq end m))) - (let ((rx (concat "\\(?:" org-babel-inline-src-block-regexp - "\\|" org-babel-lob-one-liner-regexp "\\)"))) - (while (re-search-forward rx end t) - (save-excursion + (save-window-excursion + (save-excursion + (let ((case-fold-search t) + (regexp (concat org-babel-inline-src-block-regexp "\\|" + org-babel-lob-one-liner-regexp "\\|" + "^[ \t]*#\\+BEGIN_SRC"))) + (goto-char (point-min)) + (while (re-search-forward regexp nil t) (let* ((element (save-excursion ;; If match is inline, point is at its ;; end. Move backward so @@ -170,145 +168,118 @@ this template." ;; object, not the following one. (backward-char) (save-match-data (org-element-context)))) - (type (org-element-type element))) - (when (memq type '(babel-call inline-babel-call inline-src-block)) - (let ((beg-el (org-element-property :begin element)) - (end-el (org-element-property :end element))) - (case type - (inline-src-block - (let* ((info (org-babel-parse-inline-src-block-match)) - (params (nth 2 info))) - (setf (nth 1 info) - (if (and (cdr (assoc :noweb params)) - (string= "yes" (cdr (assoc :noweb params)))) - (org-babel-expand-noweb-references - info (org-babel-exp-get-export-buffer)) - (nth 1 info))) - (goto-char beg-el) - (let ((replacement (org-babel-exp-do-export info 'inline))) - (if (equal replacement "") - ;; Replacement code is empty: completely - ;; remove inline src block, including extra - ;; white space that might have been created - ;; when inserting results. - (delete-region beg-el - (progn (goto-char end-el) - (skip-chars-forward " \t") - (point))) - ;; Otherwise: remove inline src block but - ;; preserve following white spaces. Then - ;; insert value. - (delete-region beg-el - (progn (goto-char end-el) - (skip-chars-backward " \t") - (point))) - (insert replacement))))) - ((babel-call inline-babel-call) - (let* ((lob-info (org-babel-lob-get-info)) - (results - (org-babel-exp-do-export - (list "emacs-lisp" "results" - (apply #'org-babel-merge-params - org-babel-default-header-args - org-babel-default-lob-header-args - (append - (org-babel-params-from-properties) - (list - (org-babel-parse-header-arguments - (org-no-properties - (concat - ":var results=" - (mapconcat 'identity - (butlast lob-info 2) - " "))))))) - "" (nth 3 lob-info) (nth 2 lob-info)) - 'lob)) - (rep (org-fill-template - org-babel-exp-call-line-template - `(("line" . ,(nth 0 lob-info)))))) - ;; If replacement is empty, completely remove the - ;; object/element, including any extra white space - ;; that might have been created when including - ;; results. - (if (equal rep "") - (delete-region - beg-el - (progn (goto-char end-el) - (if (not (eq type 'babel-call)) - (progn (skip-chars-forward " \t") (point)) - (skip-chars-forward " \r\t\n") - (line-beginning-position)))) - ;; Otherwise, preserve following white - ;; spaces/newlines and then, insert replacement - ;; string. - (goto-char beg-el) - (delete-region beg-el - (progn (goto-char end-el) - (skip-chars-backward " \r\t\n") - (point))) - (insert rep))))))))))))) - -(defvar org-src-preserve-indentation) ; From org-src.el -(defun org-babel-exp-process-buffer () - "Execute all blocks in visible part of buffer." - (interactive) - (save-window-excursion - (let ((case-fold-search t) - (pos (point-min))) - (goto-char pos) - (while (re-search-forward "^[ \t]*#\\+BEGIN_SRC" nil t) - (let ((element (save-match-data (org-element-at-point)))) - (when (eq (org-element-type element) 'src-block) - (let* ((match-start (copy-marker (match-beginning 0))) - (begin (copy-marker (org-element-property :begin element))) - ;; Make sure we don't remove any blank lines after - ;; the block when replacing it. - (block-end (save-excursion - (goto-char (org-element-property :end element)) - (skip-chars-backward " \r\t\n") - (copy-marker (line-end-position)))) - (ind (org-get-indentation)) - (headers - (cons - (org-element-property :language element) - (let ((params (org-element-property :parameters element))) - (and params (org-split-string params "[ \t]+")))))) - ;; Execute all non-block elements between POS and - ;; current block. - (org-babel-exp-non-block-elements pos begin) - ;; Take care of matched block: compute replacement - ;; string. In particular, a nil REPLACEMENT means the - ;; block should be left as-is while an empty string - ;; should remove the block. - (let ((replacement (progn (goto-char match-start) - (org-babel-exp-src-block headers)))) - (cond ((not replacement) (goto-char block-end)) - ((equal replacement "") + (type (org-element-type element)) + (begin (copy-marker (org-element-property :begin element))) + (end (copy-marker + (save-excursion + (goto-char (org-element-property :end element)) + (skip-chars-backward " \r\t\n") + (point))))) + (case type + (inline-src-block + (let* ((info (org-babel-parse-inline-src-block-match)) + (params (nth 2 info))) + (setf (nth 1 info) + (if (and (cdr (assoc :noweb params)) + (string= "yes" (cdr (assoc :noweb params)))) + (org-babel-expand-noweb-references + info (org-babel-exp-get-export-buffer)) + (nth 1 info))) + (goto-char begin) + (let ((replacement (org-babel-exp-do-export info 'inline))) + (if (equal replacement "") + ;; Replacement code is empty: remove inline src + ;; block, including extra white space that + ;; might have been created when inserting + ;; results. (delete-region begin - (progn (goto-char block-end) - (skip-chars-forward " \r\t\n") - (if (eobp) (point) - (line-beginning-position))))) - (t - (goto-char match-start) - (delete-region (point) block-end) - (insert replacement) - (if (org-element-property :preserve-indent element) - ;; Indent only the code block markers. - (save-excursion (skip-chars-backward " \r\t\n") - (indent-line-to ind) - (goto-char match-start) - (indent-line-to ind)) - ;; Indent everything. - (indent-rigidly match-start (point) ind))))) - (setq pos (line-beginning-position)) - ;; Cleanup markers. - (set-marker match-start nil) - (set-marker begin nil) - (set-marker block-end nil))))) - ;; Eventually execute all non-block Babel elements between last - ;; src-block and end of buffer. - (org-babel-exp-non-block-elements pos (point-max))))) + (progn (goto-char end) + (skip-chars-forward " \t") + (point))) + ;; Otherwise: remove inline src block but + ;; preserve following white spaces. Then insert + ;; value. + (delete-region begin end) + (insert replacement))))) + ((babel-call inline-babel-call) + (let* ((lob-info (org-babel-lob-get-info)) + (results + (org-babel-exp-do-export + (list "emacs-lisp" "results" + (apply #'org-babel-merge-params + org-babel-default-header-args + org-babel-default-lob-header-args + (append + (org-babel-params-from-properties) + (list + (org-babel-parse-header-arguments + (org-no-properties + (concat + ":var results=" + (mapconcat 'identity + (butlast lob-info 2) + " "))))))) + "" (nth 3 lob-info) (nth 2 lob-info)) + 'lob)) + (rep (org-fill-template + org-babel-exp-call-line-template + `(("line" . ,(nth 0 lob-info)))))) + ;; If replacement is empty, completely remove the + ;; object/element, including any extra white space + ;; that might have been created when including + ;; results. + (if (equal rep "") + (delete-region + begin + (progn (goto-char end) + (if (not (eq type 'babel-call)) + (progn (skip-chars-forward " \t") (point)) + (skip-chars-forward " \r\t\n") + (line-beginning-position)))) + ;; Otherwise, preserve following white + ;; spaces/newlines and then, insert replacement + ;; string. + (goto-char begin) + (delete-region begin end) + (insert rep)))) + (src-block + (let* ((match-start (copy-marker (match-beginning 0))) + (ind (org-get-indentation)) + (headers + (cons + (org-element-property :language element) + (let ((params (org-element-property :parameters + element))) + (and params (org-split-string params "[ \t]+")))))) + ;; Take care of matched block: compute replacement + ;; string. In particular, a nil REPLACEMENT means + ;; the block should be left as-is while an empty + ;; string should remove the block. + (let ((replacement (progn (goto-char match-start) + (org-babel-exp-src-block headers)))) + (cond ((not replacement) (goto-char end)) + ((equal replacement "") + (goto-char end) + (skip-chars-forward " \r\t\n") + (beginning-of-line) + (delete-region begin (point))) + (t + (goto-char match-start) + (delete-region (point) + (save-excursion (goto-char end) + (line-end-position))) + (insert replacement) + (if (org-element-property :preserve-indent element) + ;; Indent only the code block markers. + (save-excursion (skip-chars-backward " \r\t\n") + (indent-line-to ind) + (goto-char match-start) + (indent-line-to ind)) + ;; Indent everything. + (indent-rigidly match-start (point) ind))))) + (set-marker match-start nil)))) + (set-marker begin nil) + (set-marker end nil))))))) (defun org-babel-in-example-or-verbatim () "Return true if point is in example or verbatim code. @@ -338,7 +309,7 @@ The function respects the value of the :exports header argument." (org-babel-exp-code info))))) (defcustom org-babel-exp-code-template - "#+BEGIN_SRC %lang%flags\n%body\n#+END_SRC" + "#+BEGIN_SRC %lang%switches%flags\n%body\n#+END_SRC" "Template used to export the body of code blocks. This template may be customized to include additional information such as the code block name, or the values of particular header @@ -348,6 +319,7 @@ and the following %keys may be used. lang ------ the language of the code block name ------ the name of the code block body ------ the body of the code block + switches -- the switches associated to the code block flags ----- the flags passed to the code block In addition to the keys mentioned above, every header argument @@ -370,11 +342,14 @@ replaced with its value." org-babel-exp-code-template `(("lang" . ,(nth 0 info)) ("body" . ,(org-escape-code-in-string (nth 1 info))) + ("switches" . ,(let ((f (nth 3 info))) + (and (org-string-nw-p f) (concat " " f)))) + ("flags" . ,(let ((f (assq :flags (nth 2 info)))) + (and f (concat " " (cdr f))))) ,@(mapcar (lambda (pair) (cons (substring (symbol-name (car pair)) 1) (format "%S" (cdr pair)))) (nth 2 info)) - ("flags" . ,(let ((f (nth 3 info))) (when f (concat " " f)))) ("name" . ,(or (nth 4 info) ""))))) (defun org-babel-exp-results (info type &optional silent hash) diff --git a/lisp/ob-fortran.el b/lisp/ob-fortran.el index 61cb19a..0211fda 100644 --- a/lisp/ob-fortran.el +++ b/lisp/ob-fortran.el @@ -1,6 +1,6 @@ ;;; ob-fortran.el --- org-babel functions for fortran -;; Copyright (C) 2011-2013 Free Software Foundation, Inc. +;; Copyright (C) 2011-2014 Free Software Foundation, Inc. ;; Authors: Sergey Litvinov ;; Eric Schulte diff --git a/lisp/ob-gnuplot.el b/lisp/ob-gnuplot.el index cc9186b..8767e88 100644 --- a/lisp/ob-gnuplot.el +++ b/lisp/ob-gnuplot.el @@ -1,6 +1,6 @@ ;;; ob-gnuplot.el --- org-babel functions for gnuplot evaluation -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research @@ -253,7 +253,7 @@ then create one. Return the initialized session. The current (org-babel-gnuplot-quote-timestamp-field s) (if (zerop (length s)) (or *org-babel-gnuplot-missing* s) - (if (string-match "[ \"]" "?") + (if (string-match "[ \"]" s) (concat "\"" (mapconcat 'identity (split-string s "\"") "\"\"") "\"") s))))) diff --git a/lisp/ob-haskell.el b/lisp/ob-haskell.el index 6c9fed1..22240ad 100644 --- a/lisp/ob-haskell.el +++ b/lisp/ob-haskell.el @@ -1,6 +1,6 @@ ;;; ob-haskell.el --- org-babel functions for haskell evaluation -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/ob-io.el b/lisp/ob-io.el index 5368ff5..971b37f 100644 --- a/lisp/ob-io.el +++ b/lisp/ob-io.el @@ -1,6 +1,6 @@ ;;; ob-io.el --- org-babel functions for Io evaluation -;; Copyright (C) 2012-2013 Free Software Foundation, Inc. +;; Copyright (C) 2012-2014 Free Software Foundation, Inc. ;; Author: Andrzej Lichnerowicz ;; Keywords: literate programming, reproducible research diff --git a/lisp/ob-java.el b/lisp/ob-java.el index 37ac8da..22f8785 100644 --- a/lisp/ob-java.el +++ b/lisp/ob-java.el @@ -1,6 +1,6 @@ ;;; ob-java.el --- org-babel functions for java evaluation -;; Copyright (C) 2011-2013 Free Software Foundation, Inc. +;; Copyright (C) 2011-2014 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/ob-js.el b/lisp/ob-js.el index 78914bc..7789449 100644 --- a/lisp/ob-js.el +++ b/lisp/ob-js.el @@ -1,6 +1,6 @@ ;;; ob-js.el --- org-babel functions for Javascript -;; Copyright (C) 2010-2013 Free Software Foundation, Inc. +;; Copyright (C) 2010-2014 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, js diff --git a/lisp/ob-keys.el b/lisp/ob-keys.el index 6cc7387..90b5196 100644 --- a/lisp/ob-keys.el +++ b/lisp/ob-keys.el @@ -1,6 +1,6 @@ ;;; ob-keys.el --- key bindings for org-babel -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/ob-latex.el b/lisp/ob-latex.el index 85918e6..35b6650 100644 --- a/lisp/ob-latex.el +++ b/lisp/ob-latex.el @@ -1,6 +1,6 @@ ;;; ob-latex.el --- org-babel functions for latex "evaluation" -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research @@ -59,7 +59,7 @@ '("[usenames]{color}" "{tikz}" "{color}" "{listings}" "{amsmath}") "Packages to use for htlatex export." :group 'org-babel - :type '(list (string))) + :type '(repeat (string))) (defun org-babel-expand-body:latex (body params) "Expand BODY according to PARAMS, return the expanded body." diff --git a/lisp/ob-ledger.el b/lisp/ob-ledger.el index 17911cc..806fec6 100644 --- a/lisp/ob-ledger.el +++ b/lisp/ob-ledger.el @@ -1,6 +1,6 @@ ;;; ob-ledger.el --- org-babel functions for ledger evaluation -;; Copyright (C) 2010-2013 Free Software Foundation, Inc. +;; Copyright (C) 2010-2014 Free Software Foundation, Inc. ;; Author: Eric S Fraga ;; Keywords: literate programming, reproducible research, accounting diff --git a/lisp/ob-lilypond.el b/lisp/ob-lilypond.el index a58a443..9b57546 100644 --- a/lisp/ob-lilypond.el +++ b/lisp/ob-lilypond.el @@ -1,6 +1,6 @@ ;;; ob-lilypond.el --- org-babel functions for lilypond evaluation -;; Copyright (C) 2010-2013 Free Software Foundation, Inc. +;; Copyright (C) 2010-2014 Free Software Foundation, Inc. ;; Author: Martyn Jago ;; Keywords: babel language, literate programming diff --git a/lisp/ob-lisp.el b/lisp/ob-lisp.el index c912fd9..6bddd61 100644 --- a/lisp/ob-lisp.el +++ b/lisp/ob-lisp.el @@ -1,6 +1,6 @@ ;;; ob-lisp.el --- org-babel functions for common lisp evaluation -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Authors: Joel Boehland ;; Eric Schulte diff --git a/lisp/ob-lob.el b/lisp/ob-lob.el index d37940a..4e635da 100644 --- a/lisp/ob-lob.el +++ b/lisp/ob-lob.el @@ -1,6 +1,6 @@ ;;; ob-lob.el --- functions supporting the Library of Babel -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Authors: Eric Schulte ;; Dan Davison @@ -40,14 +40,13 @@ files to `org-babel-lob-files'.") To add files to this list use the `org-babel-lob-ingest' command." :group 'org-babel :version "24.1" - :type 'list) + :type '(repeat file)) (defvar org-babel-default-lob-header-args '((:exports . "results")) "Default header arguments to use when exporting #+lob/call lines.") (defun org-babel-lob-ingest (&optional file) - "Add all named source-blocks defined in FILE to -`org-babel-library-of-babel'." + "Add all named source blocks defined in FILE to `org-babel-library-of-babel'." (interactive "fFile: ") (let ((lob-ingest-count 0)) (org-babel-map-src-blocks file diff --git a/lisp/ob-makefile.el b/lisp/ob-makefile.el index 517b5a6..af7e66e 100644 --- a/lisp/ob-makefile.el +++ b/lisp/ob-makefile.el @@ -1,8 +1,9 @@ ;;; ob-makefile.el --- org-babel functions for makefile evaluation -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. -;; Author: Eric Schulte and Thomas S. Dye +;; Author: Eric Schulte +;; Thomas S. Dye ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org diff --git a/lisp/ob-matlab.el b/lisp/ob-matlab.el index 481ed24..ef77de3 100644 --- a/lisp/ob-matlab.el +++ b/lisp/ob-matlab.el @@ -1,6 +1,6 @@ ;;; ob-matlab.el --- org-babel support for matlab evaluation -;; Copyright (C) 2010-2013 Free Software Foundation, Inc. +;; Copyright (C) 2010-2014 Free Software Foundation, Inc. ;; Author: Dan Davison ;; Keywords: literate programming, reproducible research diff --git a/lisp/ob-maxima.el b/lisp/ob-maxima.el index 5be378e..7435f1d 100644 --- a/lisp/ob-maxima.el +++ b/lisp/ob-maxima.el @@ -1,6 +1,6 @@ ;;; ob-maxima.el --- org-babel functions for maxima evaluation -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Author: Eric S Fraga ;; Eric Schulte @@ -43,7 +43,8 @@ (defcustom org-babel-maxima-command (if (boundp 'maxima-command) maxima-command "maxima") "Command used to call maxima on the shell." - :group 'org-babel) + :group 'org-babel + :type 'string) (defun org-babel-maxima-expand (body params) "Expand a block of Maxima code according to its header arguments." diff --git a/lisp/ob-mscgen.el b/lisp/ob-mscgen.el index 209ad7d..4a4dc05 100644 --- a/lisp/ob-mscgen.el +++ b/lisp/ob-mscgen.el @@ -1,6 +1,6 @@ ;;; ob-msc.el --- org-babel functions for mscgen evaluation -;; Copyright (C) 2010-2013 Free Software Foundation, Inc. +;; Copyright (C) 2010-2014 Free Software Foundation, Inc. ;; Author: Juan Pechiar ;; Keywords: literate programming, reproducible research diff --git a/lisp/ob-ocaml.el b/lisp/ob-ocaml.el index 25f79c5..1f29a25 100644 --- a/lisp/ob-ocaml.el +++ b/lisp/ob-ocaml.el @@ -1,6 +1,6 @@ ;;; ob-ocaml.el --- org-babel functions for ocaml evaluation -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/ob-octave.el b/lisp/ob-octave.el index 40bedfd..8cc66b6 100644 --- a/lisp/ob-octave.el +++ b/lisp/ob-octave.el @@ -1,6 +1,6 @@ ;;; ob-octave.el --- org-babel functions for octave and matlab evaluation -;; Copyright (C) 2010-2013 Free Software Foundation, Inc. +;; Copyright (C) 2010-2014 Free Software Foundation, Inc. ;; Author: Dan Davison ;; Keywords: literate programming, reproducible research diff --git a/lisp/ob-org.el b/lisp/ob-org.el index 892c56c..bc02f23 100644 --- a/lisp/ob-org.el +++ b/lisp/ob-org.el @@ -1,6 +1,6 @@ ;;; ob-org.el --- org-babel functions for org code block evaluation -;; Copyright (C) 2010-2013 Free Software Foundation, Inc. +;; Copyright (C) 2010-2014 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/ob-perl.el b/lisp/ob-perl.el index d374e47..ff4cbea 100644 --- a/lisp/ob-perl.el +++ b/lisp/ob-perl.el @@ -1,6 +1,6 @@ ;;; ob-perl.el --- org-babel functions for perl evaluation -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Authors: Dan Davison ;; Eric Schulte diff --git a/lisp/ob-picolisp.el b/lisp/ob-picolisp.el index 279cd7b..b240138 100644 --- a/lisp/ob-picolisp.el +++ b/lisp/ob-picolisp.el @@ -1,6 +1,6 @@ ;;; ob-picolisp.el --- org-babel functions for picolisp evaluation -;; Copyright (C) 2010-2013 Free Software Foundation, Inc. +;; Copyright (C) 2010-2014 Free Software Foundation, Inc. ;; Authors: Thorsten Jolitz ;; Eric Schulte diff --git a/lisp/ob-plantuml.el b/lisp/ob-plantuml.el index f992d04..ebc5a10 100644 --- a/lisp/ob-plantuml.el +++ b/lisp/ob-plantuml.el @@ -1,6 +1,6 @@ ;;; ob-plantuml.el --- org-babel functions for plantuml evaluation -;; Copyright (C) 2010-2013 Free Software Foundation, Inc. +;; Copyright (C) 2010-2014 Free Software Foundation, Inc. ;; Author: Zhang Weize ;; Keywords: literate programming, reproducible research diff --git a/lisp/ob-python.el b/lisp/ob-python.el index 3c3f664..baa5764 100644 --- a/lisp/ob-python.el +++ b/lisp/ob-python.el @@ -1,6 +1,6 @@ ;;; ob-python.el --- org-babel functions for python evaluation -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Authors: Eric Schulte ;; Dan Davison @@ -137,7 +137,7 @@ specifying a variable of the same value." org-babel-python-hline-to (format (if (and (stringp var) (string-match "[\n\r]" var)) "\"\"%S\"\"" "%S") - var)))) + (if (stringp var) (substring-no-properties var) var))))) (defun org-babel-python-table-or-string (results) "Convert RESULTS into an appropriate elisp value. diff --git a/lisp/ob-ref.el b/lisp/ob-ref.el index 5a3c8ba..152af86 100644 --- a/lisp/ob-ref.el +++ b/lisp/ob-ref.el @@ -1,6 +1,6 @@ ;;; ob-ref.el --- org-babel functions for referencing external data -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Authors: Eric Schulte ;; Dan Davison @@ -85,7 +85,9 @@ the variable." (cons (intern var) (let ((out (save-excursion (when org-babel-current-src-block-location - (goto-char org-babel-current-src-block-location)) + (goto-char (if (markerp org-babel-current-src-block-location) + (marker-position org-babel-current-src-block-location) + org-babel-current-src-block-location))) (org-babel-read ref)))) (if (equal out ref) (if (string-match "^\".*\"$" ref) diff --git a/lisp/ob-ruby.el b/lisp/ob-ruby.el index 34b9eaf..5b31247 100644 --- a/lisp/ob-ruby.el +++ b/lisp/ob-ruby.el @@ -1,6 +1,6 @@ ;;; ob-ruby.el --- org-babel functions for ruby evaluation -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/ob-sass.el b/lisp/ob-sass.el index cdb75be..78c0c95 100644 --- a/lisp/ob-sass.el +++ b/lisp/ob-sass.el @@ -1,6 +1,6 @@ ;;; ob-sass.el --- org-babel functions for the sass css generation language -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/ob-scala.el b/lisp/ob-scala.el index f778361..0584342 100644 --- a/lisp/ob-scala.el +++ b/lisp/ob-scala.el @@ -1,6 +1,6 @@ ;;; ob-scala.el --- org-babel functions for Scala evaluation -;; Copyright (C) 2012-2013 Free Software Foundation, Inc. +;; Copyright (C) 2012-2014 Free Software Foundation, Inc. ;; Author: Andrzej Lichnerowicz ;; Keywords: literate programming, reproducible research diff --git a/lisp/ob-scheme.el b/lisp/ob-scheme.el index f979640..b7117e9 100644 --- a/lisp/ob-scheme.el +++ b/lisp/ob-scheme.el @@ -1,8 +1,9 @@ ;;; ob-scheme.el --- org-babel functions for Scheme -;; Copyright (C) 2010-2013 Free Software Foundation, Inc. +;; Copyright (C) 2010-2014 Free Software Foundation, Inc. -;; Authors: Eric Schulte, Michael Gauland +;; Authors: Eric Schulte +;; Michael Gauland ;; Keywords: literate programming, reproducible research, scheme ;; Homepage: http://orgmode.org diff --git a/lisp/ob-screen.el b/lisp/ob-screen.el index f263376..2acbbeb 100644 --- a/lisp/ob-screen.el +++ b/lisp/ob-screen.el @@ -1,6 +1,6 @@ ;;; ob-screen.el --- org-babel support for interactive terminal -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Author: Benjamin Andresen ;; Keywords: literate programming, interactive shell diff --git a/lisp/ob-sh.el b/lisp/ob-sh.el index 4984ff9..96f275b 100644 --- a/lisp/ob-sh.el +++ b/lisp/ob-sh.el @@ -1,6 +1,6 @@ ;;; ob-sh.el --- org-babel functions for shell evaluation -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/ob-shen.el b/lisp/ob-shen.el index 68169da..e40e45c 100644 --- a/lisp/ob-shen.el +++ b/lisp/ob-shen.el @@ -1,6 +1,6 @@ ;;; ob-shen.el --- org-babel functions for Shen -;; Copyright (C) 2010-2013 Free Software Foundation, Inc. +;; Copyright (C) 2010-2014 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, shen diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el index d17dd8a..08d4419 100644 --- a/lisp/ob-sql.el +++ b/lisp/ob-sql.el @@ -1,6 +1,6 @@ ;;; ob-sql.el --- org-babel functions for sql evaluation -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/ob-sqlite.el b/lisp/ob-sqlite.el index fcfdb8e..098626f 100644 --- a/lisp/ob-sqlite.el +++ b/lisp/ob-sqlite.el @@ -1,6 +1,6 @@ ;;; ob-sqlite.el --- org-babel functions for sqlite database interaction -;; Copyright (C) 2010-2013 Free Software Foundation, Inc. +;; Copyright (C) 2010-2014 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/ob-table.el b/lisp/ob-table.el index c71bb87..831e352 100644 --- a/lisp/ob-table.el +++ b/lisp/ob-table.el @@ -1,6 +1,6 @@ ;;; ob-table.el --- support for calling org-babel functions from tables -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research @@ -24,7 +24,7 @@ ;;; Commentary: ;; Should allow calling functions from org-mode tables using the -;; function `sbe' as so... +;; function `org-sbe' as so... ;; #+begin_src emacs-lisp :results silent ;; (defun fibbd (n) (if (< n 2) 1 (+ (fibbd (- n 1)) (fibbd (- n 2))))) @@ -47,7 +47,7 @@ ;; | 7 | | ;; | 8 | | ;; | 9 | | -;; #+TBLFM: $2='(sbe 'fibbd (n $1)) +;; #+TBLFM: $2='(org-sbe 'fibbd (n $1)) ;;; Code: (require 'ob-core) @@ -60,14 +60,14 @@ character and replace it with ellipses." (concat (substring string 0 (match-beginning 0)) (if (match-string 1 string) "...")) string)) -(defmacro sbe (source-block &rest variables) ;FIXME: Namespace prefix! +(defmacro org-sbe (source-block &rest variables) "Return the results of calling SOURCE-BLOCK with VARIABLES. Each element of VARIABLES should be a two element list, whose first element is the name of the variable and second element is a string of its value. The following call to -`sbe' would be equivalent to the following source code block. +`org-sbe' would be equivalent to the following source code block. - (sbe 'source-block (n $2) (m 3)) + (org-sbe 'source-block (n $2) (m 3)) #+begin_src emacs-lisp :var results=source-block(n=val_at_col_2, m=3) :results silent results @@ -84,7 +84,7 @@ the header argument which can then be passed before all variables as shown in the example below. | 1 | 2 | :file nothing.png | nothing.png | -#+TBLFM: @1$4='(sbe test-sbe $3 (x $1) (y $2))" +#+TBLFM: @1$4='(org-sbe test-sbe $3 (x $1) (y $2))" (declare (debug (form form))) (let* ((header-args (if (stringp (car variables)) (car variables) "")) (variables (if (stringp (car variables)) (cdr variables) variables))) diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el index ffc74cb..37b2d92 100644 --- a/lisp/ob-tangle.el +++ b/lisp/ob-tangle.el @@ -1,6 +1,6 @@ ;;; ob-tangle.el --- extract source code from org-mode files -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/ob.el b/lisp/ob.el index 827dd04..87657fe 100644 --- a/lisp/ob.el +++ b/lisp/ob.el @@ -1,6 +1,6 @@ ;;; ob.el --- working with code blocks in org-mode -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Authors: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 4dfa3e9..a98ccba 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -1,6 +1,6 @@ ;;; org-agenda.el --- Dynamic task and appointment lists for Org -;; Copyright (C) 2004-2013 Free Software Foundation, Inc. +;; Copyright (C) 2004-2014 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp @@ -328,11 +328,11 @@ the daily/weekly agenda, see `org-agenda-skip-function'.") (string)) (list :tag "Number of days in agenda" (const org-agenda-span) - (choice (const :tag "Day" 'day) - (const :tag "Week" 'week) - (const :tag "Fortnight" 'fortnight) - (const :tag "Month" 'month) - (const :tag "Year" 'year) + (choice (const :tag "Day" day) + (const :tag "Week" week) + (const :tag "Fortnight" fortnight) + (const :tag "Month" month) + (const :tag "Year" year) (integer :tag "Custom"))) (list :tag "Fixed starting date" (const org-agenda-start-day) @@ -390,32 +390,32 @@ the daily/weekly agenda, see `org-agenda-skip-function'.") (repeat :inline t :tag "Conditions for skipping" (choice :tag "Condition type" - (list :tag "Regexp matches" :inline t (const :format "" 'regexp) (regexp)) - (list :tag "Regexp does not match" :inline t (const :format "" 'notregexp) (regexp)) + (list :tag "Regexp matches" :inline t (const :format "" regexp) (regexp)) + (list :tag "Regexp does not match" :inline t (const :format "" notregexp) (regexp)) (list :tag "TODO state is" :inline t - (const 'todo) + (const todo) (choice - (const :tag "any not-done state" 'todo) - (const :tag "any done state" 'done) - (const :tag "any state" 'any) + (const :tag "any not-done state" todo) + (const :tag "any done state" done) + (const :tag "any state" any) (list :tag "Keyword list" (const :format "" quote) (repeat (string :tag "Keyword"))))) (list :tag "TODO state is not" :inline t - (const 'nottodo) + (const nottodo) (choice - (const :tag "any not-done state" 'todo) - (const :tag "any done state" 'done) - (const :tag "any state" 'any) + (const :tag "any not-done state" todo) + (const :tag "any done state" done) + (const :tag "any state" any) (list :tag "Keyword list" (const :format "" quote) (repeat (string :tag "Keyword"))))) - (const :tag "scheduled" 'scheduled) - (const :tag "not scheduled" 'notscheduled) - (const :tag "deadline" 'deadline) - (const :tag "no deadline" 'notdeadline) - (const :tag "timestamp" 'timestamp) - (const :tag "no timestamp" 'nottimestamp)))))) + (const :tag "scheduled" scheduled) + (const :tag "not scheduled" notscheduled) + (const :tag "deadline" deadline) + (const :tag "no deadline" notdeadline) + (const :tag "timestamp" timestamp) + (const :tag "no timestamp" nottimestamp)))))) (list :tag "Non-standard skipping condition" :value (org-agenda-skip-function) (const org-agenda-skip-function) @@ -764,7 +764,7 @@ to make his option also apply to the tags-todo list." (integer :tag "Ignore if N or more days in past(-) or future(+)."))) (defcustom org-agenda-todo-ignore-deadlines nil - "Non-nil means ignore some deadlined TODO items when making TODO list. + "Non-nil means ignore some deadline TODO items when making TODO list. There are different motivations for using different values, please think carefully when configuring this variable. @@ -1357,12 +1357,12 @@ explanations on the possible values." :group 'org-agenda-startup :group 'org-agenda-daily/weekly :type '(choice (const :tag "Don't show log items" nil) - (const :tag "Show only log items" 'only) - (const :tag "Show all possible log items" 'clockcheck) + (const :tag "Show only log items" only) + (const :tag "Show all possible log items" clockcheck) (repeat :tag "Choose among possible values for `org-agenda-log-mode-items'" - (choice (const :tag "Show closed log items" 'closed) - (const :tag "Show clocked log items" 'clock) - (const :tag "Show all logged state changes" 'state))))) + (choice (const :tag "Show closed log items" closed) + (const :tag "Show clocked log items" clock) + (const :tag "Show all logged state changes" state))))) (defcustom org-agenda-start-with-clockreport-mode nil "The initial value of clockreport-mode in a newly created agenda window." @@ -1805,7 +1805,7 @@ When set to nil, never show inherited tags in agenda lines." :version "24.3" :type '(choice (const :tag "Show inherited tags when available" t) - (const :tag "Always show inherited tags" 'always) + (const :tag "Always show inherited tags" always) (repeat :tag "Show inherited tags only in selected agenda types" (symbol :tag "Agenda type")))) @@ -3579,7 +3579,7 @@ the global options and expect it to be applied to the entire view.") (defvar org-agenda-regexp-filter-preset nil "A preset of the regexp filter used for secondary agenda filtering. -This must be a list of strings, each string must be a single category +This must be a list of strings, each string must be a single regexp preceded by \"+\" or \"-\". This variable should not be set directly, but agenda custom commands can bind it in the options section. The preset filter is a global property of @@ -3718,12 +3718,7 @@ generating a new one." (org-agenda-fontify-priorities)) (when (and org-agenda-dim-blocked-tasks org-blocker-hook) (org-agenda-dim-blocked-tasks)) - ;; We need to widen when `org-agenda-finalize' is called from - ;; `org-agenda-change-all-lines' (e.g. in `org-agenda-clock-in') - (when org-clock-current-task - (save-restriction - (widen) - (org-agenda-mark-clocking-task))) + (org-agenda-mark-clocking-task) (when org-agenda-entry-text-mode (org-agenda-entry-text-hide) (org-agenda-entry-text-show)) @@ -3760,20 +3755,25 @@ generating a new one." (defun org-agenda-mark-clocking-task () "Mark the current clock entry in the agenda if it is present." - (org-agenda-unmark-clocking-task) - (when (marker-buffer org-clock-hd-marker) - (save-excursion - (goto-char (point-min)) - (let (s ov) - (while (setq s (next-single-property-change (point) 'org-hd-marker)) - (goto-char s) - (when (equal (org-get-at-bol 'org-hd-marker) - org-clock-hd-marker) - (setq ov (make-overlay (point-at-bol) (1+ (point-at-eol)))) - (overlay-put ov 'type 'org-agenda-clocking) - (overlay-put ov 'face 'org-agenda-clocking) - (overlay-put ov 'help-echo - "The clock is running in this item"))))))) + ;; We need to widen when `org-agenda-finalize' is called from + ;; `org-agenda-change-all-lines' (e.g. in `org-agenda-clock-in') + (when org-clock-current-task + (save-restriction + (widen) + (org-agenda-unmark-clocking-task) + (when (marker-buffer org-clock-hd-marker) + (save-excursion + (goto-char (point-min)) + (let (s ov) + (while (setq s (next-single-property-change (point) 'org-hd-marker)) + (goto-char s) + (when (equal (org-get-at-bol 'org-hd-marker) + org-clock-hd-marker) + (setq ov (make-overlay (point-at-bol) (1+ (point-at-eol)))) + (overlay-put ov 'type 'org-agenda-clocking) + (overlay-put ov 'face 'org-agenda-clocking) + (overlay-put ov 'help-echo + "The clock is running in this item"))))))))) (defun org-agenda-unmark-clocking-task () "Unmark the current clocking task." @@ -7003,7 +7003,7 @@ When TYPE is \"scheduled\", \"deadline\", \"timestamp\" or \"timestamp_ia\", compare within each of these type. When TYPE is the empty string, compare all timestamps without respect of their type." - (let* ((def (if org-sort-agenda-notime-is-late 9901 -1)) + (let* ((def (if org-sort-agenda-notime-is-late most-positive-fixnum -1)) (ta (or (and (string-match type (or (get-text-property 1 'type a) "")) (get-text-property 1 'ts-date a)) def)) (tb (or (and (string-match type (or (get-text-property 1 'type b) "")) @@ -8273,7 +8273,7 @@ When called with a prefix argument, include all archive files as well." (when (next-single-property-change (point-at-eol) 'org-marker) (move-end-of-line 1) (goto-char (next-single-property-change (point) 'org-marker)))) - (org-move-to-column col)) + (org-move-to-column col nil nil t)) (org-agenda-do-context-action)) (defun org-agenda-previous-item (n) @@ -8285,7 +8285,7 @@ When called with a prefix argument, include all archive files as well." (move-end-of-line 0) (previous-single-property-change (point) 'org-marker)))) (if goto (goto-char goto)) - (org-move-to-column col))) + (org-move-to-column col nil nil t))) (org-agenda-do-context-action)) (defun org-agenda-do-context-action () @@ -8791,7 +8791,11 @@ the same tree node, and the headline of the tree node in the Org-mode file." (beginning-of-line 1) (save-excursion (org-agenda-change-all-lines newhead hdmarker 'fixface just-one)) - (org-move-to-column col)))) + (when (org-bound-and-true-p org-clock-out-when-done) + (string-match (concat "^" (regexp-opt org-done-keywords-for-agenda)) + newhead) + (org-agenda-unmark-clocking-task)) + (org-move-to-column col nil nil t)))) (defun org-agenda-add-note (&optional arg) "Add a time-stamped note to the entry at point." @@ -8927,7 +8931,8 @@ Called with a universal prefix arg, show the priority instead of setting it." (unless org-enable-priority-commands (error "Priority commands are disabled")) (org-agenda-check-no-diary) - (let* ((marker (or (org-get-at-bol 'org-marker) + (let* ((col (current-column)) + (marker (or (org-get-at-bol 'org-marker) (org-agenda-error))) (hdmarker (org-get-at-bol 'org-hd-marker)) (buffer (marker-buffer hdmarker)) @@ -8946,7 +8951,7 @@ Called with a universal prefix arg, show the priority instead of setting it." (end-of-line 1) (setq newhead (org-get-heading))) (org-agenda-change-all-lines newhead hdmarker) - (beginning-of-line 1))))) + (org-move-to-column col nil nil t))))) ;; FIXME: should fix the tags property of the agenda line. (defun org-agenda-set-tags (&optional tag onoff) @@ -9257,7 +9262,7 @@ ARG is passed through to `org-deadline'." (org-clock-in arg) (setq newhead (org-get-heading))) (org-agenda-change-all-lines newhead hdmarker)) - (org-move-to-column col)))) + (org-move-to-column col nil nil t)))) (defun org-agenda-clock-out () "Stop the currently running clock." @@ -9277,7 +9282,7 @@ ARG is passed through to `org-deadline'." (setq newhead (org-get-heading)))))) (org-agenda-change-all-lines newhead marker) (move-marker marker nil) - (org-move-to-column col) + (org-move-to-column col nil nil t) (org-agenda-unmark-clocking-task))) (defun org-agenda-clock-cancel (&optional arg) @@ -9917,31 +9922,43 @@ current HH:MM time." ;;; Dragging agenda lines forward/backward -(defun org-agenda-drag-line-forward (arg) - "Drag an agenda line forward by ARG lines." +(defun org-agenda-reapply-filters () + "Re-apply all agenda filters." + (mapcar + (lambda(f) (when (car f) (org-agenda-filter-apply (car f) (cadr f)))) + `((,org-agenda-tag-filter tag) + (,org-agenda-category-filter category) + (,org-agenda-regexp-filter regexp) + (,(get 'org-agenda-tag-filter :preset-filter) tag) + (,(get 'org-agenda-category-filter :preset-filter) category) + (,(get 'org-agenda-regexp-filter :preset-filter) regexp)))) + +(defun org-agenda-drag-line-forward (arg &optional backward) + "Drag an agenda line forward by ARG lines. +When the optional argument `backward' is non-nil, move backward." (interactive "p") - (let ((inhibit-read-only t) lst) + (let ((inhibit-read-only t) lst line) (if (or (not (get-text-property (point) 'txt)) (save-excursion (dotimes (n arg) - (move-beginning-of-line 2) + (move-beginning-of-line (if backward 0 2)) (push (not (get-text-property (point) 'txt)) lst)) (delq nil lst))) (message "Cannot move line forward") - (org-drag-line-forward arg)))) + (let ((end (save-excursion (move-beginning-of-line 2) (point)))) + (move-beginning-of-line 1) + (setq line (buffer-substring (point) end)) + (delete-region (point) end) + (move-beginning-of-line (funcall (if backward '1- '1+) arg)) + (insert line) + (org-agenda-reapply-filters) + (org-agenda-mark-clocking-task) + (move-beginning-of-line 0))))) (defun org-agenda-drag-line-backward (arg) "Drag an agenda line backward by ARG lines." (interactive "p") - (let ((inhibit-read-only t) lst) - (if (or (not (get-text-property (point) 'txt)) - (save-excursion - (dotimes (n arg) - (move-beginning-of-line 0) - (push (not (get-text-property (point) 'txt)) lst)) - (delq nil lst))) - (message "Cannot move line backward") - (org-drag-line-backward arg)))) + (org-agenda-drag-line-forward arg t)) ;;; Flagging notes diff --git a/lisp/org-archive.el b/lisp/org-archive.el index 3dc52c1..6deac47 100644 --- a/lisp/org-archive.el +++ b/lisp/org-archive.el @@ -1,6 +1,6 @@ ;;; org-archive.el --- Archiving for Org-mode -;; Copyright (C) 2004-2013 Free Software Foundation, Inc. +;; Copyright (C) 2004-2014 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org-attach.el b/lisp/org-attach.el index 898d911..07307e6 100644 --- a/lisp/org-attach.el +++ b/lisp/org-attach.el @@ -1,6 +1,6 @@ ;;; org-attach.el --- Manage file attachments to org-mode tasks -;; Copyright (C) 2008-2013 Free Software Foundation, Inc. +;; Copyright (C) 2008-2014 Free Software Foundation, Inc. ;; Author: John Wiegley ;; Keywords: org data task @@ -41,8 +41,7 @@ (require 'cl)) (require 'org-id) (require 'org) - -(declare-function vc-git-root "vc-git" (file)) +(require 'vc-git) (defgroup org-attach nil "Options concerning entry attachments in Org-mode." @@ -266,7 +265,7 @@ This checks for the existence of a \".git\" directory in that directory." (let* ((dir (expand-file-name org-attach-directory)) (git-dir (vc-git-root dir)) (changes 0)) - (when git-dir + (when (and git-dir (executable-find "git")) (with-temp-buffer (cd dir) (let ((have-annex diff --git a/lisp/org-bbdb.el b/lisp/org-bbdb.el index f122b67..b9841a6 100644 --- a/lisp/org-bbdb.el +++ b/lisp/org-bbdb.el @@ -1,6 +1,6 @@ ;;; org-bbdb.el --- Support for links to BBDB entries from within Org-mode -;; Copyright (C) 2004-2013 Free Software Foundation, Inc. +;; Copyright (C) 2004-2014 Free Software Foundation, Inc. ;; Authors: Carsten Dominik ;; Thomas Baumann diff --git a/lisp/org-bibtex.el b/lisp/org-bibtex.el index def9340..b4e6977 100644 --- a/lisp/org-bibtex.el +++ b/lisp/org-bibtex.el @@ -1,6 +1,6 @@ ;;; org-bibtex.el --- Org links to BibTeX entries ;; -;; Copyright (C) 2007-2013 Free Software Foundation, Inc. +;; Copyright (C) 2007-2014 Free Software Foundation, Inc. ;; ;; Authors: Bastien Guerry ;; Carsten Dominik diff --git a/lisp/org-capture.el b/lisp/org-capture.el index 39804ac..8eaa313 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -1,6 +1,6 @@ ;;; org-capture.el --- Fast note taking in Org-mode -;; Copyright (C) 2010-2013 Free Software Foundation, Inc. +;; Copyright (C) 2010-2014 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 3238c8c..fa50f9d 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -1,6 +1,6 @@ ;;; org-clock.el --- The time clocking code for Org-mode -;; Copyright (C) 2004-2013 Free Software Foundation, Inc. +;; Copyright (C) 2004-2014 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp @@ -424,7 +424,7 @@ to add an effort property.") "Hook run when stopping the current clock.") (defvar org-clock-cancel-hook nil - "Hook run when cancelling the current clock.") + "Hook run when canceling the current clock.") (defvar org-clock-goto-hook nil "Hook run when selecting the currently clocked-in entry.") (defvar org-clock-has-been-used nil @@ -441,7 +441,7 @@ to add an effort property.") (defvar org-clock-start-time "") (defvar org-clock-leftover-time nil - "If non-nil, user cancelled a clock; this is when leftover time started.") + "If non-nil, user canceled a clock; this is when leftover time started.") (defvar org-clock-effort "" "Effort estimate of the currently clocking task.") diff --git a/lisp/org-colview.el b/lisp/org-colview.el index 361560d..9dd0340 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -1,6 +1,6 @@ ;;; org-colview.el --- Column View in Org-mode -;; Copyright (C) 2004-2013 Free Software Foundation, Inc. +;; Copyright (C) 2004-2014 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org-compat.el b/lisp/org-compat.el index a3eb960..1553e4f 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -1,6 +1,6 @@ ;;; org-compat.el --- Compatibility code for Org-mode -;; Copyright (C) 2004-2013 Free Software Foundation, Inc. +;; Copyright (C) 2004-2014 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp @@ -260,6 +260,12 @@ ignored in this case." next (+ from (* n inc))))) (nreverse seq))))) +;; `set-transient-map' is only in Emacs >= 24.4 +(defalias 'org-set-transient-map + (if (fboundp 'set-transient-map) + 'set-transient-map + 'set-temporary-overlay-map)) + ;; Region compatibility (defvar org-ignore-region nil diff --git a/lisp/org-crypt.el b/lisp/org-crypt.el index 2024144..46fd3e6 100644 --- a/lisp/org-crypt.el +++ b/lisp/org-crypt.el @@ -1,6 +1,6 @@ ;;; org-crypt.el --- Public key encryption for org-mode entries -;; Copyright (C) 2007-2013 Free Software Foundation, Inc. +;; Copyright (C) 2007-2014 Free Software Foundation, Inc. ;; Emacs Lisp Archive Entry ;; Filename: org-crypt.el diff --git a/lisp/org-ctags.el b/lisp/org-ctags.el index 9d8ed6c..41775bd 100644 --- a/lisp/org-ctags.el +++ b/lisp/org-ctags.el @@ -1,6 +1,6 @@ ;;; org-ctags.el - Integrate Emacs "tags" facility with org mode. ;; -;; Copyright (C) 2007-2013 Free Software Foundation, Inc. +;; Copyright (C) 2007-2014 Free Software Foundation, Inc. ;; Author: Paul Sexton diff --git a/lisp/org-datetree.el b/lisp/org-datetree.el index dd4b1b0..0646c3b 100644 --- a/lisp/org-datetree.el +++ b/lisp/org-datetree.el @@ -1,6 +1,6 @@ ;;; org-datetree.el --- Create date entries in a tree -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org-docview.el b/lisp/org-docview.el index 8e61c8a..d2db685 100644 --- a/lisp/org-docview.el +++ b/lisp/org-docview.el @@ -1,6 +1,6 @@ ;;; org-docview.el --- support for links to doc-view-mode buffers -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Author: Jan Böcker ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org-element.el b/lisp/org-element.el index 6162383..77b2bc2 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -1,6 +1,6 @@ ;;; org-element.el --- Parser And Applications for Org syntax -;; Copyright (C) 2012-2013 Free Software Foundation, Inc. +;; Copyright (C) 2012-2014 Free Software Foundation, Inc. ;; Author: Nicolas Goaziou ;; Keywords: outlines, hypermedia, calendar, wp @@ -239,19 +239,6 @@ application to open them.") By default, all keywords setting attributes (i.e. \"ATTR_LATEX\") are affiliated keywords and need not to be in this list.") -(defconst org-element--affiliated-re - (format "[ \t]*#\\+%s:" - ;; Regular affiliated keywords. - (format "\\(%s\\|ATTR_[-_A-Za-z0-9]+\\)\\(?:\\[\\(.*\\)\\]\\)?" - (regexp-opt org-element-affiliated-keywords))) - "Regexp matching any affiliated keyword. - -Keyword name is put in match group 1. Moreover, if keyword -belongs to `org-element-dual-keywords', put the dual value in -match group 2. - -Don't modify it, set `org-element-affiliated-keywords' instead.") - (defconst org-element-keyword-translation-alist '(("DATA" . "NAME") ("LABEL" . "NAME") ("RESNAME" . "NAME") ("SOURCE" . "NAME") ("SRCNAME" . "NAME") ("TBLNAME" . "NAME") @@ -298,6 +285,31 @@ This list is checked after translations have been applied. See Any keyword in this list will have its value parsed and stored as a secondary string.") +(defconst org-element--affiliated-re + (format "[ \t]*#\\+\\(?:%s\\):\\(?: \\|$\\)" + (concat + ;; Dual affiliated keywords. + (format "\\(?1:%s\\)\\(?:\\[\\(.*\\)\\]\\)?" + (regexp-opt org-element-dual-keywords)) + "\\|" + ;; Regular affiliated keywords. + (format "\\(?1:%s\\)" + (regexp-opt + (org-remove-if + #'(lambda (keyword) + (member keyword org-element-dual-keywords)) + org-element-affiliated-keywords))) + "\\|" + ;; Export attributes. + "\\(?1:ATTR_[-_A-Za-z0-9]+\\)")) + "Regexp matching any affiliated keyword. + +Keyword name is put in match group 1. Moreover, if keyword +belongs to `org-element-dual-keywords', put the dual value in +match group 2. + +Don't modify it, set `org-element-affiliated-keywords' instead.") + (defconst org-element-object-restrictions (let* ((standard-set (remq 'plain-link (remq 'table-cell org-element-all-successors))) @@ -2906,12 +2918,8 @@ CONTENTS is nil." Return value is a cons cell whose CAR is `inline-babel-call' and CDR is beginning position." (save-excursion - ;; Use a simplified version of - ;; `org-babel-inline-lob-one-liner-regexp'. - (when (re-search-forward - "call_\\([^()\n]+?\\)\\(?:\\[.*?\\]\\)?([^\n]*?)\\(\\[.*?\\]\\)?" - nil t) - (cons 'inline-babel-call (match-beginning 0))))) + (when (re-search-forward org-babel-inline-lob-one-liner-regexp nil t) + (cons 'inline-babel-call (match-end 1))))) ;;;; Inline Src Block diff --git a/lisp/org-entities.el b/lisp/org-entities.el index 638da78..ba1eed1 100644 --- a/lisp/org-entities.el +++ b/lisp/org-entities.el @@ -1,6 +1,6 @@ ;;; org-entities.el --- Support for special entities in Org-mode -;; Copyright (C) 2010-2013 Free Software Foundation, Inc. +;; Copyright (C) 2010-2014 Free Software Foundation, Inc. ;; Author: Carsten Dominik , ;; Ulf Stegemann @@ -330,7 +330,7 @@ packages to be loaded, add these packages to `org-latex-packages-alist'." ("infin" "\\propto" t "∞" "[infinity]" "[infinity]" "∞") ("infty" "\\infty" t "∞" "[infinity]" "[infinity]" "∞") ("prop" "\\propto" t "∝" "[proportional to]" "[proportional to]" "∝") - ("proptp" "\\propto" t "∝" "[proportional to]" "[proportional to]" "∝") + ("propto" "\\propto" t "∝" "[proportional to]" "[proportional to]" "∝") ("not" "\\textlnot{}" nil "¬" "[angled dash]" "¬" "¬") ("neg" "\\neg{}" t "¬" "[angled dash]" "¬" "¬") ("land" "\\land" t "∧" "[logical and]" "[logical and]" "∧") @@ -598,7 +598,9 @@ Kind can be any of `latex', `html', `ascii', `latin1', or `utf8'." (princ (format " %-8s \\%-16s %-22s %-13s\n" utf8 name latex html)))))) (with-current-buffer "*Org Entity Help*" - (org-mode)) + (org-mode) + (when org-pretty-entities + (org-toggle-pretty-entities))) (select-window (get-buffer-window "*Org Entity Help*"))) diff --git a/lisp/org-eshell.el b/lisp/org-eshell.el index 5c26400..1256bc3 100644 --- a/lisp/org-eshell.el +++ b/lisp/org-eshell.el @@ -1,6 +1,6 @@ ;;; org-eshell.el - Support for links to working directories in eshell -;; Copyright (C) 2011-2013 Free Software Foundation, Inc. +;; Copyright (C) 2011-2014 Free Software Foundation, Inc. ;; Author: Konrad Hinsen diff --git a/lisp/org-faces.el b/lisp/org-faces.el index d64fd0e..f8625f1 100644 --- a/lisp/org-faces.el +++ b/lisp/org-faces.el @@ -1,6 +1,6 @@ ;;; org-faces.el --- Face definitions for Org-mode. -;; Copyright (C) 2004-2013 Free Software Foundation, Inc. +;; Copyright (C) 2004-2014 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org-feed.el b/lisp/org-feed.el index 05ead8f..6e68071 100644 --- a/lisp/org-feed.el +++ b/lisp/org-feed.el @@ -1,6 +1,6 @@ ;;; org-feed.el --- Add RSS feed items to Org files ;; -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el index 3c0d97c..c8b8c2e 100644 --- a/lisp/org-footnote.el +++ b/lisp/org-footnote.el @@ -1,6 +1,6 @@ ;;; org-footnote.el --- Footnote support in Org and elsewhere ;; -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el index e368a14..785b577 100644 --- a/lisp/org-gnus.el +++ b/lisp/org-gnus.el @@ -1,6 +1,6 @@ ;;; org-gnus.el --- Support for links to Gnus groups and messages from within Org-mode -;; Copyright (C) 2004-2013 Free Software Foundation, Inc. +;; Copyright (C) 2004-2014 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Tassilo Horn diff --git a/lisp/org-habit.el b/lisp/org-habit.el index eba9037..721718d 100644 --- a/lisp/org-habit.el +++ b/lisp/org-habit.el @@ -1,6 +1,6 @@ ;;; org-habit.el --- The habit tracking code for Org-mode -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; Author: John Wiegley ;; Keywords: outlines, hypermedia, calendar, wp @@ -200,7 +200,9 @@ This list represents a \"habit\" for the rest of this module." (count 0)) (unless reversed (goto-char end)) (while (and (< count maxdays) - (funcall search "- State \"DONE\".*\\[\\([^]]+\\)\\]" limit t)) + (funcall search (format "- State \"%s\".*\\[\\([^]]+\\)\\]" + (regexp-opt org-done-keywords)) + limit t)) (push (time-to-days (org-time-string-to-time (match-string-no-properties 1))) closed-dates) diff --git a/lisp/org-id.el b/lisp/org-id.el index 37f6e70..fdd0ff0 100644 --- a/lisp/org-id.el +++ b/lisp/org-id.el @@ -1,6 +1,6 @@ ;;; org-id.el --- Global identifiers for Org-mode entries ;; -;; Copyright (C) 2008-2013 Free Software Foundation, Inc. +;; Copyright (C) 2008-2014 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org-indent.el b/lisp/org-indent.el index 44311e3..fa5f060 100644 --- a/lisp/org-indent.el +++ b/lisp/org-indent.el @@ -1,5 +1,5 @@ ;;; org-indent.el --- Dynamic indentation for Org-mode -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org-info.el b/lisp/org-info.el index 421dde8..8a2d717 100644 --- a/lisp/org-info.el +++ b/lisp/org-info.el @@ -1,6 +1,6 @@ ;;; org-info.el --- Support for links to Info nodes from within Org-Mode -;; Copyright (C) 2004-2013 Free Software Foundation, Inc. +;; Copyright (C) 2004-2014 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org-inlinetask.el b/lisp/org-inlinetask.el index ca7572b..de4267c 100644 --- a/lisp/org-inlinetask.el +++ b/lisp/org-inlinetask.el @@ -1,6 +1,6 @@ ;;; org-inlinetask.el --- Tasks independent of outline hierarchy -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp @@ -103,7 +103,8 @@ the value of this variable." "Non-nil means display the first star of an inline task as additional marker. When nil, the first star is not shown." :tag "Org Inline Tasks" - :group 'org-structure) + :group 'org-structure + :type 'boolean) (defvar org-odd-levels-only) (defvar org-keyword-time-regexp) diff --git a/lisp/org-irc.el b/lisp/org-irc.el index afacae3..8f9761b 100644 --- a/lisp/org-irc.el +++ b/lisp/org-irc.el @@ -1,6 +1,6 @@ ;;; org-irc.el --- Store links to IRC sessions ;; -;; Copyright (C) 2008-2013 Free Software Foundation, Inc. +;; Copyright (C) 2008-2014 Free Software Foundation, Inc. ;; ;; Author: Philip Jackson ;; Keywords: erc, irc, link, org @@ -105,7 +105,7 @@ attributes that are found." ((eq major-mode 'erc-mode) (org-irc-erc-store-link)))) -(defun org-irc-elipsify-description (string &optional after) +(defun org-irc-ellipsify-description (string &optional after) "Remove unnecessary white space from STRING and add ellipses if necessary. Strip starting and ending white space from STRING and replace any chars that the value AFTER with '...'" @@ -158,7 +158,7 @@ the session itself." (progn (org-store-link-props :type "file" - :description (concat "'" (org-irc-elipsify-description + :description (concat "'" (org-irc-ellipsify-description (cadr parsed-line) 20) "' from an IRC conversation") :link (concat "file:" (car parsed-line) "::" diff --git a/lisp/org-list.el b/lisp/org-list.el index 4a3d471..d24dad2 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -1,6 +1,6 @@ ;;; org-list.el --- Plain lists for Org-mode ;; -;; Copyright (C) 2004-2013 Free Software Foundation, Inc. +;; Copyright (C) 2004-2014 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik ;; Bastien Guerry @@ -1223,7 +1223,7 @@ some heuristics to guess the result." ;; When `org-blank-before-new-entry' says so, it is 1. ((eq insert-blank-p t) 1) ;; `plain-list-item' is 'auto. Count blank lines separating - ;; neighbours items in list. + ;; neighbors' items in list. (t (let ((next-p (org-list-get-next-item item struct prevs))) (cond ;; Is there a next item? diff --git a/lisp/org-loaddefs.el b/lisp/org-loaddefs.el index ffb7507..55b9f19 100644 --- a/lisp/org-loaddefs.el +++ b/lisp/org-loaddefs.el @@ -14,7 +14,7 @@ ;;;;;; org-babel-pop-to-session-maybe org-babel-load-in-session-maybe ;;;;;; org-babel-expand-src-block-maybe org-babel-view-src-block-info ;;;;;; org-babel-execute-maybe org-babel-execute-safely-maybe) "ob-core" -;;;;;; "ob-core.el" "b4110b1ea622f71cf4aac4ac2a73a77f") +;;;;;; "ob-core.el" "e719f4d2aa2a0ee79b861c81085a27b5") ;;; Generated autoloads from ob-core.el (autoload 'org-babel-execute-safely-maybe "ob-core" "\ @@ -229,7 +229,7 @@ Mark current src block. ;;;*** ;;;### (autoloads (org-babel-describe-bindings) "ob-keys" "ob-keys.el" -;;;;;; "f41a561a02eb66238c2824e76e3f8cc8") +;;;;;; "25a1e7a65f088c34d9576789abaaebc6") ;;; Generated autoloads from ob-keys.el (autoload 'org-babel-describe-bindings "ob-keys" "\ @@ -240,7 +240,7 @@ Describe all keybindings behind `org-babel-key-prefix'. ;;;*** ;;;### (autoloads (org-babel-lob-get-info org-babel-lob-execute-maybe) -;;;;;; "ob-lob" "ob-lob.el" "d94d0930566ed1471ffe0d04603ac1bc") +;;;;;; "ob-lob" "ob-lob.el" "6452edf7fff14c5ebb5c1cece08ba833") ;;; Generated autoloads from ob-lob.el (autoload 'org-babel-lob-execute-maybe "ob-lob" "\ @@ -258,7 +258,7 @@ Return a Library of Babel function call as a string. ;;;*** ;;;### (autoloads (org-babel-tangle org-babel-tangle-file) "ob-tangle" -;;;;;; "ob-tangle.el" "a8b8d21349eceb9147ddab7f6e5f1696") +;;;;;; "ob-tangle.el" "1e3955fc92c4a4b6ea38c07dd71712f5") ;;; Generated autoloads from ob-tangle.el (autoload 'org-babel-tangle-file "ob-tangle" "\ @@ -292,7 +292,7 @@ used to limit the exported source code blocks by language. ;;;;;; org-search-view org-agenda-list org-batch-store-agenda-views ;;;;;; org-store-agenda-views org-batch-agenda-csv org-batch-agenda ;;;;;; org-agenda org-toggle-sticky-agenda) "org-agenda" "org-agenda.el" -;;;;;; (21153 27247)) +;;;;;; (21226 15226)) ;;; Generated autoloads from org-agenda.el (autoload 'org-toggle-sticky-agenda "org-agenda" "\ @@ -568,7 +568,7 @@ to override `appt-message-warning-time'. ;;;### (autoloads (org-archive-subtree-default-with-confirmation ;;;;;; org-archive-subtree-default org-toggle-archive-tag org-archive-to-archive-sibling ;;;;;; org-archive-subtree org-add-archive-files) "org-archive" -;;;;;; "org-archive.el" "459396977488bc201173789dc42a9c37") +;;;;;; "org-archive.el" "9a54b246691497eb10c911c2c12f9742") ;;; Generated autoloads from org-archive.el (autoload 'org-add-archive-files "org-archive" "\ @@ -621,7 +621,7 @@ This command is set with the variable `org-archive-default-command'. ;;;*** -;;;### (autoloads (org-attach) "org-attach" "org-attach.el" "2acf3dc22dcf986b2dbf07e1c0f4bba4") +;;;### (autoloads (org-attach) "org-attach" "org-attach.el" "a3eaede165711f6f923a70dfabdb1a1f") ;;; Generated autoloads from org-attach.el (autoload 'org-attach "org-attach" "\ @@ -633,7 +633,7 @@ Shows a list of commands and prompts for another key to execute a command. ;;;*** ;;;### (autoloads (org-bbdb-anniversaries) "org-bbdb" "org-bbdb.el" -;;;;;; "867e99974c8aab087ba115fc8f89e956") +;;;;;; "6d7b511684571eabafd1a32f0ddeff53") ;;; Generated autoloads from org-bbdb.el (autoload 'org-bbdb-anniversaries "org-bbdb" "\ @@ -644,8 +644,8 @@ Extract anniversaries from BBDB for display in the agenda. ;;;*** ;;;### (autoloads (org-capture-import-remember-templates org-capture -;;;;;; org-capture-string) "org-capture" "org-capture.el" (21153 -;;;;;; 27247)) +;;;;;; org-capture-string) "org-capture" "org-capture.el" (21225 +;;;;;; 60662)) ;;; Generated autoloads from org-capture.el (autoload 'org-capture-string "org-capture" "\ @@ -692,7 +692,7 @@ Set `org-capture-templates' to be similar to `org-remember-templates'. ;;;;;; org-clock-remove-overlays org-clock-display org-clock-sum ;;;;;; org-clock-goto org-clock-cancel org-clock-out org-clock-in-last ;;;;;; org-clock-in org-resolve-clocks) "org-clock" "org-clock.el" -;;;;;; "0d2fceb546803a8078c2ea20fe8d6a42") +;;;;;; "fc9903a6fff012d8cdd5dfdb5692991f") ;;; Generated autoloads from org-clock.el (autoload 'org-resolve-clocks "org-clock" "\ @@ -821,7 +821,7 @@ Otherwise, return nil. ;;;### (autoloads (org-agenda-columns org-insert-columns-dblock org-dblock-write:columnview ;;;;;; org-columns-number-to-string org-columns-compute org-columns ;;;;;; org-columns-get-format-and-top-level org-columns-remove-overlays) -;;;;;; "org-colview" "org-colview.el" (21153 27247)) +;;;;;; "org-colview" "org-colview.el" (21225 60662)) ;;; Generated autoloads from org-colview.el (autoload 'org-columns-remove-overlays "org-colview" "\ @@ -885,7 +885,7 @@ Turn on or update column view in the agenda. ;;;*** ;;;### (autoloads (org-check-version) "org-compat" "org-compat.el" -;;;;;; (21136 18157)) +;;;;;; (21216 45694)) ;;; Generated autoloads from org-compat.el (autoload 'org-check-version "org-compat" "\ @@ -896,7 +896,7 @@ Try very hard to provide sensible version strings. ;;;*** ;;;### (autoloads (org-datetree-find-date-create) "org-datetree" -;;;;;; "org-datetree.el" "954f9d30ea6ea9b72b310bba030ca9a4") +;;;;;; "org-datetree.el" "448ccbc2749a60a5e276fc3c9a9c5605") ;;; Generated autoloads from org-datetree.el (autoload 'org-datetree-find-date-create "org-datetree" "\ @@ -910,7 +910,7 @@ tree can be found. ;;;*** ;;;### (autoloads (org-element-context org-element-at-point org-element-interpret-data) -;;;;;; "org-element" "org-element.el" "4895faf7cc60668a4fd4821b8805826b") +;;;;;; "org-element" "org-element.el" "ff99ee3c64be379f1fdf2de70654324f") ;;; Generated autoloads from org-element.el (autoload 'org-element-interpret-data "org-element" "\ @@ -972,7 +972,7 @@ Providing it allows for quicker computation. ;;;*** ;;;### (autoloads (org-feed-show-raw-feed org-feed-goto-inbox org-feed-update -;;;;;; org-feed-update-all) "org-feed" "org-feed.el" "f5f190118c0e7321f88972d9a4749f5f") +;;;;;; org-feed-update-all) "org-feed" "org-feed.el" "d29a33e181e81cddc70543c0ba8fdbe4") ;;; Generated autoloads from org-feed.el (autoload 'org-feed-update-all "org-feed" "\ @@ -1000,7 +1000,7 @@ Show the raw feed buffer of a feed. ;;;*** ;;;### (autoloads (org-footnote-normalize org-footnote-action) "org-footnote" -;;;;;; "org-footnote.el" "498ce4bcc019503ef9657f915606b130") +;;;;;; "org-footnote.el" "9906c2a4ea425a7c96d7c1371b2e35f9") ;;; Generated autoloads from org-footnote.el (autoload 'org-footnote-action "org-footnote" "\ @@ -1034,7 +1034,7 @@ referenced sequence. ;;;### (autoloads (org-id-store-link org-id-find-id-file org-id-update-id-locations ;;;;;; org-id-new org-id-find org-id-goto org-id-get-with-outline-drilling ;;;;;; org-id-get-with-outline-path-completion org-id-get org-id-copy -;;;;;; org-id-get-create) "org-id" "org-id.el" "62f25628049e4355bfa47d9ce6068de6") +;;;;;; org-id-get-create) "org-id" "org-id.el" "82e762bd5cca2e3d24252745fca306d7") ;;; Generated autoloads from org-id.el (autoload 'org-id-get-create "org-id" "\ @@ -1128,7 +1128,7 @@ Store a link to the current entry, using its ID. ;;;*** ;;;### (autoloads (org-indent-mode) "org-indent" "org-indent.el" -;;;;;; "5257f4635c377537f302a83dc69419dd") +;;;;;; "3d658901e4f096f04688498e4a709eb5") ;;; Generated autoloads from org-indent.el (autoload 'org-indent-mode "org-indent" "\ @@ -1145,7 +1145,7 @@ during idle time. ;;;*** -;;;### (autoloads (org-irc-store-link) "org-irc" "org-irc.el" "f5d45d21f475b63408f333384ce1cc61") +;;;### (autoloads (org-irc-store-link) "org-irc" "org-irc.el" "2432d5cd8271c05b0e8778cd26bf11ab") ;;; Generated autoloads from org-irc.el (autoload 'org-irc-store-link "org-irc" "\ @@ -1156,7 +1156,7 @@ Dispatch to the appropriate function to store a link to an IRC session. ;;;*** ;;;### (autoloads (org-load-noerror-mustsuffix) "org-macs" "org-macs.el" -;;;;;; (21125 47804)) +;;;;;; (21196 60375)) ;;; Generated autoloads from org-macs.el (autoload 'org-load-noerror-mustsuffix "org-macs" "\ @@ -1167,7 +1167,7 @@ Load FILE with optional arguments NOERROR and MUSTSUFFIX. Drop the MUSTSUFFIX a ;;;*** ;;;### (autoloads (org-mobile-pull org-mobile-push) "org-mobile" -;;;;;; "org-mobile.el" "c69640ad752b53de4ac6874cbf252ec2") +;;;;;; "org-mobile.el" "b989085b925c9d865acc0289896954d2") ;;; Generated autoloads from org-mobile.el (autoload 'org-mobile-push "org-mobile" "\ @@ -1186,7 +1186,7 @@ agenda view showing the flagged items. ;;;*** -;;;### (autoloads (org-plot/gnuplot) "org-plot" "org-plot.el" "99a279b8b25fe56779d7c49fc617f1bf") +;;;### (autoloads (org-plot/gnuplot) "org-plot" "org-plot.el" "62748a5b07b07d7afa43d16955d0b294") ;;; Generated autoloads from org-plot.el (autoload 'org-plot/gnuplot "org-plot" "\ @@ -1219,7 +1219,7 @@ line directly before or after the table. ;;;;;; org-table-begin org-table-align org-table-export org-table-import ;;;;;; org-table-convert-region org-table-create org-table-create-or-convert-from-region ;;;;;; org-table-create-with-table\.el) "org-table" "org-table.el" -;;;;;; "7d1fe2bd3f96e60383dbc5e4a1046e58") +;;;;;; "31377b4761d68473a76ddad9c4d2867a") ;;; Generated autoloads from org-table.el (autoload 'org-table-create-with-table\.el "org-table" "\ @@ -1830,7 +1830,7 @@ provide ORGTBL directives for the generated table. ;;;*** ;;;### (autoloads (org-timer-set-timer org-timer-item org-timer-change-times-in-region -;;;;;; org-timer org-timer-start) "org-timer" "org-timer.el" "c0a04a9b6c18954e7eadb2f39ca2e805") +;;;;;; org-timer org-timer-start) "org-timer" "org-timer.el" "f021759499e97376e9c71d7372427c93") ;;; Generated autoloads from org-timer.el (autoload 'org-timer-start "org-timer" "\ @@ -1891,7 +1891,7 @@ replace any running timer. ;;;*** ;;;### (autoloads (org-git-version org-release) "org-version" "org-version.el" -;;;;;; (21153 44665)) +;;;;;; (21226 15269)) ;;; Generated autoloads from org-version.el (autoload 'org-release "org-version" "\ @@ -1917,7 +1917,7 @@ The location of ODT styles.") ;;;;;; org-run-like-in-org-mode turn-on-orgstruct++ turn-on-orgstruct ;;;;;; orgstruct-mode org-global-cycle org-cycle org-mode org-clock-persistence-insinuate ;;;;;; turn-on-orgtbl org-version org-babel-load-file org-babel-do-load-languages) -;;;;;; "org" "org.el" (21153 27247)) +;;;;;; "org" "org.el" (21226 15226)) ;;; Generated autoloads from org.el (autoload 'org-babel-do-load-languages "org" "\ @@ -2140,7 +2140,7 @@ Call the customize function with org as argument. ;;;### (autoloads (org-ascii-publish-to-utf8 org-ascii-publish-to-latin1 ;;;;;; org-ascii-publish-to-ascii org-ascii-export-to-ascii org-ascii-export-as-ascii) -;;;;;; "ox-ascii" "ox-ascii.el" "7e56ce84bad3df06580643d1216cb1eb") +;;;;;; "ox-ascii" "ox-ascii.el" "68a1fb86bb07f90e06ab546dd24bd835") ;;; Generated autoloads from ox-ascii.el (autoload 'org-ascii-export-as-ascii "ox-ascii" "\ @@ -2243,7 +2243,7 @@ Return output file name. ;;;### (autoloads (org-beamer-publish-to-pdf org-beamer-publish-to-latex ;;;;;; org-beamer-insert-options-template org-beamer-select-environment ;;;;;; org-beamer-export-to-pdf org-beamer-export-to-latex org-beamer-export-as-latex -;;;;;; org-beamer-mode) "ox-beamer" "ox-beamer.el" "0cc5c809a9e8a88b4f9157d4e1ab8799") +;;;;;; org-beamer-mode) "ox-beamer" "ox-beamer.el" "d1b62baed3d34b8ad2a51b57520a420f") ;;; Generated autoloads from ox-beamer.el (autoload 'org-beamer-mode "ox-beamer" "\ @@ -2385,7 +2385,7 @@ Return output file name. ;;;### (autoloads (org-html-publish-to-html org-html-export-to-html ;;;;;; org-html-convert-region-to-html org-html-export-as-html org-html-htmlize-generate-css) -;;;;;; "ox-html" "ox-html.el" "3c711b5cab9066a1c646cd0abc3b8496") +;;;;;; "ox-html" "ox-html.el" "8e68dfcd2eb63e7e8b5b6ad20c3e4687") ;;; Generated autoloads from ox-html.el (put 'org-html-head-include-default-style 'safe-local-variable 'booleanp) @@ -2493,7 +2493,7 @@ Return output file name. ;;;### (autoloads (org-icalendar-combine-agenda-files org-icalendar-export-agenda-files ;;;;;; org-icalendar-export-to-ics) "ox-icalendar" "ox-icalendar.el" -;;;;;; "6a6f72bc83138debb70bccf3be2f4e5f") +;;;;;; "0b4a917e81efd32a15bc54b2f2274184") ;;; Generated autoloads from ox-icalendar.el (autoload 'org-icalendar-export-to-ics "ox-icalendar" "\ @@ -2545,7 +2545,7 @@ The file is stored under the name chosen in ;;;### (autoloads (org-latex-publish-to-pdf org-latex-publish-to-latex ;;;;;; org-latex-export-to-pdf org-latex-export-to-latex org-latex-convert-region-to-latex -;;;;;; org-latex-export-as-latex) "ox-latex" "ox-latex.el" "0ea64b61b296f98bdbce2855aa2b53ad") +;;;;;; org-latex-export-as-latex) "ox-latex" "ox-latex.el" "cdc9d68aa89323c22f9fa2539f61dab3") ;;; Generated autoloads from ox-latex.el (autoload 'org-latex-export-as-latex "ox-latex" "\ @@ -2671,7 +2671,7 @@ Return output file name. ;;;*** ;;;### (autoloads (org-md-export-to-markdown org-md-convert-region-to-md -;;;;;; org-md-export-as-markdown) "ox-md" "ox-md.el" "fd408f2bbdb5e038379fd5c0ec734cf2") +;;;;;; org-md-export-as-markdown) "ox-md" "ox-md.el" "f5b7b56462757fe732d8aa9aba4b42c8") ;;; Generated autoloads from ox-md.el (autoload 'org-md-export-as-markdown "ox-md" "\ @@ -2733,7 +2733,7 @@ Return output file's name. ;;;*** ;;;### (autoloads (org-odt-convert org-odt-export-to-odt org-odt-export-as-odf-and-open -;;;;;; org-odt-export-as-odf) "ox-odt" "ox-odt.el" "2a66d5ca58354c479b4a112993fbf777") +;;;;;; org-odt-export-as-odf) "ox-odt" "ox-odt.el" "e5f20e1b24d219133d2cdd1eaf08b406") ;;; Generated autoloads from ox-odt.el (put 'org-odt-preferred-output-format 'safe-local-variable 'stringp) @@ -2796,7 +2796,7 @@ using `org-open-file'. ;;;*** ;;;### (autoloads (org-org-publish-to-org org-org-export-to-org org-org-export-as-org) -;;;;;; "ox-org" "ox-org.el" "6e1a106b8efe79c352cc72ac77ad8d91") +;;;;;; "ox-org" "ox-org.el" "b17991920074e6534f5f37f7ef471603") ;;; Generated autoloads from ox-org.el (autoload 'org-org-export-as-org "ox-org" "\ @@ -2870,7 +2870,7 @@ Return output file name. ;;;### (autoloads (org-publish-current-project org-publish-current-file ;;;;;; org-publish-all org-publish) "ox-publish" "ox-publish.el" -;;;;;; "2c9d03d949ff860bff37b18ab7b1f1d3") +;;;;;; "267506990e9e65febe17c526136b03e6") ;;; Generated autoloads from ox-publish.el (defalias 'org-publish-project 'org-publish) @@ -2914,7 +2914,7 @@ the project. ;;;*** ;;;### (autoloads (org-texinfo-convert-region-to-texinfo org-texinfo-publish-to-texinfo) -;;;;;; "ox-texinfo" "ox-texinfo.el" "a2aac533230196b70acfed6ea19fe7e0") +;;;;;; "ox-texinfo" "ox-texinfo.el" "a47dda9a55a9c7dc3c61fbe04bf46e19") ;;; Generated autoloads from ox-texinfo.el (autoload 'org-texinfo-publish-to-texinfo "ox-texinfo" "\ @@ -2940,7 +2940,7 @@ this command to convert it. ;;;### (autoloads (org-export-dispatch org-export-to-file org-export-to-buffer ;;;;;; org-export-insert-default-template org-export-replace-region-by -;;;;;; org-export-string-as org-export-as) "ox" "ox.el" "ec20fcb19adbe84b0807d64fee2562e3") +;;;;;; org-export-string-as org-export-as) "ox" "ox.el" "466b6c2e9e886b6be3dc0db4de098e95") ;;; Generated autoloads from ox.el (autoload 'org-export-as "ox" "\ @@ -3056,7 +3056,7 @@ a registered back-end. FILE is the name of the output file, as a string. A non-nil optional argument ASYNC means the process should happen -asynchronously. The resulting buffer file then be accessible +asynchronously. The resulting buffer will then be accessible through the `org-export-stack' interface. Optional arguments SUBTREEP, VISIBLE-ONLY, BODY-ONLY and diff --git a/lisp/org-macro.el b/lisp/org-macro.el index 61e9243..5b89034 100644 --- a/lisp/org-macro.el +++ b/lisp/org-macro.el @@ -1,6 +1,6 @@ ;;; org-macro.el --- Macro Replacement Code for Org Mode -;; Copyright (C) 2013 Free Software Foundation, Inc. +;; Copyright (C) 2013-2014 Free Software Foundation, Inc. ;; Author: Nicolas Goaziou ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org-macs.el b/lisp/org-macs.el index 4afbace..ddd6e2e 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -1,6 +1,6 @@ ;;; org-macs.el --- Top-level definitions for Org-mode -;; Copyright (C) 2004-2013 Free Software Foundation, Inc. +;; Copyright (C) 2004-2014 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org-mhe.el b/lisp/org-mhe.el index 7d6e4ec..bdd6e15 100644 --- a/lisp/org-mhe.el +++ b/lisp/org-mhe.el @@ -1,6 +1,6 @@ ;;; org-mhe.el --- Support for links to MH-E messages from within Org-mode -;; Copyright (C) 2004-2013 Free Software Foundation, Inc. +;; Copyright (C) 2004-2014 Free Software Foundation, Inc. ;; Author: Thomas Baumann ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el index a43896b..f59d1c4 100644 --- a/lisp/org-mobile.el +++ b/lisp/org-mobile.el @@ -1,5 +1,5 @@ ;;; org-mobile.el --- Code for asymmetric sync with a mobile device -;; Copyright (C) 2009-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp @@ -460,6 +460,7 @@ agenda view showing the flagged items." ((stringp x) x) ((eq (car x) :startgroup) "{") ((eq (car x) :endgroup) "}") + ((eq (car x) :grouptags) nil) ((eq (car x) :newline) nil) ((listp x) (car x)))) def-tags)) diff --git a/lisp/org-mouse.el b/lisp/org-mouse.el index c8a6c86..27dc0e0 100644 --- a/lisp/org-mouse.el +++ b/lisp/org-mouse.el @@ -1,6 +1,6 @@ ;;; org-mouse.el --- Better mouse support for org-mode -;; Copyright (C) 2006-2013 Free Software Foundation, Inc. +;; Copyright (C) 2006-2014 Free Software Foundation, Inc. ;; Author: Piotr Zielinski ;; Maintainer: Carsten Dominik diff --git a/lisp/org-pcomplete.el b/lisp/org-pcomplete.el index 77f68f4..32dcaa6 100644 --- a/lisp/org-pcomplete.el +++ b/lisp/org-pcomplete.el @@ -1,6 +1,6 @@ ;;; org-pcomplete.el --- In-buffer completion code -;; Copyright (C) 2004-2013 Free Software Foundation, Inc. +;; Copyright (C) 2004-2014 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik ;; John Wiegley diff --git a/lisp/org-plot.el b/lisp/org-plot.el index 384a6f6..556b9ef 100644 --- a/lisp/org-plot.el +++ b/lisp/org-plot.el @@ -1,6 +1,6 @@ ;;; org-plot.el --- Support for plotting from Org-mode -;; Copyright (C) 2008-2013 Free Software Foundation, Inc. +;; Copyright (C) 2008-2014 Free Software Foundation, Inc. ;; ;; Author: Eric Schulte ;; Keywords: tables, plotting diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el index 84b1176..0c6f2de 100644 --- a/lisp/org-protocol.el +++ b/lisp/org-protocol.el @@ -1,6 +1,6 @@ ;;; org-protocol.el --- Intercept calls from emacsclient to trigger custom actions. ;; -;; Copyright (C) 2008-2013 Free Software Foundation, Inc. +;; Copyright (C) 2008-2014 Free Software Foundation, Inc. ;; ;; Authors: Bastien Guerry ;; Daniel M German diff --git a/lisp/org-rmail.el b/lisp/org-rmail.el index e2f9fbe..6859b65 100644 --- a/lisp/org-rmail.el +++ b/lisp/org-rmail.el @@ -1,6 +1,6 @@ ;;; org-rmail.el --- Support for links to Rmail messages from within Org-mode -;; Copyright (C) 2004-2013 Free Software Foundation, Inc. +;; Copyright (C) 2004-2014 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp @@ -95,7 +95,10 @@ (defun org-rmail-follow-link (folder article) "Follow an Rmail link to FOLDER and ARTICLE." (require 'rmail) - (setq article (org-add-angle-brackets article)) + (cond ((null article) (setq article "")) + ((stringp article) + (setq article (org-add-angle-brackets article))) + (t (user-error "Wrong RMAIL link format"))) (let (message-number) (save-excursion (save-window-excursion @@ -105,8 +108,7 @@ (rmail-widen) (goto-char (point-max)) (if (re-search-backward - (concat "^Message-ID:\\s-+" (regexp-quote - (or article ""))) + (concat "^Message-ID:\\s-+" (regexp-quote article)) nil t) (rmail-what-message)))))) (if message-number diff --git a/lisp/org-src.el b/lisp/org-src.el index 259186c..b8d7c67 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -1,6 +1,6 @@ ;;; org-src.el --- Source code examples in Org ;; -;; Copyright (C) 2004-2013 Free Software Foundation, Inc. +;; Copyright (C) 2004-2014 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik ;; Bastien Guerry diff --git a/lisp/org-table.el b/lisp/org-table.el index 8418cf6..c952234 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -1,6 +1,6 @@ ;;; org-table.el --- The table editor for Org-mode -;; Copyright (C) 2004-2013 Free Software Foundation, Inc. +;; Copyright (C) 2004-2014 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp @@ -1241,6 +1241,7 @@ is always the old value." (defun org-table-field-info (arg) "Show info about the current field, and highlight any reference at point." (interactive "P") + (unless (org-at-table-p) (user-error "Not at a table")) (org-table-get-specials) (save-excursion (let* ((pos (point)) @@ -2274,7 +2275,7 @@ KEY is \"@\" or \"$\". REPLACE is an alist of numbers to replace. For all numbers larger than LIMIT, shift them by DELTA." (save-excursion (goto-char (org-table-end)) - (when (let ((case-fold-search t)) (looking-at "[ \t]*#\\+tblfm:")) + (while (let ((case-fold-search t)) (looking-at "[ \t]*#\\+tblfm:")) (let ((msg "The formulas in #+TBLFM have been updated") (re (concat key "\\([0-9]+\\)")) (re2 @@ -2288,8 +2289,9 @@ For all numbers larger than LIMIT, shift them by DELTA." (while (re-search-forward re2 (point-at-eol) t) (unless (save-match-data (org-in-regexp "remote([^)]+?)")) (if (equal (char-before (match-beginning 0)) ?.) - (user-error "Change makes TBLFM term %s invalid, use undo to recover" - (match-string 0)) + (user-error + "Change makes TBLFM term %s invalid, use undo to recover" + (match-string 0)) (replace-match ""))))) (while (re-search-forward re (point-at-eol) t) (unless (save-match-data (org-in-regexp "remote([^)]+?)")) @@ -2300,7 +2302,8 @@ For all numbers larger than LIMIT, shift them by DELTA." (message msg)) ((and limit (> n limit)) (replace-match (concat key (int-to-string (+ n delta))) t t) - (message msg))))))))) + (message msg)))))) + (forward-line)))) (defun org-table-get-specials () "Get the column names and local parameters for this table." diff --git a/lisp/org-timer.el b/lisp/org-timer.el index db7760d..5554027 100644 --- a/lisp/org-timer.el +++ b/lisp/org-timer.el @@ -1,6 +1,6 @@ ;;; org-timer.el --- The relative timer code for Org-mode -;; Copyright (C) 2008-2013 Free Software Foundation, Inc. +;; Copyright (C) 2008-2014 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org-version.el b/lisp/org-version.el index 541de90..62f8747 100644 --- a/lisp/org-version.el +++ b/lisp/org-version.el @@ -5,13 +5,13 @@ (defun org-release () "The release version of org-mode. Inserted by installing org-mode or when a release is made." - (let ((org-release "8.2.4")) + (let ((org-release "8.2.5h")) org-release)) ;;;###autoload (defun org-git-version () "The Git version of org-mode. Inserted by installing org-mode or when a release is made." - (let ((org-git-version "8.2.4-dist")) + (let ((org-git-version "8.2.5h-dist")) org-git-version)) ;;;###autoload (defvar org-odt-data-dir "/usr/share/emacs/etc/org" diff --git a/lisp/org-w3m.el b/lisp/org-w3m.el index a2f2916..c8ddc82 100644 --- a/lisp/org-w3m.el +++ b/lisp/org-w3m.el @@ -1,6 +1,6 @@ ;;; org-w3m.el --- Support from copy and paste from w3m to Org-mode -;; Copyright (C) 2008-2013 Free Software Foundation, Inc. +;; Copyright (C) 2008-2014 Free Software Foundation, Inc. ;; Author: Andy Stewart ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org.el b/lisp/org.el index adaabeb..4827594 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -1,7 +1,7 @@ ;;; org.el --- Outline-based notes management and organizer ;; Carstens outline-mode for keeping track of everything. -;; Copyright (C) 2004-2013 Free Software Foundation, Inc. +;; Copyright (C) 2004-2014 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik ;; Maintainer: Carsten Dominik @@ -602,7 +602,7 @@ The list of commands is: `org-schedule', `org-deadline', already archived entries." :type '(choice (const :tag "Don't loop" nil) (const :tag "All headlines in active region" t) - (const :tag "In active region, headlines at the same level than the first one" 'start-level) + (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 @@ -813,10 +813,11 @@ Also apply the translations defined in `org-xemacs-key-equivalents'." (defcustom org-ellipsis nil "The ellipsis to use in the Org-mode outline. -When nil, just use the standard three dots. When a string, use that instead, +When nil, just use the standard three dots. +When a string, use that string instead. When a face, use the standard 3 dots, but with the specified face. The change affects only Org-mode (which will then use its own display table). -Changing this requires executing `M-x org-mode' in a buffer to become +Changing this requires executing `M-x org-mode RET' in a buffer to become effective." :group 'org-startup :type '(choice (const :tag "Default" nil) @@ -1741,7 +1742,7 @@ Needs to be set before org.el is loaded." :version "24.4" :package-version '(Org . "8.3") :type '(choice - (const :tag "A double click follows the link" 'double) + (const :tag "A double click follows the link" double) (const :tag "Unconditionally follow the link with mouse-1" t) (integer :tag "mouse-1 click does not follow the link if longer than N ms" 450))) @@ -2246,7 +2247,7 @@ fast, while still showing the whole path to the entry." "Non-nil means allow to create new nodes as refile targets. New nodes are then created by adding \"/new node name\" to the completion of an existing node. When the value of this variable is `confirm', -new node creation must be confirmed by the user (recommended) +new node creation must be confirmed by the user (recommended). When nil, the completion must match an existing entry. Note that, if the new heading is not seen by the criteria @@ -2428,7 +2429,7 @@ current entry each time a todo state is changed." :group 'org-todo :type '(choice (const :tag "Yes, only for TODO entries" t) - (const :tag "Yes, including all entries" 'all-headlines) + (const :tag "Yes, including all entries" all-headlines) (repeat :tag "Yes, for TODOs in this list" (string :tag "TODO keyword")) (other :tag "No TODO statistics" nil))) @@ -3707,12 +3708,12 @@ This is a property list with the following properties: the same numbers for HTML export. :matchers a list indicating which matchers should be used to find LaTeX fragments. Valid members of this list are: - \"begin\" find environments - \"$1\" find single characters surrounded by $.$ - \"$\" find math expressions surrounded by $...$ - \"$$\" find math expressions surrounded by $$....$$ - \"\\(\" find math expressions surrounded by \\(...\\) - \"\\ [\" find math expressions surrounded by \\ [...\\]" + \"begin\" find environments + \"$1\" find single characters surrounded by $.$ + \"$\" find math expressions surrounded by $...$ + \"$$\" find math expressions surrounded by $$....$$ + \"\\(\" find math expressions surrounded by \\(...\\) + \"\\=\\[\" find math expressions surrounded by \\=\\[...\\]" :group 'org-latex :type 'plist) @@ -4381,14 +4382,6 @@ If yes, offer to stop it and to save the buffer with the changes." (add-hook 'org-mode-hook 'org-clock-load) (add-hook 'kill-emacs-hook 'org-clock-save)) -;; Define the variable already here, to make sure we have it. -(defvar org-indent-mode nil - "Non-nil if Org-Indent mode is enabled. -Use the command `org-indent-mode' to change this variable.") - -;; Autoload archiving code -;; The stuff that is needed for cycling and tags has to be defined here. - (defgroup org-archive nil "Options concerning archiving in Org-mode." :tag "Org Archive" @@ -5444,7 +5437,7 @@ The following commands are available: (add-to-list 'customize-package-emacs-version-alist '(Org ("6.21b" . "23.1") ("6.33x" . "23.2") ("7.8.11" . "24.1") ("7.9.4" . "24.3") - ("8.0" . "24.4"))) + ("8.2.6" . "24.4"))) (defvar org-mode-transpose-word-syntax-table (let ((st (make-syntax-table))) @@ -5693,7 +5686,7 @@ The time stamps may be either active or inactive.") '(invisible org-link)) (add-text-properties (match-beginning 3) (match-end 3) '(invisible org-link))))) - (backward-char 1)) + (goto-char (1+ (match-beginning 0)))) rtn)) (defun org-emphasize (&optional char) @@ -6827,10 +6820,12 @@ With a numeric prefix, show all headlines up to that level." "Set the visibility required by startup options and properties." (cond ((eq org-startup-folded t) - (org-cycle '(4))) + (org-overview)) ((eq org-startup-folded 'content) - (let ((this-command 'org-cycle) (last-command 'org-cycle)) - (org-cycle '(4)) (org-cycle '(4))))) + (org-content)) + ((or (eq org-startup-folded 'showeverything) + (eq org-startup-folded nil)) + (show-all))) (unless (eq org-startup-folded 'showeverything) (if org-hide-block-startup (org-hide-block-all)) (org-set-visibility-according-to-property 'no-cleanup) @@ -6910,7 +6905,6 @@ With numerical argument N, show content up to level N." (show-branches)) (if (bobp) (throw 'exit nil)))))) - (defun org-optimize-window-after-visibility-change (state) "Adjust the window after a change in outline visibility. This function is the default value of the hook `org-cycle-hook'." @@ -7886,14 +7880,10 @@ The level is the number of stars at the beginning of the headline." "Return the outline depth of the last headline before the current line. Returns 0 for the first headline in the buffer, and nil if before the first headline." - (let ((current-level (org-current-level)) - (prev-level (when (> (line-number-at-pos) 1) - (save-excursion - (beginning-of-line 0) - (org-current-level))))) - (cond ((null current-level) nil) ; Before first headline - ((null prev-level) 0) ; At first headline - (prev-level)))) + (and (org-current-level) + (or (and (/= (line-beginning-position) (point-min)) + (save-excursion (beginning-of-line 0) (org-current-level))) + 0))) (defun org-reduced-level (l) "Compute the effective level of a heading. @@ -7945,7 +7935,7 @@ in the region." (t (replace-match up-head nil t))) ;; Fixup tag positioning (unless (= level 1) - (and org-auto-align-tags (org-set-tags nil t)) + (and org-auto-align-tags (org-set-tags nil 'ignore-column)) (if org-adapt-indentation (org-fixup-indentation (- diff)))) (run-hooks 'org-after-promote-entry-hook))) @@ -7961,7 +7951,7 @@ in the region." (diff (abs (- level (length down-head) -1)))) (replace-match down-head nil t) ;; Fixup tag positioning - (and org-auto-align-tags (org-set-tags nil t)) + (and org-auto-align-tags (org-set-tags nil 'ignore-column)) (if org-adapt-indentation (org-fixup-indentation diff)) (run-hooks 'org-after-demote-entry-hook))) @@ -8647,7 +8637,7 @@ links." (show-all))) (setq beg (point)) - (if (>= beg end) (user-error "Nothing to sort")) + (when (>= beg end) (goto-char start) (user-error "Nothing to sort")) (looking-at "\\(\\*+\\)") (setq stars (match-string 1) @@ -9062,7 +9052,7 @@ if `orgstruct-heading-prefix-regexp' is not empty." (key-description key)))))) thereis (key-binding key)))) (if (keymapp binding) - (set-temporary-overlay-map binding) + (org-set-transient-map binding) (let ((func (or binding (unless disable 'orgstruct-error)))) @@ -9421,7 +9411,7 @@ active region." (funcall (intern (completing-read "Which function for creating the link? " - sfunsn t (car sfunsn))))) + sfunsn nil t (car sfunsn))))) (funcall (caar sfuns))) (setq link (plist-get org-store-link-plist :link) desc (or (plist-get org-store-link-plist @@ -9611,7 +9601,8 @@ active region." (when custom-id (setq link (concat "file:" (abbreviate-file-name (buffer-file-name)) "::#" custom-id)) - (push (list link desc) org-stored-links))))))) + (push (list link desc) org-stored-links)) + (car org-stored-links)))))) (defun org-store-link-props (&rest plist) "Store link properties, extract names and addresses." @@ -11638,7 +11629,7 @@ prefix argument (`C-u C-u C-u C-c C-w')." (delete-region (point) (+ (point) (- region-end region-start))) (delete-region (and (org-back-to-heading t) (point)) - (min (buffer-size) (org-end-of-subtree t t) (point))))) + (min (1+ (buffer-size)) (org-end-of-subtree t t) (point))))) (when (featurep 'org-inlinetask) (org-inlinetask-remove-END-maybe)) (setq org-markers-to-move nil) @@ -11650,6 +11641,17 @@ prefix argument (`C-u C-u C-u C-c C-w')." (bookmark-jump "org-refile-last-stored") (message "This is the location of the last refile")) +(defun org-refile--get-location (refloc tbl) + "When user refile to REFLOC, find the associated target in TBL. +Also check `org-refile-target-table'." + (car (delq + nil + (mapcar + (lambda (r) (or (assoc r tbl) + (assoc r org-refile-target-table))) + (list (replace-regexp-in-string "/$" "" refloc) + (replace-regexp-in-string "\\([^/]\\)$" "\\1/" refloc)))))) + (defun org-refile-get-location (&optional prompt default-buffer new-nodes no-exclude) "Prompt the user for a refile location, using PROMPT. @@ -11703,10 +11705,9 @@ this is used for the GOTO interface." (setq old-hist org-refile-history) (setq answ (funcall cfunc prompt tbl nil (not new-nodes) nil 'org-refile-history (or cdef (car org-refile-history)))) - (setq pa (or (assoc answ tbl) (assoc (concat answ "/") tbl))) - (org-refile-check-position pa) - (if pa + (if (setq pa (org-refile--get-location answ tbl)) (progn + (org-refile-check-position pa) (when (or (not org-refile-history) (not (eq old-hist org-refile-history)) (not (equal (car pa) (car org-refile-history)))) @@ -11721,8 +11722,7 @@ this is used for the GOTO interface." (progn (setq parent (match-string 1 answ) child (match-string 2 answ)) - (setq parent-target (or (assoc parent tbl) - (assoc (concat parent "/") tbl))) + (setq parent-target (org-refile--get-location parent tbl)) (when (and parent-target (or (eq new-nodes t) (and (eq new-nodes 'confirm) @@ -14459,15 +14459,18 @@ If DATA is nil or the empty string, any tags will be removed." (defvar org-indent-indentation-per-level) (defun org-set-tags (&optional arg just-align) "Set the tags for the current headline. -With prefix ARG, realign all tags in headings in the current buffer." +With prefix ARG, realign all tags in headings in the current buffer. +When JUST-ALIGN is non-nil, only align tags. +When JUST-ALIGN is 'ignore-column, align tags without trying to set +the column by ignoring invisible text." (interactive "P") (if (and (org-region-active-p) org-loop-over-headlines-in-active-region) (let ((cl (if (eq org-loop-over-headlines-in-active-region 'start-level) 'region-start-level 'region)) org-loop-over-headlines-in-active-region) (org-map-entries - ;; We don't use ARG and JUST-ALIGN here these args are not - ;; useful when looping over headlines + ;; We don't use ARG and JUST-ALIGN here because these args + ;; are not useful when looping over headlines. `(org-set-tags) org-loop-over-headlines-in-active-region cl (if (outline-invisible-p) (org-end-of-subtree nil t)))) @@ -14545,7 +14548,7 @@ With prefix ARG, realign all tags in headings in the current buffer." (goto-char (match-beginning 0)) (setq c0 (current-column) ;; compute offset for the case of org-indent-mode active - di (if org-indent-mode + di (if (org-bound-and-true-p org-indent-mode) (* (1- org-indent-indentation-per-level) (1- level)) 0) p0 (if (equal (char-before) ?*) (1+ (point)) (point)) @@ -14556,7 +14559,7 @@ With prefix ARG, realign all tags in headings in the current buffer." (and (not (featurep 'xemacs)) c0 indent-tabs-mode (tabify p0 (point))) tags) (t (error "Tags alignment failed"))) - (org-move-to-column col) + (org-move-to-column col nil nil (not (eq just-align 'ignore-column))) (unless just-align (run-hooks 'org-after-tags-change-hook)))))) @@ -15289,6 +15292,8 @@ in `org-use-property-inheritance' selects PROPERTY for inheritance. If the property is present but empty, the return value is the empty string. If the property is not present at all, nil is returned. +Return the value as a string. + If LITERAL-NIL is set, return the string value \"nil\" as a string, do not interpret it as the list atom nil. This is used for inheritance when a \"nil\" value can supersede a non-nil value higher up the hierarchy." @@ -15454,14 +15459,19 @@ Each hook function should accept two arguments, the name of the property and the new value.") (defun org-entry-put (pom property value) - "Set PROPERTY to VALUE for entry at point-or-marker POM." + "Set PROPERTY to VALUE for entry at point-or-marker POM. +If the value is `nil', it is converted to the empty string. +If it is not a string, an error is raised." + (cond ((null value) (setq value "")) + ((not (stringp value)) + (error "Properties values should be strings."))) (org-with-point-at pom (org-back-to-heading t) (let ((beg (point)) (end (save-excursion (outline-next-heading) (point))) range) (cond ((equal property "TODO") - (when (and (stringp value) (string-match "\\S-" value) + (when (and (string-match "\\S-" value) (not (member value org-todo-keywords-1))) (user-error "\"%s\" is not a valid TODO state" value)) (if (or (not value) @@ -15470,7 +15480,7 @@ and the new value.") (org-todo value) (org-set-tags nil 'align)) ((equal property "PRIORITY") - (org-priority (if (and value (stringp value) (string-match "\\S-" value)) + (org-priority (if (and value (string-match "\\S-" value)) (string-to-char value) ?\ )) (org-set-tags nil 'align)) ((equal property "CLOCKSUM") @@ -19489,8 +19499,14 @@ because, in this case the deletion might narrow the column." (org-fix-tags-on-the-fly)))) ;; Make `delete-selection-mode' work with org-mode and orgtbl-mode -(put 'org-self-insert-command 'delete-selection t) -(put 'orgtbl-self-insert-command 'delete-selection t) +(put 'org-self-insert-command 'delete-selection + (lambda () + (not (run-hook-with-args-until-success + 'self-insert-uses-region-functions)))) +(put 'orgtbl-self-insert-command 'delete-selection + (lambda () + (not (run-hook-with-args-until-success + 'self-insert-uses-region-functions)))) (put 'org-delete-char 'delete-selection 'supersede) (put 'org-delete-backward-char 'delete-selection 'supersede) (put 'org-yank 'delete-selection 'yank) @@ -20025,21 +20041,19 @@ Depending on context, this does one of the following: "Change timestamps synchronously up in CLOCK log lines. Optional argument N tells to change by that many units." (interactive "P") - (cond ((and (not org-support-shift-select) - (org-at-clock-log-p) - (org-at-timestamp-p t)) - (org-clock-timestamps-up n)) - (t (org-shiftselect-error)))) + (if (and (org-at-clock-log-p) (org-at-timestamp-p t)) + (let (org-support-shift-select) + (org-clock-timestamps-up n)) + (user-error "Not at a clock log"))) (defun org-shiftcontroldown (&optional n) "Change timestamps synchronously down in CLOCK log lines. Optional argument N tells to change by that many units." (interactive "P") - (cond ((and (not org-support-shift-select) - (org-at-clock-log-p) - (org-at-timestamp-p t)) - (org-clock-timestamps-down n)) - (t (org-shiftselect-error)))) + (if (and (org-at-clock-log-p) (org-at-timestamp-p t)) + (let (org-support-shift-select) + (org-clock-timestamps-down n)) + (user-error "Not at a clock log"))) (defun org-ctrl-c-ret () "Call `org-table-hline-and-move' or `org-insert-heading' dep. on context." @@ -20360,11 +20374,13 @@ This command does many different things, depending on context: "C-c C-c can do nothing useful at this location"))))))))) (defun org-mode-restart () - "Restart Org-mode, to scan again for special lines. -Also updates the keyword regular expressions." (interactive) - (org-mode) - (message "Org-mode restarted")) + (let ((indent-status (org-bound-and-true-p org-indent-mode))) + (funcall major-mode) + (hack-local-variables) + (when (and indent-status (not (org-bound-and-true-p org-indent-mode))) + (org-indent-mode -1))) + (message "%s restarted" major-mode)) (defun org-kill-note-or-show-branches () "If this is a Note buffer, abort storing the note. Else call `show-branches'." diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el index 55bda83..e8f1b1f 100644 --- a/lisp/ox-ascii.el +++ b/lisp/ox-ascii.el @@ -1,6 +1,6 @@ ;;; ox-ascii.el --- ASCII Back-End for Org Export Engine -;; Copyright (C) 2012-2013 Free Software Foundation, Inc. +;; Copyright (C) 2012-2014 Free Software Foundation, Inc. ;; Author: Nicolas Goaziou ;; Keywords: outlines, hypermedia, calendar, wp @@ -530,8 +530,9 @@ INFO is a plist used as a communication channel." (+ (- (org-list-get-ind beg-item struct) (org-list-get-ind (org-list-get-top-point struct) struct)) - (length (org-ascii--checkbox parent-item info)) - (length + (string-width (or (org-ascii--checkbox parent-item info) + "")) + (string-width (or (org-list-get-tag beg-item struct) (org-list-get-bullet beg-item struct))))))))))))) @@ -589,7 +590,8 @@ possible. It doesn't apply to `inlinetask' elements." (when tags (format (format " %%%ds" - (max (- text-width (1+ (length first-part))) (length tags))) + (max (- text-width (1+ (string-width first-part))) + (string-width tags))) tags)) ;; Maybe underline text, if ELEMENT type is `headline' and an ;; underline character has been defined. @@ -600,7 +602,9 @@ possible. It doesn't apply to `inlinetask' elements." org-ascii-underline))))) (and under-char (concat "\n" - (make-string (length first-part) under-char)))))))) + (make-string (/ (string-width first-part) + (char-width under-char)) + under-char)))))))) (defun org-ascii--has-caption-p (element info) "Non-nil when ELEMENT has a caption affiliated keyword. @@ -647,7 +651,7 @@ which the table of contents generation has been initiated." (let ((title (org-ascii--translate "Table of Contents" info))) (concat title "\n" - (make-string (length title) + (make-string (string-width title) (if (eq (plist-get info :ascii-charset) 'utf-8) ?─ ?_)) "\n\n" (let ((text-width @@ -674,7 +678,7 @@ generation. INFO is a plist used as a communication channel." (let ((title (org-ascii--translate "List of Listings" info))) (concat title "\n" - (make-string (length title) + (make-string (string-width title) (if (eq (plist-get info :ascii-charset) 'utf-8) ?─ ?_)) "\n\n" (let ((text-width @@ -688,9 +692,10 @@ generation. INFO is a plist used as a communication channel." ;; Store initial text so its length can be computed. This is ;; used to properly align caption right to it in case of ;; filling (like contents of a description list item). - (let ((initial-text - (format (org-ascii--translate "Listing %d:" info) - (incf count)))) + (let* ((initial-text + (format (org-ascii--translate "Listing %d:" info) + (incf count))) + (initial-width (string-width initial-text))) (concat initial-text " " (org-trim @@ -700,8 +705,8 @@ generation. INFO is a plist used as a communication channel." (let ((caption (or (org-export-get-caption src-block t) (org-export-get-caption src-block)))) (org-export-data caption info)) - (- text-width (length initial-text)) info) - (length initial-text)))))) + (- text-width initial-width) info) + initial-width))))) (org-export-collect-listings info) "\n"))))) (defun org-ascii--list-tables (keyword info) @@ -712,7 +717,7 @@ generation. INFO is a plist used as a communication channel." (let ((title (org-ascii--translate "List of Tables" info))) (concat title "\n" - (make-string (length title) + (make-string (string-width title) (if (eq (plist-get info :ascii-charset) 'utf-8) ?─ ?_)) "\n\n" (let ((text-width @@ -726,9 +731,10 @@ generation. INFO is a plist used as a communication channel." ;; Store initial text so its length can be computed. This is ;; used to properly align caption right to it in case of ;; filling (like contents of a description list item). - (let ((initial-text - (format (org-ascii--translate "Table %d:" info) - (incf count)))) + (let* ((initial-text + (format (org-ascii--translate "Table %d:" info) + (incf count))) + (initial-width (string-width initial-text))) (concat initial-text " " (org-trim @@ -738,8 +744,8 @@ generation. INFO is a plist used as a communication channel." (let ((caption (or (org-export-get-caption table t) (org-export-get-caption table)))) (org-export-data caption info)) - (- text-width (length initial-text)) info) - (length initial-text)))))) + (- text-width initial-width) info) + initial-width))))) (org-export-collect-tables info) "\n"))))) (defun org-ascii--unique-links (element info) @@ -852,14 +858,16 @@ INFO is a plist used as a communication channel." ((and (org-string-nw-p date) (org-string-nw-p author)) (concat author - (make-string (- text-width (length date) (length author)) ? ) + (make-string (- text-width (string-width date) (string-width author)) + ?\s) date (when (org-string-nw-p email) (concat "\n" email)) "\n\n\n")) ((and (org-string-nw-p date) (org-string-nw-p email)) (concat email - (make-string (- text-width (length date) (length email)) ? ) + (make-string (- text-width (string-width date) (string-width email)) + ?\s) date "\n\n\n")) ((org-string-nw-p date) (concat @@ -879,7 +887,10 @@ INFO is a plist used as a communication channel." (formatted-title (org-ascii--fill-string title title-len info)) (line (make-string - (min (+ (max title-len (length author) (length email)) 2) + (min (+ (max title-len + (string-width (or author "")) + (string-width (or email ""))) + 2) text-width) (if utf8p ?━ ?_)))) (org-ascii--justify-string (concat line "\n" @@ -918,7 +929,7 @@ holding export options." (concat title "\n" (make-string - (length title) + (string-width title) (if (eq (plist-get info :ascii-charset) 'utf-8) ?─ ?_)))) "\n\n" (let ((text-width (- org-ascii-text-width org-ascii-global-margin))) @@ -1195,10 +1206,10 @@ contextual information." ;;;; Inlinetask (defun org-ascii-format-inlinetask-default - (todo type priority name tags contents width inlinetask info) + (todo type priority name tags contents width inlinetask info) "Format an inline task element for ASCII export. See `org-ascii-format-inlinetask-function' for a description -of the paramaters." +of the parameters." (let* ((utf8p (eq (plist-get info :ascii-charset) 'utf-8)) (width (or width org-ascii-inlinetask-width))) (org-ascii--indent-string @@ -1208,7 +1219,7 @@ of the paramaters." (unless utf8p (concat (make-string width ? ) "\n")) ;; Add title. Fill it if wider than inlinetask. (let ((title (org-ascii--build-title inlinetask info width))) - (if (<= (length title) width) title + (if (<= (string-width title) width) title (org-ascii--fill-string title width info))) "\n" ;; If CONTENTS is not empty, insert it along with @@ -1301,7 +1312,7 @@ contextual information." ;; Contents: Pay attention to indentation. Note: check-boxes are ;; already taken care of at the paragraph level so they don't ;; interfere with indentation. - (let ((contents (org-ascii--indent-string contents (length bullet)))) + (let ((contents (org-ascii--indent-string contents (string-width bullet)))) (if (eq (org-element-type (car (org-element-contents item))) 'paragraph) (org-trim contents) (concat "\n" contents)))))) @@ -1652,7 +1663,7 @@ are ignored." (org-element-map table 'table-row (lambda (row) (setq max-width - (max (length + (max (string-width (org-export-data (org-element-contents (elt (org-element-contents row) col)) @@ -1672,7 +1683,8 @@ a communication channel." ;; each cell in the column. (let ((width (org-ascii--table-cell-width table-cell info))) ;; When contents are too large, truncate them. - (unless (or org-ascii-table-widen-columns (<= (length contents) width)) + (unless (or org-ascii-table-widen-columns + (<= (string-width (or contents "")) width)) (setq contents (concat (substring contents 0 (- width 2)) "=>"))) ;; Align contents correctly within the cell. (let* ((indent-tabs-mode nil) @@ -1681,7 +1693,9 @@ a communication channel." (org-ascii--justify-string contents width (org-export-table-cell-alignment table-cell info))))) - (setq contents (concat data (make-string (- width (length data)) ? )))) + (setq contents + (concat data + (make-string (- width (string-width (or data ""))) ?\s)))) ;; Return cell. (concat (format " %s " contents) (when (memq 'right (org-export-table-cell-borders table-cell info)) diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el index 2868944..485f098 100644 --- a/lisp/ox-beamer.el +++ b/lisp/ox-beamer.el @@ -1,6 +1,6 @@ ;;; ox-beamer.el --- Beamer Back-End for Org Export Engine -;; Copyright (C) 2007-2013 Free Software Foundation, Inc. +;; Copyright (C) 2007-2014 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Nicolas Goaziou @@ -36,10 +36,7 @@ (unless (assoc "beamer" org-latex-classes) (add-to-list 'org-latex-classes '("beamer" - "\\documentclass[presentation]{beamer} -\[DEFAULT-PACKAGES] -\[PACKAGES] -\[EXTRA]" + "\\documentclass[presentation]{beamer}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))) @@ -1094,6 +1091,7 @@ aid, but the tag does not have any semantic meaning." envs) '((:endgroup)) '(("BMCOL" . ?|)))) + (org-use-fast-tag-selection t) (org-fast-tag-selection-single-key t)) (org-set-tags) (let ((tags (or (ignore-errors (org-get-tags-string)) ""))) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 44962a5..db8ac69 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -1,6 +1,6 @@ ;;; ox-html.el --- HTML Back-End for Org Export Engine -;; Copyright (C) 2011-2013 Free Software Foundation, Inc. +;; Copyright (C) 2011-2014 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Jambunathan K @@ -279,6 +279,8 @@ for the JavaScript code in this tag. pre.src-sql:before { content: 'SQL'; } table { border-collapse:collapse; } + caption.t-above { caption-side: top; } + caption.t-bottom { caption-side: bottom; } td, th { vertical-align:top; } th.right { text-align: center; } th.left { text-align: center; } @@ -3255,8 +3257,8 @@ contextual information." (if (equal attributes "") "" (concat " " attributes)) (if (not caption) "" (format (if org-html-table-caption-above - "%s" - "%s") + "%s" + "%s") (concat "" (format (org-html--translate "Table %d:" info) number) @@ -3438,21 +3440,6 @@ Return output file name." org-html-extension "html")) plist pub-dir)) - -;;; FIXME - -;;;; org-format-table-html -;;;; org-format-org-table-html -;;;; org-format-table-table-html -;;;; org-table-number-fraction -;;;; org-table-number-regexp -;;;; org-html-inline-image-extensions -;;;; org-export-preferred-target-alist -;;;; class for anchors -;;;; org-export-mark-todo-in-toc -;;;; org-html-format-org-link -;;;; (caption (and caption (org-xml-encode-org-text caption))) -;;;; alt = (file-name-nondirectory path) (provide 'ox-html) diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el index 7c4b4bf..a60c2f9 100644 --- a/lisp/ox-icalendar.el +++ b/lisp/ox-icalendar.el @@ -1,6 +1,6 @@ ;;; ox-icalendar.el --- iCalendar Back-End for Org Export Engine -;; Copyright (C) 2004-2013 Free Software Foundation, Inc. +;; Copyright (C) 2004-2014 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Nicolas Goaziou @@ -964,9 +964,7 @@ files to build the calendar from." ;; BBDB anniversaries. (when (and org-icalendar-include-bbdb-anniversaries (require 'org-bbdb nil t)) - (with-temp-buffer - (org-bbdb-anniv-export-ical) - (buffer-string))))))) + (with-output-to-string (org-bbdb-anniv-export-ical))))))) (run-hook-with-args 'org-icalendar-after-save-hook org-icalendar-combined-agenda-file)) (org-release-buffers org-agenda-new-buffers))) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 3609881..19f055e 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -1,6 +1,6 @@ ;;; ox-latex.el --- LaTeX Back-End for Org Export Engine -;; Copyright (C) 2011-2013 Free Software Foundation, Inc. +;; Copyright (C) 2011-2014 Free Software Foundation, Inc. ;; Author: Nicolas Goaziou ;; Keywords: outlines, hypermedia, calendar, wp @@ -1374,7 +1374,13 @@ holding contextual information." (when (org-export-first-sibling-p headline info) (format "\\begin{%s}\n" (if numberedp 'enumerate 'itemize))) ;; Itemize headline - "\\item " full-text "\n" headline-label pre-blanks contents))) + "\\item" + (and full-text (org-string-match-p "\\`[ \t]*\\[" full-text) + "\\relax") + " " full-text "\n" + headline-label + pre-blanks + contents))) ;; If headline is not the last sibling simply return ;; LOW-LEVEL-BODY. Otherwise, also close the list, before ;; any blank line. @@ -1564,7 +1570,25 @@ contextual information." (and tag (format "[{%s}] " (concat checkbox (org-export-data tag info))))))) - (concat counter "\\item" (or tag (concat " " checkbox)) + (concat counter + "\\item" + (cond + (tag) + (checkbox (concat " " checkbox)) + ;; Without a tag or a check-box, if CONTENTS starts with + ;; an opening square bracket, add "\relax" to "\item", + ;; unless the brackets comes from an initial export + ;; snippet (i.e. it is inserted willingly by the user). + ((and contents + (org-string-match-p "\\`[ \t]*\\[" contents) + (not (let ((e (car (org-element-contents item)))) + (and (eq (org-element-type e) 'paragraph) + (let ((o (car (org-element-contents e)))) + (and (eq (org-element-type o) 'export-snippet) + (eq (org-export-snippet-backend o) + 'latex))))))) + "\\relax ") + (t " ")) (and contents (org-trim contents)) ;; If there are footnotes references in tag, be sure to ;; add their definition at the end of the item. This @@ -1853,18 +1877,13 @@ contextual information." (latex-type (let ((env (plist-get attr :environment))) (cond (env (format "%s" env)) ((eq type 'ordered) "enumerate") - ((eq type 'unordered) "itemize") - ((eq type 'descriptive) "description"))))) + ((eq type 'descriptive) "description") + (t "itemize"))))) (org-latex--wrap-label plain-list (format "\\begin{%s}%s\n%s\\end{%s}" latex-type - ;; Put optional arguments, if any inside square brackets - ;; when necessary. - (let ((options (format "%s" (or (plist-get attr :options) "")))) - (cond ((equal options "") "") - ((string-match "\\`\\[.*\\]\\'" options) options) - (t (format "[%s]" options)))) + (or (plist-get attr :options) "") contents latex-type)))) diff --git a/lisp/ox-man.el b/lisp/ox-man.el index a160e4c..f5653f1 100644 --- a/lisp/ox-man.el +++ b/lisp/ox-man.el @@ -1,6 +1,6 @@ ;; ox-man.el --- Man Back-End for Org Export Engine -;; Copyright (C) 2011-2013 Free Software Foundation, Inc. +;; Copyright (C) 2011-2014 Free Software Foundation, Inc. ;; Author: Nicolas Goaziou ;; Luis R Anaya diff --git a/lisp/ox-md.el b/lisp/ox-md.el index 7842017..2ecafc8 100644 --- a/lisp/ox-md.el +++ b/lisp/ox-md.el @@ -1,6 +1,6 @@ ;;; ox-md.el --- Markdown Back-End for Org Export Engine -;; Copyright (C) 2012-2013 Free Software Foundation, Inc. +;; Copyright (C) 2012-2014 Free Software Foundation, Inc. ;; Author: Nicolas Goaziou ;; Keywords: org, wp, markdown @@ -77,6 +77,7 @@ This variable can be set to either `atx' or `setext'." (headline . org-md-headline) (horizontal-rule . org-md-horizontal-rule) (inline-src-block . org-md-verbatim) + (inner-template . org-md-inner-template) (italic . org-md-italic) (item . org-md-item) (line-break . org-md-line-break) @@ -96,19 +97,26 @@ This variable can be set to either `atx' or `setext'." ;;; Filters (defun org-md-separate-elements (tree backend info) - "Make sure elements are separated by at least one blank line. + "Fix blank lines between elements. TREE is the parse tree being exported. BACKEND is the export back-end used. INFO is a plist used as a communication channel. +Make sure there's no blank line before a plain list, unless it is +located right after a paragraph. Otherwise, add a blank line +between elements. Blank lines between items are preserved. + Assume BACKEND is `md'." - (org-element-map tree org-element-all-elements + (org-element-map tree (remq 'item org-element-all-elements) (lambda (elem) - (unless (eq (org-element-type elem) 'org-data) - (org-element-put-property - elem :post-blank - (let ((post-blank (org-element-property :post-blank elem))) - (if (not post-blank) 1 (max 1 post-blank))))))) + (org-element-put-property + elem :post-blank + (if (and (eq (org-element-type (org-export-get-next-element elem info)) + 'plain-list) + (not (and (eq (org-element-type elem) 'paragraph) + (org-export-get-previous-element elem info)))) + 0 + 1)))) ;; Return updated tree. tree) @@ -244,7 +252,8 @@ a communication channel." (off "[ ] ")) (let ((tag (org-element-property :tag item))) (and tag (format "**%s:** "(org-export-data tag info)))) - (org-trim (replace-regexp-in-string "^" " " contents))))) + (and contents + (org-trim (replace-regexp-in-string "^" " " contents)))))) ;;;; Line Break @@ -403,6 +412,14 @@ a communication channel." ;;;; Template +(defun org-md-inner-template (contents info) + "Return body of document after converting it to Markdown syntax. +CONTENTS is the transcoded contents string. INFO is a plist +holding export options." + ;; Make sure CONTENTS is separated from table of contents and + ;; footnotes with at least a blank line. + (org-trim (org-html-inner-template (concat "\n" contents "\n") info))) + (defun org-md-template (contents info) "Return complete document string after Markdown conversion. CONTENTS is the transcoded contents string. INFO is a plist used diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el index 975dbdb..1e966fe 100644 --- a/lisp/ox-odt.el +++ b/lisp/ox-odt.el @@ -1,6 +1,6 @@ ;;; ox-odt.el --- OpenDocument Text Exporter for Org Mode -;; Copyright (C) 2010-2013 Free Software Foundation, Inc. +;; Copyright (C) 2010-2014 Free Software Foundation, Inc. ;; Author: Jambunathan K ;; Keywords: outlines, hypermedia, calendar, wp @@ -998,7 +998,9 @@ See `org-odt--build-date-styles' for implementation details." (if width (format " svg:width=\"%0.2fcm\"" width) "") (if height (format " svg:height=\"%0.2fcm\"" height) "") extra - (format " text:anchor-type=\"%s\"" (or anchor-type "paragraph"))))) + (format " text:anchor-type=\"%s\"" (or anchor-type "paragraph")) + (format " draw:name=\"%s\"" + (car (org-odt-add-automatic-style "Frame")))))) (format "\n\n%s\n" style frame-attrs @@ -2120,45 +2122,9 @@ SHORT-CAPTION are strings." ;; Get label and caption. (label (org-element-property :name caption-from)) (caption (org-export-get-caption caption-from)) - (short-caption (org-export-get-caption caption-from t)) - ;; Transcode captions. (caption (and caption (org-export-data caption info))) - ;; Currently short caption are sneaked in as object names. - ;; - ;; The advantages are: - ;; - ;; - Table Of Contents: Currently, there is no support for - ;; building TOC for figures, listings and tables. See - ;; `org-odt-keyword'. User instead has to rely on - ;; external application for building such indices. Within - ;; LibreOffice, building an "Illustration Index" or "Index - ;; of Tables" will create a table with long captions (only) - ;; and building a table with "Object names" will create a - ;; table with short captions. - ;; - ;; - Easy navigation: In LibreOffice, object names are - ;; offered via the navigation bar. This way one can - ;; quickly locate and jump to object of his choice in the - ;; exported document. - ;; - ;; The main disadvantage is that there cannot be any markups - ;; within object names i.e., one cannot embolden, italicize - ;; or underline text within short caption. So suppress - ;; generation of ... and other - ;; markups by overriding the default translators. We - ;; probably shouldn't be suppressing translators for all - ;; elements in `org-element-all-objects', but for now this - ;; will do. - (short-caption - (let ((short-caption (or short-caption caption)) - (backend (org-export-create-backend - :parent (org-export-backend-name - (plist-get info :back-end)) - :transcoders - (mapcar (lambda (type) (cons type (lambda (o c i) c))) - org-element-all-objects)))) - (when short-caption - (org-export-data-with-backend short-caption backend info))))) + ;; FIXME: We don't use short-caption for now + (short-caption nil)) (when (or label caption) (let* ((default-category (case (org-element-type element) diff --git a/lisp/ox-org.el b/lisp/ox-org.el index cecad56..3b2e55e 100644 --- a/lisp/ox-org.el +++ b/lisp/ox-org.el @@ -1,6 +1,6 @@ ;;; ox-org.el --- Org Back-End for Org Export Engine -;; Copyright (C) 2013 Free Software Foundation, Inc. +;; Copyright (C) 2013-2014 Free Software Foundation, Inc. ;; Author: Nicolas Goaziou ;; Keywords: org, wp @@ -22,15 +22,8 @@ ;;; Commentary: -;; This library implements an Org back-end for Org exporter. -;; -;; It introduces two interactive functions, `org-org-export-as-org' -;; and `org-org-export-to-org', which export, respectively, to -;; a temporary buffer and to a file. -;; -;; A publishing function is also provided: `org-org-publish-to-org'. - ;;; Code: + (require 'ox) (declare-function htmlize-buffer "htmlize" (&optional buffer)) @@ -121,7 +114,10 @@ setting of `org-html-htmlize-output-type' is 'css." (defun org-org-identity (blob contents info) "Transcode BLOB element or object back into Org syntax. CONTENTS is its contents, as a string or nil. INFO is ignored." - (org-export-expand blob contents t)) + (let ((case-fold-search t)) + (replace-regexp-in-string + "^[ \t]*#\\+ATTR_[-_A-Za-z0-9]+:\\(?: .*\\)?\n" "" + (org-export-expand blob contents t)))) (defun org-org-headline (headline contents info) "Transcode HEADLINE element back into Org syntax. diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el index d87326d..55cb646 100644 --- a/lisp/ox-publish.el +++ b/lisp/ox-publish.el @@ -1,5 +1,5 @@ ;;; ox-publish.el --- Publish Related Org Mode Files as a Website -;; Copyright (C) 2006-2013 Free Software Foundation, Inc. +;; Copyright (C) 2006-2014 Free Software Foundation, Inc. ;; Author: David O'Toole ;; Maintainer: Carsten Dominik @@ -1072,7 +1072,7 @@ publishing directory." Return value is a list of numbers, or nil. This function allows to resolve external fuzzy links like: - [[file.org::*fuzzy][description]" + [[file.org::*fuzzy][description]]" (when org-publish-cache (cdr (assoc (org-split-string (if (eq (aref fuzzy 0) ?*) (substring fuzzy 1) fuzzy)) diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el index 43c1de2..ef881af 100644 --- a/lisp/ox-texinfo.el +++ b/lisp/ox-texinfo.el @@ -1,6 +1,6 @@ ;;; ox-texinfo.el --- Texinfo Back-End for Org Export Engine -;; Copyright (C) 2012-2013 Free Software Foundation, Inc. +;; Copyright (C) 2012-2014 Free Software Foundation, Inc. ;; Author: Jonathan Leech-Pepin ;; Keywords: outlines, hypermedia, calendar, wp @@ -288,7 +288,9 @@ When nil, no transformation is made." (const :tag "No formatting"))) (defcustom org-texinfo-def-table-markup "@samp" - "Default setting for @table environments.") + "Default setting for @table environments." + :group 'org-export-texinfo + :type 'string) ;;; Text markup @@ -348,7 +350,7 @@ The function must accept six parameters: The function should return the string to be exported. For example, the variable could be set to the following function -in order to mimic default behaviour: +in order to mimic default behavior: \(defun org-texinfo-format-inlinetask \(todo type priority name tags contents\) \"Format an inline task element for Texinfo export.\" diff --git a/lisp/ox.el b/lisp/ox.el index 8316ef2..9b77874 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -1,6 +1,6 @@ ;;; ox.el --- Generic Export Engine for Org Mode -;; Copyright (C) 2012-2013 Free Software Foundation, Inc. +;; Copyright (C) 2012-2014 Free Software Foundation, Inc. ;; Author: Nicolas Goaziou ;; Keywords: outlines, hypermedia, calendar, wp @@ -143,7 +143,7 @@ "Alist between export properties and ways to set them. The CAR of the alist is the property name, and the CDR is a list -like (KEYWORD OPTION DEFAULT BEHAVIOUR) where: +like (KEYWORD OPTION DEFAULT BEHAVIOR) where: KEYWORD is a string representing a buffer keyword, or nil. Each property defined this way can also be set, during subtree @@ -152,7 +152,7 @@ KEYWORD is a string representing a buffer keyword, or nil. Each property). OPTION is a string that could be found in an #+OPTIONS: line. DEFAULT is the default value for the property. -BEHAVIOUR determines how Org should handle multiple keywords for +BEHAVIOR determines how Org should handle multiple keywords for the same property. It is a symbol among: nil Keep old value and discard the new one. t Replace old value with the new one. @@ -362,7 +362,7 @@ If the value is `comment' insert it as a comment." :group 'org-export-general :type '(choice (const :tag "No creator sentence" nil) - (const :tag "Sentence as a comment" 'comment) + (const :tag "Sentence as a comment" comment) (const :tag "Insert the sentence" t))) (defcustom org-export-with-date t @@ -1613,10 +1613,11 @@ for export. Return options as a plist." ;; Make sure point is at a heading. (if (org-at-heading-p) (org-up-heading-safe) (org-back-to-heading t)) ;; Take care of EXPORT_TITLE. If it isn't defined, use headline's - ;; title as its fallback value. + ;; title (with no todo keyword, priority cookie or tag) as its + ;; fallback value. (when (setq prop (or (org-entry-get (point) "EXPORT_TITLE") - (progn (looking-at org-todo-line-regexp) - (org-match-string-no-properties 3)))) + (progn (looking-at org-complex-heading-regexp) + (org-match-string-no-properties 4)))) (setq plist (plist-put plist :title @@ -1649,7 +1650,7 @@ for export. Return options as a plist." ((member keyword org-element-document-properties) (org-element-parse-secondary-string value (org-element-restriction 'keyword))) - ;; If BEHAVIOUR is `split' expected value is + ;; If BEHAVIOR is `split' expected value is ;; a list of strings, not a string. ((eq (nth 4 option) 'split) (org-split-string value)) (t value))))))))) @@ -1731,7 +1732,7 @@ Assume buffer is in Org mode. Narrowing, if any, is ignored." (plist-put plist property ;; Handle value depending on specified - ;; BEHAVIOUR. + ;; BEHAVIOR. (case behaviour (space (if (not (plist-get plist property)) @@ -3124,8 +3125,8 @@ locally for the subtree through node properties." ;; Populate OPTIONS and KEYWORDS. (dolist (entry (cond ((eq backend 'default) org-export-options-alist) ((org-export-backend-p backend) - (org-export-get-all-options backend)) - (t (org-export-get-all-options + (org-export-backend-options backend)) + (t (org-export-backend-options (org-export-get-backend backend))))) (let ((keyword (nth 1 entry)) (option (nth 2 entry))) @@ -4955,7 +4956,7 @@ If no translation is found, the quote character is left as-is.") (defconst org-export-smart-quotes-regexps (list ;; Possible opening quote at beginning of string. - "\\`\\([\"']\\)\\(\\w\\|\\s.\\|\\s_\\)" + "\\`\\([\"']\\)\\(\\w\\|\\s.\\|\\s_\\|\\s(\\)" ;; Possible closing quote at beginning of string. "\\`\\([\"']\\)\\(\\s-\\|\\s)\\|\\s.\\)" ;; Possible apostrophe at beginning of string. @@ -5093,7 +5094,7 @@ Return the new string." ;;;; Topology ;; ;; Here are various functions to retrieve information about the -;; neighbourhood of a given element or object. Neighbours of interest +;; neighborhood of a given element or object. Neighbors of interest ;; are direct parent (`org-export-get-parent'), parent headline ;; (`org-export-get-parent-headline'), first element containing an ;; object, (`org-export-get-parent-element'), parent table @@ -5612,7 +5613,7 @@ a registered back-end. FILE is the name of the output file, as a string. A non-nil optional argument ASYNC means the process should happen -asynchronously. The resulting buffer file then be accessible +asynchronously. The resulting buffer will then be accessible through the `org-export-stack' interface. Optional arguments SUBTREEP, VISIBLE-ONLY, BODY-ONLY and -- cgit v1.2.3