summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorS├ębastien Delafond <sdelafond@gmail.com>2014-07-13 13:35:34 +0200
committerS├ębastien Delafond <sdelafond@gmail.com>2014-07-13 13:35:34 +0200
commit77ddd382df838e38504b822e729250b2a6dd9b63 (patch)
tree797a630f5c1131dcbe01d3105f75b38fb03f92a2
parentefc77ab6f5e8883fc38d8c6f75b6db54a0965c15 (diff)
Imported Upstream version 8.2.6
-rw-r--r--contrib/lisp/ox-deck.el2
-rw-r--r--contrib/lisp/ox-groff.el11
-rw-r--r--contrib/lisp/ox-koma-letter.el32
-rw-r--r--contrib/lisp/ox-rss.el10
-rw-r--r--lisp/ob-exp.el4
-rw-r--r--lisp/ob-gnuplot.el13
-rw-r--r--lisp/org-agenda.el73
-rw-r--r--lisp/org-bibtex.el11
-rw-r--r--lisp/org-capture.el3
-rw-r--r--lisp/org-clock.el35
-rw-r--r--lisp/org-colview.el9
-rw-r--r--lisp/org-compat.el21
-rw-r--r--lisp/org-element.el197
-rw-r--r--lisp/org-loaddefs.el38
-rw-r--r--lisp/org-src.el38
-rw-r--r--lisp/org-timer.el5
-rw-r--r--lisp/org-version.el4
-rw-r--r--lisp/org.el429
-rw-r--r--lisp/ox-ascii.el14
-rw-r--r--lisp/ox-beamer.el13
-rw-r--r--lisp/ox-html.el30
-rw-r--r--lisp/ox-latex.el46
-rw-r--r--lisp/ox-man.el10
-rw-r--r--lisp/ox-md.el64
-rw-r--r--lisp/ox-odt.el18
-rw-r--r--lisp/ox-publish.el3
-rw-r--r--lisp/ox-texinfo.el6
-rw-r--r--lisp/ox.el3
-rw-r--r--mk/version.mk4
-rw-r--r--request-assign-future.txt2
30 files changed, 635 insertions, 513 deletions
diff --git a/contrib/lisp/ox-deck.el b/contrib/lisp/ox-deck.el
index 60a2cbe..9d84b03 100644
--- a/contrib/lisp/ox-deck.el
+++ b/contrib/lisp/ox-deck.el
@@ -378,7 +378,7 @@ the \"slide\" class will be added to the to the list element,
(defun org-deck-link (link desc info)
(replace-regexp-in-string "href=\"#" "href=\"#outline-container-"
- (org-html-link link desc info)))
+ (org-export-with-backend 'html link desc info)))
(defun org-deck-template (contents info)
"Return complete document string after HTML conversion.
diff --git a/contrib/lisp/ox-groff.el b/contrib/lisp/ox-groff.el
index 1141292..8484def 100644
--- a/contrib/lisp/ox-groff.el
+++ b/contrib/lisp/ox-groff.el
@@ -1253,12 +1253,8 @@ INFO is a plist holding contextual information. See
(path (cond
((member type '("http" "https" "ftp" "mailto"))
(concat type ":" raw-path))
- ((string= type "file")
- (when (string-match "\\(.+\\)::.+" raw-path)
- (setq raw-path (match-string 1 raw-path)))
- (if (file-name-absolute-p raw-path)
- (concat "file://" (expand-file-name raw-path))
- (concat "file://" raw-path)))
+ ((and (string= type "file") (file-name-absolute-p raw-path))
+ (concat "file://" raw-path))
(t raw-path)))
protocol)
(cond
@@ -1274,7 +1270,8 @@ INFO is a plist holding contextual information. See
(let ((destination (org-export-resolve-radio-link link info)))
(when destination
(format "\\fI [%s] \\fP"
- (org-export-solidify-link-text path)))))
+ (org-export-solidify-link-text
+ (org-element-property :value destination))))))
;; Links pointing to a headline: find destination and build
;; appropriate referencing command.
diff --git a/contrib/lisp/ox-koma-letter.el b/contrib/lisp/ox-koma-letter.el
index 2b7e847..a42a3a5 100644
--- a/contrib/lisp/ox-koma-letter.el
+++ b/contrib/lisp/ox-koma-letter.el
@@ -34,14 +34,14 @@
;; On top of buffer keywords supported by `latex' back-end (see
;; `org-latex-options-alist'), this back-end introduces the following
;; keywords:
-;; - "CLOSING" (see `org-koma-letter-closing'),
-;; - "FROM_ADDRESS" (see `org-koma-letter-from-address'),
-;; - "LCO" (see `org-koma-letter-class-option-file'),
-;; - "OPENING" (see `org-koma-letter-opening'),
-;; - "PHONE_NUMBER" (see `org-koma-letter-phone-number'),
-;; - "SIGNATURE" (see `org-koma-letter-signature')
-;; - "PLACE" (see `org-koma-letter-place')
-;; - and "TO_ADDRESS". If unspecified this is set to "\mbox{}".
+;; - CLOSING: see `org-koma-letter-closing',
+;; - FROM_ADDRESS: see `org-koma-letter-from-address',
+;; - LCO: see `org-koma-letter-class-option-file',
+;; - OPENING: see `org-koma-letter-opening',
+;; - PHONE_NUMBER: see `org-koma-letter-phone-number',
+;; - SIGNATURE: see `org-koma-letter-signature',
+;; - PLACE: see `org-koma-letter-place',
+;; - TO_ADDRESS: If unspecified this is set to "\mbox{}".
;;
;; TO_ADDRESS and FROM_ADDRESS can also be specified using heading
;; with the special tags specified in
@@ -67,8 +67,9 @@
;; (see `org-koma-letter-special-tags-after-letter').
;;
;; The following variables works differently from the main LaTeX class
-;; - "AUTHOR": default to user-full-name but may be disabled. (see org-koma-letter-author),
-;; - "EMAIL": same as AUTHOR, (see org-koma-letter-email),
+;; - AUTHOR: Default to user-full-name but may be disabled.
+;; (See also `org-koma-letter-author'),
+;; - EMAIL: Same as AUTHOR. (see also `org-koma-letter-email'),
;;
;; Headlines are in general ignored. However, headlines with special
;; tags can be used for specified contents like postscript (ps),
@@ -111,11 +112,16 @@
;; \[EXTRA]"))
;;
;; Then, in your Org document, be sure to require the proper class
-;; with :
+;; with:
;;
;; #+LATEX_CLASS: my-letter
;;
;; Or by setting `org-koma-letter-default-class'.
+;;
+;; You may have to load (LaTeX) Babel as well, e.g., by adding
+;; it to `org-latex-packages-alist',
+;;
+;; (add-to-list 'org-latex-packages-alist '("AUTO" "babel" nil))
;;; Code:
@@ -230,10 +236,8 @@ English manual of 2012-07-22)."
(string))
:group 'org-export-koma-letter)
-
-
(defcustom org-koma-letter-use-backaddress nil
- "Print return address in small line above to address."
+ "Print return address in line above to address."
:group 'org-export-koma-letter
:type 'boolean)
diff --git a/contrib/lisp/ox-rss.el b/contrib/lisp/ox-rss.el
index 4bdd1be..5fd2afc 100644
--- a/contrib/lisp/ox-rss.el
+++ b/contrib/lisp/ox-rss.el
@@ -240,7 +240,11 @@ communication channel."
(org-time-string-to-time
(or (org-element-property :PUBDATE headline)
(error "Missing PUBDATE property"))))))
- (title (org-element-property :raw-value headline))
+ (title (replace-regexp-in-string
+ org-bracket-link-regexp
+ (lambda (m) (or (match-string 3 m)
+ (match-string 1 m)))
+ (org-element-property :raw-value headline)))
(publink
(or (and hl-perm (concat (or hl-home hl-pdir) hl-perm))
(concat
@@ -319,8 +323,8 @@ as a communication channel."
(ifile (plist-get info :input-file))
(publink
(concat (file-name-as-directory blogurl)
- (file-name-nondirectory
- (file-name-sans-extension ifile))
+ (file-name-nondirectory
+ (file-name-sans-extension ifile))
"." rssext)))
(format
"\n<title>%s</title>
diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el
index cb64136..6d65496 100644
--- a/lisp/ob-exp.el
+++ b/lisp/ob-exp.el
@@ -269,7 +269,9 @@ this template."
(save-excursion (goto-char end)
(line-end-position)))
(insert replacement)
- (if (org-element-property :preserve-indent element)
+ (if (or org-src-preserve-indentation
+ (org-element-property :preserve-indent
+ element))
;; Indent only the code block markers.
(save-excursion (skip-chars-backward " \r\t\n")
(indent-line-to ind)
diff --git a/lisp/ob-gnuplot.el b/lisp/ob-gnuplot.el
index 8767e88..ffe5dcf 100644
--- a/lisp/ob-gnuplot.el
+++ b/lisp/ob-gnuplot.el
@@ -85,10 +85,15 @@ code."
(lambda (pair)
(cons
(car pair) ;; variable name
- (if (listp (cdr pair)) ;; variable value
- (org-babel-gnuplot-table-to-data
- (cdr pair) (org-babel-temp-file "gnuplot-") params)
- (cdr pair))))
+ (let* ((val (cdr pair)) ;; variable value
+ (lp (listp val)))
+ (if lp
+ (org-babel-gnuplot-table-to-data
+ (let* ((first (car val))
+ (tablep (or (listp first) (symbolp first))))
+ (if tablep val (mapcar 'list val)))
+ (org-babel-temp-file "gnuplot-") params)
+ val))))
(mapcar #'cdr (org-babel-get-header params :var)))))
(defun org-babel-expand-body:gnuplot (body params)
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index a98ccba..e2a0629 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -650,7 +650,7 @@ of custom agenda commands."
:group 'org-agenda)
(defgroup org-agenda-search-view nil
"Options concerning the general tags/property/todo match agenda view."
- :tag "Org Agenda Match View"
+ :tag "Org Agenda Search View"
:group 'org-agenda)
(defvar org-agenda-archives-mode nil
@@ -2144,6 +2144,7 @@ The following commands are available:
;; Keep global-font-lock-mode from turning on font-lock-mode
(org-set-local 'font-lock-global-modes (list 'not major-mode))
(setq mode-name "Org-Agenda")
+ (setq indent-tabs-mode nil)
(use-local-map org-agenda-mode-map)
(easy-menu-add org-agenda-menu)
(if org-startup-truncated (setq truncate-lines t))
@@ -3745,12 +3746,21 @@ generating a new one."
(delete-dups
(mapcar 'downcase (org-get-tags-at))))))))))
(run-hooks 'org-agenda-finalize-hook)
- (when (or org-agenda-tag-filter (get 'org-agenda-tag-filter :preset-filter))
+ (when org-agenda-tag-filter
(org-agenda-filter-apply org-agenda-tag-filter 'tag))
- (when (or org-agenda-category-filter (get 'org-agenda-category-filter :preset-filter))
+ (when (get 'org-agenda-tag-filter :preset-filter)
+ (org-agenda-filter-apply
+ (get 'org-agenda-tag-filter :preset-filter) 'tag))
+ (when org-agenda-category-filter
(org-agenda-filter-apply org-agenda-category-filter 'category))
- (when (or org-agenda-regexp-filter (get 'org-agenda-regexp-filter :preset-filter))
+ (when (get 'org-agenda-category-filter :preset-filter)
+ (org-agenda-filter-apply
+ (get 'org-agenda-category-filter :preset-filter) 'category))
+ (when org-agenda-regexp-filter
(org-agenda-filter-apply org-agenda-regexp-filter 'regexp))
+ (when (get 'org-agenda-regexp-filter :preset-filter)
+ (org-agenda-filter-apply
+ (get 'org-agenda-regexp-filter :preset-filter) 'regexp))
(org-add-hook 'kill-buffer-hook 'org-agenda-reset-markers 'append 'local)))))
(defun org-agenda-mark-clocking-task ()
@@ -3851,11 +3861,12 @@ dimming them."
e (point-at-eol)
ov (make-overlay b e))
(if invis1
- (overlay-put ov 'invisible t)
+ (progn (overlay-put ov 'invisible t)
+ (overlay-put ov 'intangible t))
(overlay-put ov 'face 'org-agenda-dimmed-todo-face))
(overlay-put ov 'org-type 'org-blocked-todo))))))
- (when (org-called-interactively-p 'interactive)
- (message "Dim or hide blocked tasks...done")))
+ (when (org-called-interactively-p 'interactive)
+ (message "Dim or hide blocked tasks...done")))
(defvar org-agenda-skip-function nil
"Function to be called at each match during agenda construction.
@@ -4917,7 +4928,7 @@ See `org-agenda-skip-if' for details."
(org-agenda-skip-if nil conditions))
(defun org-agenda-skip-subtree-if (&rest conditions)
- "Skip entry if any of CONDITIONS is true.
+ "Skip subtree if any of CONDITIONS is true.
See `org-agenda-skip-if' for details."
(org-agenda-skip-if t conditions))
@@ -5086,6 +5097,7 @@ of what a project is and how to check if it stuck, customize the variable
(mapconcat 'identity re-list "\\|")
(error "No information how to identify unstuck projects")))
(org-tags-view nil matcher)
+ (setq org-agenda-buffer-name (buffer-name))
(with-current-buffer org-agenda-buffer-name
(setq org-agenda-redo-command
`(org-agenda-list-stuck-projects ,current-prefix-arg)))))
@@ -5453,7 +5465,7 @@ This function is invoked if `org-agenda-todo-ignore-deadlines',
;;;###autoload
(defun org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item
- (&optional end)
+ (&optional end)
"Do we have a reason to ignore this TODO entry because it has a time stamp?"
(when (or org-agenda-todo-ignore-with-date
org-agenda-todo-ignore-scheduled
@@ -5690,10 +5702,10 @@ This function is invoked if `org-agenda-todo-ignore-deadlines',
(setq txt "SEXP entry returned empty string"))
(setq txt (org-agenda-format-item extra txt level category tags 'time))
(org-add-props txt props 'org-marker marker
- 'org-category category 'date date 'todo-state todo-state
- 'org-category-position category-pos 'tags tags
- 'level level
- 'type "sexp" 'warntime warntime)
+ 'org-category category 'date date 'todo-state todo-state
+ 'org-category-position category-pos 'tags tags
+ 'level level
+ 'type "sexp" 'warntime warntime)
(push txt ee)))))
(nreverse ee)))
@@ -6244,6 +6256,7 @@ an hour specification like [h]h:mm."
category-pos (get-text-property (point) 'org-category-position))
(if (and (eq org-agenda-skip-scheduled-if-deadline-is-shown
'repeated-after-deadline)
+ (org-get-deadline-time (point))
(<= 0 (- d2 (time-to-days (org-get-deadline-time (point))))))
(throw :skip nil))
(if (not (re-search-backward "^\\*+[ \t]+" nil t))
@@ -7370,7 +7383,7 @@ With two prefix arguments, remove the regexp filters."
(read-from-minibuffer
(if (equal strip '(4))
"Filter out entries matching regexp: "
- "Narrow to entries matching regexp: ")))))
+ "Narrow to entries matching regexp: ")))))
(push flt org-agenda-regexp-filter)
(org-agenda-filter-apply org-agenda-regexp-filter 'regexp))
(org-agenda-filter-show-all-re)
@@ -7645,7 +7658,7 @@ When NO-OPERATOR is non-nil, do not add the + operator to returned tags."
(let* ((pos (org-get-at-bol 'org-hd-marker))
(tophl (and pos (org-find-top-headline pos))))
(if (and tophl (funcall (if negative 'identity 'not)
- (string= hl tophl)))
+ (string= hl tophl)))
(org-agenda-filter-hide-line 'category)))
(beginning-of-line 2)))
(if (get-char-property (point) 'invisible)
@@ -7655,10 +7668,11 @@ When NO-OPERATOR is non-nil, do not add the + operator to returned tags."
(defun org-agenda-filter-hide-line (type)
"Hide lines with TYPE in the agenda buffer."
- (let (ov)
- (setq ov (make-overlay (max (point-min) (1- (point-at-bol)))
- (point-at-eol)))
+ (let* ((b (max (point-min) (1- (point-at-bol))))
+ (e (point-at-eol))
+ (ov (make-overlay b e)))
(overlay-put ov 'invisible t)
+ (overlay-put ov 'intangible t)
(overlay-put ov 'type type)
(cond ((eq type 'tag) (push ov org-agenda-tag-filter-overlays))
((eq type 'category) (push ov org-agenda-cat-filter-overlays))
@@ -8273,7 +8287,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 nil nil t))
+ (org-move-to-column col))
(org-agenda-do-context-action))
(defun org-agenda-previous-item (n)
@@ -8285,7 +8299,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 nil nil t)))
+ (org-move-to-column col)))
(org-agenda-do-context-action))
(defun org-agenda-do-context-action ()
@@ -8482,7 +8496,8 @@ It also looks at the text of the entry itself."
(org-get-at-bol 'org-marker)))
(buffer (and marker (marker-buffer marker)))
(prefix (buffer-substring (point-at-bol) (point-at-eol)))
- (lkall (org-offer-links-in-entry buffer marker arg prefix))
+ (lkall (and buffer (org-offer-links-in-entry
+ buffer marker arg prefix)))
(lk0 (car lkall))
(lk (if (stringp lk0) (list lk0) lk0))
(lkend (cdr lkall))
@@ -8789,13 +8804,13 @@ the same tree node, and the headline of the tree node in the Org-mode file."
(org-back-to-heading)
(move-marker org-last-heading-marker (point))))
(beginning-of-line 1)
- (save-excursion
+ (save-window-excursion
(org-agenda-change-all-lines newhead hdmarker 'fixface just-one))
(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))))
+ (org-move-to-column col))))
(defun org-agenda-add-note (&optional arg)
"Add a time-stamped note to the entry at point."
@@ -8951,7 +8966,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)
- (org-move-to-column col nil nil t)))))
+ (org-move-to-column col)))))
;; FIXME: should fix the tags property of the agenda line.
(defun org-agenda-set-tags (&optional tag onoff)
@@ -9160,7 +9175,9 @@ Called with a universal prefix arg, show the priority instead of setting it."
(goto-char (point-max))
(while (not (bobp))
(when (equal marker (org-get-at-bol 'org-marker))
- (org-move-to-column (- (window-width) (length stamp)) t nil t)
+ (remove-text-properties (point-at-bol) (point-at-eol) '(display))
+ (org-move-to-column (- (window-width) (length stamp)) t)
+
(org-agenda-fix-tags-filter-overlays-at (point))
(if (featurep 'xemacs)
;; Use `duplicable' property to trigger undo recording
@@ -9171,7 +9188,7 @@ Called with a universal prefix arg, show the priority instead of setting it."
ex (list 'invisible t 'end-glyph gl 'duplicable t))
(insert-extent ex (1- (point)) (point-at-eol)))
(add-text-properties
- (1- (point)) (point-at-eol)
+ (1- (point)) (point-at-eol)
(list 'display (org-add-props stamp nil
'face 'secondary-selection))))
(beginning-of-line 1))
@@ -9262,7 +9279,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 nil nil t))))
+ (org-move-to-column col))))
(defun org-agenda-clock-out ()
"Stop the currently running clock."
@@ -9282,7 +9299,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 nil nil t)
+ (org-move-to-column col)
(org-agenda-unmark-clocking-task)))
(defun org-agenda-clock-cancel (&optional arg)
diff --git a/lisp/org-bibtex.el b/lisp/org-bibtex.el
index b4e6977..b655710 100644
--- a/lisp/org-bibtex.el
+++ b/lisp/org-bibtex.el
@@ -279,7 +279,7 @@ not be exported."
(defcustom org-bibtex-no-export-tags nil
"List of tag(s) that should not be converted to keywords.
-This variable is relevant only if `org-bibtex-export-tags-as-keywords' is t."
+This variable is relevant only if `org-bibtex-tags-are-keywords' is t."
:group 'org-bibtex
:version "24.1"
:type '(repeat :tag "Tag" (string)))
@@ -371,7 +371,9 @@ This variable is relevant only if `org-bibtex-export-tags-as-keywords' is t."
(bibtex-beginning-of-entry)
(if (re-search-forward "keywords.*=.*{\\(.*\\)}" nil t)
(progn (goto-char (match-end 1)) (insert ", "))
- (bibtex-make-field "keywords" t t))
+ (search-forward ",\n" nil t)
+ (insert " keywords={},\n")
+ (search-backward "}," nil t))
(insert (mapconcat #'identity tags ", ")))
(buffer-string))))))
@@ -534,7 +536,7 @@ With optional argument OPTIONAL, also prompt for optional fields."
;;; Bibtex <-> Org-mode headline translation functions
(defun org-bibtex (&optional filename)
"Export each headline in the current file to a bibtex entry.
-Headlines are exported using `org-bibtex-export-headline'."
+Headlines are exported using `org-bibtex-headline'."
(interactive
(list (read-file-name
"Bibtex file: " nil nil nil
@@ -613,7 +615,8 @@ This uses `bibtex-parse-entry'."
(strip-delim
(lambda (str) ; strip enclosing "..." and {...}
(dolist (pair '((34 . 34) (123 . 125) (123 . 125)))
- (when (and (= (aref str 0) (car pair))
+ (when (and (> (length str) 1)
+ (= (aref str 0) (car pair))
(= (aref str (1- (length str))) (cdr pair)))
(setf str (substring str 1 (1- (length str)))))) str)))
(push (mapcar
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 8eaa313..0433306 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -741,7 +741,8 @@ captured item after finalizing."
(pos (org-capture-get :initial-target-position))
(ipt (org-capture-get :insertion-point))
(size (org-capture-get :captured-entry-size)))
- (when reg
+ (if (not reg)
+ (widen)
(cond ((< ipt (car reg))
;; insertion point is before the narrowed region
(narrow-to-region (+ size (car reg)) (+ size (cdr reg))))
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index fa50f9d..f2a3748 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -1838,9 +1838,9 @@ Use \\[org-clock-remove-overlays] to remove the subtree times."
(when org-remove-highlights-with-change
(org-add-hook 'before-change-functions 'org-clock-remove-overlays
nil 'local))))
- (message (concat "Total file time: "
- (org-minutes-to-clocksum-string org-clock-file-total-minutes)
- " (%d hours and %d minutes)") h m)))
+ (message (concat "Total file time: "
+ (org-minutes-to-clocksum-string org-clock-file-total-minutes)
+ " (%d hours and %d minutes)") h m)))
(defvar org-clock-overlays nil)
(make-variable-buffer-local 'org-clock-overlays)
@@ -1850,16 +1850,17 @@ Use \\[org-clock-remove-overlays] to remove the subtree times."
If LEVEL is given, prefix time with a corresponding number of stars.
This creates a new overlay and stores it in `org-clock-overlays', so that it
will be easy to remove."
- (let* ((c 60) (h (floor (/ time 60))) (m (- time (* 60 h)))
- (l (if level (org-get-valid-level level 0) 0))
- (off 0)
+ (let* ((l (if level (org-get-valid-level level 0) 0))
ov tx)
- (org-move-to-column c)
- (unless (eolp) (skip-chars-backward "^ \t"))
- (skip-chars-backward " \t")
- (setq ov (make-overlay (point-at-bol) (point-at-eol))
- tx (concat (buffer-substring (point-at-bol) (point))
- (make-string (+ off (max 0 (- c (current-column)))) ?.)
+ (beginning-of-line)
+ (when (looking-at org-complex-heading-regexp)
+ (goto-char (match-beginning 4)))
+ (setq ov (make-overlay (point) (point-at-eol))
+ tx (concat (buffer-substring-no-properties (point) (match-end 4))
+ (make-string
+ (max 0 (- (- 60 (current-column))
+ (- (match-end 4) (match-beginning 4))
+ (length (org-get-at-bol 'line-prefix)))) ?.)
(org-add-props (concat (make-string l ?*) " "
(org-minutes-to-clocksum-string time)
(make-string (- 16 l) ?\ ))
@@ -2705,9 +2706,13 @@ TIME: The sum of all time spend in this tree, in minutes. This time
(format "file:%s::%s"
(buffer-file-name)
(save-match-data
- (org-make-org-heading-search-string
- (match-string 2))))
- (match-string 2)))
+ (match-string 2)))
+ (org-make-org-heading-search-string
+ (replace-regexp-in-string
+ org-bracket-link-regexp
+ (lambda (m) (or (match-string 3 m)
+ (match-string 1 m)))
+ (match-string 2)))))
tsp (when timestamp
(setq props (org-entry-properties (point)))
(or (cdr (assoc "SCHEDULED" props))
diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index 9dd0340..07ee69f 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -174,7 +174,7 @@ This is the compiled version of the format.")
(face (list color font 'org-column ref-face))
(face1 (list color font 'org-agenda-column-dateline ref-face))
(cphr (get-text-property (point-at-bol) 'org-complex-heading-regexp))
- pom property ass width f string ov column val modval s2 title calc)
+ pom property ass width f fc string fm ov column val modval s2 title calc)
;; Check if the entry is in another buffer.
(unless props
(if (eq major-mode 'org-agenda-mode)
@@ -204,6 +204,8 @@ This is the compiled version of the format.")
(nth 2 column)
(length property))
f (format "%%-%d.%ds | " width width)
+ fm (nth 4 column)
+ fc (nth 5 column)
calc (nth 7 column)
val (or (cdr ass) "")
modval (cond ((and org-columns-modify-value-for-display-function
@@ -215,13 +217,14 @@ This is the compiled version of the format.")
(org-columns-cleanup-item
val org-columns-current-fmt-compiled
(or org-complex-heading-regexp cphr)))
+ (fc (org-columns-number-to-string
+ (org-columns-string-to-number val fm) fm fc))
((and calc (functionp calc)
(not (string= val ""))
(not (get-text-property 0 'org-computed val)))
(org-columns-number-to-string
(funcall calc (org-columns-string-to-number
- val (nth 4 column)))
- (nth 4 column)))))
+ val fm)) fm))))
(setq s2 (org-columns-add-ellipses (or modval val) width))
(setq string (format f s2))
;; Create the overlay
diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index 1553e4f..70c41d5 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -343,10 +343,25 @@ Works on both Emacs and XEmacs."
(org-xemacs-without-invisibility (indent-line-to column))
(indent-line-to column)))
-(defun org-move-to-column (column &optional force buffer ignore-invisible)
- (let ((buffer-invisibility-spec ignore-invisible))
+(defun org-move-to-column (column &optional force buffer)
+ "Move to column COLUMN.
+Pass COLUMN and FORCE to `move-to-column'.
+Pass BUFFER to the XEmacs version of `move-to-column'."
+ (let* ((with-bracket-link
+ (save-excursion
+ (forward-line 0)
+ (looking-at (concat "^.*" org-bracket-link-regexp))))
+ (buffer-invisibility-spec
+ (cond
+ ((or (not (derived-mode-p 'org-mode))
+ (and with-bracket-link (org-invisible-p2)))
+ (remove '(org-link) buffer-invisibility-spec))
+ (with-bracket-link
+ (remove t buffer-invisibility-spec))
+ (t buffer-invisibility-spec))))
(if (featurep 'xemacs)
- (org-xemacs-without-invisibility (move-to-column column force buffer))
+ (org-xemacs-without-invisibility
+ (move-to-column column force buffer))
(move-to-column column force))))
(defun org-get-x-clipboard-compat (value)
diff --git a/lisp/org-element.el b/lisp/org-element.el
index 77b2bc2..b44466e 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -62,7 +62,7 @@
;; `table-cell', `target', `timestamp', `underline' and `verbatim'.
;;
;; Some elements also have special properties whose value can hold
-;; objects themselves (i.e. an item tag or a headline name). Such
+;; objects themselves (e.g. an item tag or a headline name). Such
;; values are called "secondary strings". Any object belongs to
;; either an element or a secondary string.
;;
@@ -187,10 +187,10 @@ is not sufficient to know if point is at a paragraph ending. See
"List of recursive element types aka Greater Elements.")
(defconst org-element-all-successors
- '(export-snippet footnote-reference inline-babel-call inline-src-block
- latex-or-entity line-break link macro plain-link radio-target
- statistics-cookie sub/superscript table-cell target
- text-markup timestamp)
+ '(link export-snippet footnote-reference inline-babel-call
+ inline-src-block latex-or-entity line-break macro plain-link
+ radio-target statistics-cookie sub/superscript table-cell target
+ text-markup timestamp)
"Complete list of successors.")
(defconst org-element-object-successor-alist
@@ -236,7 +236,7 @@ application to open them.")
'("CAPTION" "DATA" "HEADER" "HEADERS" "LABEL" "NAME" "PLOT" "RESNAME" "RESULT"
"RESULTS" "SOURCE" "SRCNAME" "TBLNAME")
"List of affiliated keywords as strings.
-By default, all keywords setting attributes (i.e. \"ATTR_LATEX\")
+By default, all keywords setting attributes (e.g., \"ATTR_LATEX\")
are affiliated keywords and need not to be in this list.")
(defconst org-element-keyword-translation-alist
@@ -256,7 +256,7 @@ returned as the value of the property.
This list is checked after translations have been applied. See
`org-element-keyword-translation-alist'.
-By default, all keywords setting attributes (i.e. \"ATTR_LATEX\")
+By default, all keywords setting attributes (e.g., \"ATTR_LATEX\")
allow multiple occurrences and need not to be in this list.")
(defconst org-element-parsed-keywords '("CAPTION")
@@ -328,13 +328,13 @@ Don't modify it, set `org-element-affiliated-keywords' instead.")
(paragraph ,@standard-set)
;; Remove any variable object from radio target as it would
;; prevent it from being properly recognized.
- (radio-target latex-or-entity sub/superscript)
+ (radio-target latex-or-entity sub/superscript text-markup)
(strike-through ,@standard-set)
(subscript ,@standard-set)
(superscript ,@standard-set)
;; Ignore inline babel call and inline src block as formulas are
;; possible. Also ignore line breaks and statistics cookies.
- (table-cell export-snippet footnote-reference latex-or-entity link macro
+ (table-cell link export-snippet footnote-reference latex-or-entity macro
radio-target sub/superscript target text-markup timestamp)
(table-row table-cell)
(underline ,@standard-set)
@@ -346,7 +346,8 @@ a list of successors that will be called within an element or
object of such type.
For example, in a `radio-target' object, one can only find
-entities, latex-fragments, subscript and superscript.
+entities, latex-fragments, subscript, superscript and text
+markup.
This alist also applies to secondary string. For example, an
`headline' type element doesn't directly contain objects, but
@@ -739,7 +740,9 @@ containing `:raw-value', `:title', `:alt-title', `:begin',
The plist also contains any property set in the property drawer,
with its name in upper cases and colons added at the
-beginning (i.e. `:CUSTOM_ID').
+beginning (e.g., `:CUSTOM_ID').
+
+LIMIT is a buffer position bounding the search.
When RAW-SECONDARY-P is non-nil, headline's title will not be
parsed as a secondary string, but as a plain string instead.
@@ -797,7 +800,7 @@ Assume point is at beginning of the headline."
(t (setq plist (plist-put plist :closed time))))))
plist))))
(begin (point))
- (end (save-excursion (goto-char (org-end-of-subtree t t))))
+ (end (min (save-excursion (org-end-of-subtree t t)) limit))
(pos-after-head (progn (forward-line) (point)))
(contents-begin (save-excursion
(skip-chars-forward " \r\t\n" end)
@@ -838,10 +841,7 @@ Assume point is at beginning of the headline."
:todo-keyword todo
:todo-type todo-type
:post-blank (count-lines
- (if (not contents-end) pos-after-head
- (goto-char contents-end)
- (forward-line)
- (point))
+ (or contents-end pos-after-head)
end)
:footnote-section-p footnote-section-p
:archivedp archivedp
@@ -922,7 +922,7 @@ containing `:title', `:begin', `:end', `:hiddenp',
The plist also contains any property set in the property drawer,
with its name in upper cases and colons added at the
-beginning (i.e. `:CUSTOM_ID').
+beginning (e.g., `:CUSTOM_ID').
When optional argument RAW-SECONDARY-P is non-nil, inline-task's
title will not be parsed as a secondary string, but as a plain
@@ -972,8 +972,9 @@ Assume point is at beginning of the inline task."
plist))))
(task-end (save-excursion
(end-of-line)
- (and (re-search-forward "^\\*+ END" limit t)
- (match-beginning 0))))
+ (and (re-search-forward org-outline-regexp-bol limit t)
+ (org-looking-at-p "END[ \t]*$")
+ (line-beginning-position))))
(contents-begin (progn (forward-line)
(and task-end (< (point) task-end) (point))))
(hidden (and contents-begin (org-invisible-p2)))
@@ -1224,7 +1225,7 @@ CONTENTS is the contents of the element."
(forward-line)
(let ((origin (point)))
(when (re-search-forward inlinetask-re limit t)
- (if (looking-at "^\\*+ END[ \t]*$") (forward-line)
+ (if (org-looking-at-p "END[ \t]*$") (forward-line)
(goto-char origin)))))
;; At some text line. Check if it ends any previous item.
(t
@@ -2149,8 +2150,8 @@ Assume point is at the beginning of the paragraph."
;; A matching `org-element-paragraph-separate' is not
;; necessarily the end of the paragraph. In
;; particular, lines starting with # or : as a first
- ;; non-space character are ambiguous. We have check
- ;; if they are valid Org syntax (i.e. not an
+ ;; non-space character are ambiguous. We have to
+ ;; check if they are valid Org syntax (e.g., not an
;; incomplete keyword).
(beginning-of-line)
(while (not
@@ -2588,8 +2589,8 @@ CONTENTS is verse block contents."
;;
;; Unlike to elements, interstices can be found between objects.
;; That's why, along with the parser, successor functions are provided
-;; for each object. Some objects share the same successor (i.e. `code'
-;; and `verbatim' objects).
+;; for each object. Some objects share the same successor (e.g.,
+;; `code' and `verbatim' objects).
;;
;; A successor must accept a single argument bounding the search. It
;; will return either a cons cell whose CAR is the object's type, as
@@ -2599,7 +2600,7 @@ CONTENTS is verse block contents."
;; org-element-NAME-successor, where NAME is the name of the
;; successor, as defined in `org-element-all-successors'.
;;
-;; Some object types (i.e. `italic') are recursive. Restrictions on
+;; Some object types (e.g., `italic') are recursive. Restrictions on
;; object types they can contain will be specified in
;; `org-element-object-restrictions'.
;;
@@ -3094,7 +3095,9 @@ Assume point is at the beginning of the link."
((and org-target-link-regexp (looking-at org-target-link-regexp))
(setq type "radio"
link-end (match-end 0)
- path (org-match-string-no-properties 0)))
+ path (org-match-string-no-properties 0)
+ contents-begin (match-beginning 0)
+ contents-end (match-end 0)))
;; Type 2: Standard link, i.e. [[http://orgmode.org][homepage]]
((looking-at org-bracket-link-regexp)
(setq contents-begin (match-beginning 3)
@@ -3127,13 +3130,13 @@ Assume point is at the beginning of the link."
;; headline name or nothing. PATH is the target or
;; headline's name.
(t (setq type "fuzzy" path raw-link))))
- ;; Type 3: Plain link, i.e. http://orgmode.org
+ ;; Type 3: Plain link, e.g., http://orgmode.org
((looking-at org-plain-link-re)
(setq raw-link (org-match-string-no-properties 0)
type (org-match-string-no-properties 1)
link-end (match-end 0)
path (org-match-string-no-properties 2)))
- ;; Type 4: Angular link, i.e. <http://orgmode.org>
+ ;; Type 4: Angular link, e.g., <http://orgmode.org>
((looking-at org-angle-link-re)
(setq raw-link (buffer-substring-no-properties
(match-beginning 1) (match-end 2))
@@ -3144,18 +3147,20 @@ Assume point is at the beginning of the link."
;; LINK-END variable.
(setq post-blank (progn (goto-char link-end) (skip-chars-forward " \t"))
end (point))
- ;; Extract search option and opening application out of
- ;; "file"-type links.
+ ;; Special "file" type link processing.
(when (member type org-element-link-type-is-file)
- ;; Application.
+ ;; Extract opening application and search option.
(cond ((string-match "^file\\+\\(.*\\)$" type)
(setq application (match-string 1 type)))
((not (string-match "^file" type))
(setq application type)))
- ;; Extract search option from PATH.
- (when (string-match "::\\(.*\\)$" path)
+ (when (string-match "::\\(.*\\)\\'" path)
(setq search-option (match-string 1 path)
path (replace-match "" nil nil path)))
+ ;; Normalize URI.
+ (when (and (not (org-string-match-p "\\`//" path))
+ (file-name-absolute-p path))
+ (setq path (concat "//" (expand-file-name path))))
;; Make sure TYPE always reports "file".
(setq type "file"))
(list 'link
@@ -3463,7 +3468,7 @@ CONTENTS is the contents of the object."
Return a list whose CAR is `table-cell' and CDR is a plist
containing `:begin', `:end', `:contents-begin', `:contents-end'
and `:post-blank' keywords."
- (looking-at "[ \t]*\\(.*?\\)[ \t]*|")
+ (looking-at "[ \t]*\\(.*?\\)[ \t]*\\(?:|\\|$\\)")
(let* ((begin (match-beginning 0))
(end (match-end 0))
(contents-begin (match-beginning 1))
@@ -3485,7 +3490,7 @@ CONTENTS is the contents of the cell, or nil."
Return value is a cons cell whose CAR is `table-cell' and CDR is
beginning position."
- (when (looking-at "[ \t]*.*?[ \t]*|") (cons 'table-cell (point))))
+ (when (looking-at "[ \t]*.*?[ \t]*\\(|\\|$\\)") (cons 'table-cell (point))))
;;;; Target
@@ -3809,8 +3814,8 @@ CONTENTS is nil."
;; point.
;;
;; `org-element--current-element' makes use of special modes. They
-;; are activated for fixed element chaining (i.e. `plain-list' >
-;; `item') or fixed conditional element chaining (i.e. `headline' >
+;; are activated for fixed element chaining (e.g., `plain-list' >
+;; `item') or fixed conditional element chaining (e.g., `headline' >
;; `section'). Special modes are: `first-section', `item',
;; `node-property', `quote-section', `section' and `table-row'.
@@ -3954,7 +3959,7 @@ CDR a plist of keywords and values and move point to the
beginning of the first line after them.
As a special case, if element doesn't start at the beginning of
-the line (i.e. a paragraph starting an item), CAR is current
+the line (e.g., a paragraph starting an item), CAR is current
position of point and CDR is nil."
(if (not (bolp)) (list (point))
(let ((case-fold-search t)
@@ -4489,8 +4494,8 @@ Return Org syntax as a string."
(mapconcat
(lambda (obj) (org-element-interpret-data obj parent))
(org-element-contents data) ""))
- ;; Plain text: remove `:parent' text property from output.
- ((stringp data) (org-no-properties data))
+ ;; Plain text: return it.
+ ((stringp data) data)
;; Element/Object without contents.
((not (org-element-contents data))
(funcall (intern (format "org-element-%s-interpreter" type))
@@ -4609,71 +4614,65 @@ indentation to compute maximal common indentation.
Return the normalized element that is element with global
indentation removed from its contents. The function assumes that
indentation is not done with TAB characters."
- (let* (ind-list ; for byte-compiler
- collect-inds ; for byte-compiler
- (collect-inds
+ (let* ((min-ind most-positive-fixnum)
+ find-min-ind ; For byte-compiler.
+ (find-min-ind
(function
- ;; Return list of indentations within BLOB. This is done by
- ;; walking recursively BLOB and updating IND-LIST along the
- ;; way. FIRST-FLAG is non-nil when the first string hasn't
- ;; been seen yet. It is required as this string is the only
- ;; one whose indentation doesn't happen after a newline
- ;; character.
+ ;; Return minimal common indentation within BLOB. This is
+ ;; done by walking recursively BLOB and updating MIN-IND
+ ;; along the way. FIRST-FLAG is non-nil when the first
+ ;; string hasn't been seen yet. It is required as this
+ ;; string is the only one whose indentation doesn't happen
+ ;; after a newline character.
(lambda (blob first-flag)
- (mapc
- (lambda (object)
- (when (and first-flag (stringp object))
- (setq first-flag nil)
- (string-match "\\`\\( *\\)" object)
- (let ((len (length (match-string 1 object))))
- ;; An indentation of zero means no string will be
- ;; modified. Quit the process.
- (if (zerop len) (throw 'zero (setq ind-list nil))
- (push len ind-list))))
- (cond
- ((stringp object)
- (let ((start 0))
- ;; Avoid matching blank or empty lines.
- (while (and (string-match "\n\\( *\\)\\(.\\)" object start)
- (not (equal (match-string 2 object) " ")))
- (setq start (match-end 0))
- (push (length (match-string 1 object)) ind-list))))
- ((memq (org-element-type object) org-element-recursive-objects)
- (funcall collect-inds object first-flag))))
- (org-element-contents blob))))))
- ;; Collect indentation list in ELEMENT. Possibly remove first
- ;; value if IGNORE-FIRST is non-nil.
- (catch 'zero (funcall collect-inds element (not ignore-first)))
- (if (not ind-list) element
+ (dolist (object (org-element-contents blob))
+ (when (and first-flag (stringp object))
+ (setq first-flag nil)
+ (string-match "\\`\\( *\\)" object)
+ (let ((len (length (match-string 1 object))))
+ ;; An indentation of zero means no string will be
+ ;; modified. Quit the process.
+ (if (zerop len) (throw 'zero (setq min-ind 0))
+ (setq min-ind (min len min-ind)))))
+ (cond
+ ((stringp object)
+ (dolist (line (delq "" (cdr (org-split-string object " *\n"))))
+ (setq min-ind (min (org-get-indentation line) min-ind))))
+ ((memq (org-element-type object) org-element-recursive-objects)
+ (funcall find-min-ind object first-flag))))))))
+ ;; Find minimal indentation in ELEMENT.
+ (catch 'zero (funcall find-min-ind element (not ignore-first)))
+ (if (or (zerop min-ind) (= min-ind most-positive-fixnum)) element
;; Build ELEMENT back, replacing each string with the same
;; string minus common indentation.
(let* (build ; For byte compiler.
(build
(function
- (lambda (blob mci first-flag)
+ (lambda (blob first-flag)
;; Return BLOB with all its strings indentation
- ;; shortened from MCI white spaces. FIRST-FLAG is
- ;; non-nil when the first string hasn't been seen
+ ;; shortened from MIN-IND white spaces. FIRST-FLAG
+ ;; is non-nil when the first string hasn't been seen
;; yet.
(setcdr (cdr blob)
(mapcar
- (lambda (object)
- (when (and first-flag (stringp object))
- (setq first-flag nil)
- (setq object
- (replace-regexp-in-string
- (format "\\` \\{%d\\}" mci) "" object)))
- (cond
- ((stringp object)
- (replace-regexp-in-string
- (format "\n \\{%d\\}" mci) "\n" object))
- ((memq (org-element-type object)
- org-element-recursive-objects)
- (funcall build object mci first-flag))
- (t object)))
+ #'(lambda (object)
+ (when (and first-flag (stringp object))
+ (setq first-flag nil)
+ (setq object
+ (replace-regexp-in-string
+ (format "\\` \\{%d\\}" min-ind)
+ "" object)))
+ (cond
+ ((stringp object)
+ (replace-regexp-in-string
+ (format "\n \\{%d\\}" min-ind) "\n" object))
+ ((memq (org-element-type object)
+ org-element-recursive-objects)
+ (funcall build object first-flag))
+ (t object)))
(org-element-contents blob)))
blob))))
- (funcall build element (apply 'min ind-list) (not ignore-first))))))
+ (funcall build element (not ignore-first))))))
@@ -4873,8 +4872,8 @@ Providing it allows for quicker computation."
;; their title.
((memq type '(headline inlinetask))
(goto-char (org-element-property :begin element))
- (skip-chars-forward "* ")
- (if (and (>= origin (point)) (< origin (line-end-position)))
+ (skip-chars-forward "*")
+ (if (and (> origin (point)) (< origin (line-end-position)))
(narrow-to-region (point) (line-end-position))
(throw 'objects-forbidden element)))
;; At a paragraph, a table-row or a verse block, objects are
@@ -4896,6 +4895,16 @@ Providing it allows for quicker computation."
(if (and (>= origin (point)) (< origin (line-end-position)))
(narrow-to-region (point) (line-end-position))
(throw 'objects-forbidden element))))
+ ;; At a planning line, if point is at a timestamp, return it,
+ ;; otherwise, return element.
+ ((eq type 'planning)
+ (dolist (p '(:closed :deadline :scheduled))
+ (let ((timestamp (org-element-property p element)))
+ (when (and timestamp
+ (<= (org-element-property :begin timestamp) origin)
+ (> (org-element-property :end timestamp) origin))
+ (throw 'objects-forbidden timestamp))))
+ (throw 'objects-forbidden element))
(t (throw 'objects-forbidden element)))
(goto-char (point-min))
(let ((restriction (org-element-restriction type))
diff --git a/lisp/org-loaddefs.el b/lisp/org-loaddefs.el
index 55b9f19..686f521 100644
--- a/lisp/org-loaddefs.el
+++ b/lisp/org-loaddefs.el
@@ -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"
-;;;;;; (21226 15226))
+;;;;;; (21333 63965))
;;; Generated autoloads from org-agenda.el
(autoload 'org-toggle-sticky-agenda "org-agenda" "\
@@ -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" (21225
-;;;;;; 60662))
+;;;;;; org-capture-string) "org-capture" "org-capture.el" (21333
+;;;;;; 63965))
;;; 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"
-;;;;;; "fc9903a6fff012d8cdd5dfdb5692991f")
+;;;;;; "6ae449662a35e619f6e6a13fa193d5dd")
;;; 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" (21225 60662))
+;;;;;; "org-colview" "org-colview.el" (21333 63965))
;;; 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"
-;;;;;; (21216 45694))
+;;;;;; (21298 24953))
;;; Generated autoloads from org-compat.el
(autoload 'org-check-version "org-compat" "\
@@ -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" "ff99ee3c64be379f1fdf2de70654324f")
+;;;;;; "org-element" "org-element.el" "53f83fecf41bc921d8a3d1aef25bb7c1")
;;; Generated autoloads from org-element.el
(autoload 'org-element-interpret-data "org-element" "\
@@ -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" "f021759499e97376e9c71d7372427c93")
+;;;;;; org-timer org-timer-start) "org-timer" "org-timer.el" "9bf9eb90ff82bc8da92125dbc7ae1b48")
;;; 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"
-;;;;;; (21226 15269))
+;;;;;; (21334 16575))
;;; 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" (21226 15226))
+;;;;;; "org" "org.el" (21334 16446))
;;; 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" "68a1fb86bb07f90e06ab546dd24bd835")
+;;;;;; "ox-ascii" "ox-ascii.el" "bbf90b3e0b7c93443be4a26d450175c7")
;;; 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" "d1b62baed3d34b8ad2a51b57520a420f")
+;;;;;; org-beamer-mode) "ox-beamer" "ox-beamer.el" "a3f8823ff160fc8f658d6c2d54537799")
;;; 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" "8e68dfcd2eb63e7e8b5b6ad20c3e4687")
+;;;;;; "ox-html" "ox-html.el" "715aa6cb7b7281e60f345059292288cd")
;;; Generated autoloads from ox-html.el
(put 'org-html-head-include-default-style 'safe-local-variable 'booleanp)
@@ -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" "cdc9d68aa89323c22f9fa2539f61dab3")
+;;;;;; org-latex-export-as-latex) "ox-latex" "ox-latex.el" "103a0d4c998e0e3e10e96fb60c272269")
;;; 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" "f5b7b56462757fe732d8aa9aba4b42c8")
+;;;;;; org-md-export-as-markdown) "ox-md" "ox-md.el" "c8ecd54d0044f42385f5d9c867c35b9a")
;;; 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" "e5f20e1b24d219133d2cdd1eaf08b406")
+;;;;;; org-odt-export-as-odf) "ox-odt" "ox-odt.el" "4bf1573f61a2d77ff60afa5a3a44dbcc")
;;; Generated autoloads from ox-odt.el
(put 'org-odt-preferred-output-format 'safe-local-variable 'stringp)
@@ -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"
-;;;;;; "267506990e9e65febe17c526136b03e6")
+;;;;;; "3d4fae80fdc7404aab25d5ce512024bc")
;;; 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" "a47dda9a55a9c7dc3c61fbe04bf46e19")
+;;;;;; "ox-texinfo" "ox-texinfo.el" "2b693692963e10fb670fdafe4674f894")
;;; 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" "466b6c2e9e886b6be3dc0db4de098e95")
+;;;;;; org-export-string-as org-export-as) "ox" "ox.el" "0796c3365df1027b70fd024d67785c0d")
;;; Generated autoloads from ox.el
(autoload 'org-export-as "ox" "\
diff --git a/lisp/org-src.el b/lisp/org-src.el
index b8d7c67..f870b2c 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -348,7 +348,7 @@ the display of windows containing the Org buffer and the code buffer."
(condition-case e
(funcall lang-f)
(error
- (error "Language mode `%s' fails with: %S" lang-f (nth 1 e)))))
+ (message "Language mode `%s' fails with: %S" lang-f (nth 1 e)))))
(dolist (pair transmitted-variables)
(org-set-local (car pair) (cadr pair)))
;; Remove protecting commas from visible part of buffer.
@@ -577,14 +577,6 @@ the language, a switch telling if the content should be in a single line."
(pos (point))
re1 re2 single beg end lang lfmt match-re1 ind entry)
(catch 'exit
- (when (org-at-table.el-p)
- (re-search-backward "^[\t]*[^ \t|\\+]" nil t)
- (setq beg (1+ (point-at-eol)))
- (goto-char beg)
- (or (re-search-forward "^[\t]*[^ \t|\\+]" nil t)
- (progn (goto-char (point-max)) (newline)))
- (setq end (1- (point-at-bol)))
- (throw 'exit (list beg end 'table.el nil nil 0)))
(while (setq entry (pop re-list))
(setq re1 (car entry) re2 (nth 1 entry) lang (nth 2 entry)
single (nth 3 entry))
@@ -615,7 +607,15 @@ the language, a switch telling if the content should be in a single line."
(throw 'exit
(list (match-end 0) end
(org-edit-src-get-lang lang)
- single lfmt ind))))))))))))
+ single lfmt ind)))))))))
+ (when (org-at-table.el-p)
+ (re-search-backward "^[\t]*[^ \t|\\+]" nil t)
+ (setq beg (1+ (point-at-eol)))
+ (goto-char beg)
+ (or (re-search-forward "^[\t]*[^ \t|\\+]" nil t)
+ (progn (goto-char (point-max)) (newline)))
+ (setq end (1- (point-at-bol)))
+ (throw 'exit (list beg end 'table.el nil nil 0))))))
(defun org-edit-src-get-lang (lang)
"Extract the src language."
@@ -737,8 +737,8 @@ with \",*\", \",#+\", \",,*\" and \",,#+\"."
(unless (or single preserve-indentation (= total-nindent 0))
(setq indent (make-string total-nindent ?\ ))
(goto-char (point-min))
- (while (re-search-forward "^" nil t)
- (replace-match indent)))
+ (while (re-search-forward "\\(^\\).+" nil t)
+ (replace-match indent nil nil nil 1)))
(if (org-bound-and-true-p org-edit-src-picture)
(setq total-nindent (+ total-nindent 2)))
(setq code (buffer-string))
@@ -753,14 +753,14 @@ with \",*\", \",#+\", \",,*\" and \",,#+\"."
(kill-buffer buffer))
(goto-char beg)
(when allow-write-back-p
- (let ((buffer-undo-list t))
- (delete-region beg (max beg end))
- (unless (string-match "\\`[ \t]*\\'" code)
- (insert code))
- ;; Make sure the overlay stays in place
+ (undo-boundary)
+ (delete-region beg (max beg end))
+ (unless (string-match "\\`[ \t]*\\'" code)
+ (insert code))
+ ;; Make sure the overlay stays in place
(when (eq context 'save) (move-overlay ovl beg (point)))
- (goto-char beg)
- (if single (just-one-space))))
+ (goto-char beg)
+ (if single (just-one-space)))
(if (memq t (mapcar (lambda (overlay)
(eq (overlay-get overlay 'invisible)
'org-hide-block))
diff --git a/lisp/org-timer.el b/lisp/org-timer.el
index 5554027..1a86ffa 100644
--- a/lisp/org-timer.el
+++ b/lisp/org-timer.el
@@ -156,12 +156,14 @@ With prefix arg STOP, stop it entirely."
(org-timer-set-mode-line 'pause)
(message "Timer paused at %s" (org-timer-value-string)))))
+(defvar org-timer-current-timer nil)
(defun org-timer-stop ()
"Stop the relative timer."
(interactive)
(run-hooks 'org-timer-stop-hook)
(setq org-timer-start-time nil
- org-timer-pause-time nil)
+ org-timer-pause-time nil
+ org-timer-current-timer nil)
(org-timer-set-mode-line 'off)
(message "Timer stopped"))
@@ -344,7 +346,6 @@ VALUE can be `on', `off', or `pause'."
(concat " <" (substring (org-timer-value-string) 0 -1) ">"))
(force-mode-line-update)))
-(defvar org-timer-current-timer nil)
(defun org-timer-cancel-timer ()
"Cancel the current timer."
(interactive)
diff --git a/lisp/org-version.el b/lisp/org-version.el
index 62f8747..1e8bb89 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.5h"))
+ (let ((org-release "8.2.6"))
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.5h-dist"))
+ (let ((org-git-version "8.2.6-dist"))
org-git-version))
;;;###autoload
(defvar org-odt-data-dir "/usr/share/emacs/etc/org"
diff --git a/lisp/org.el b/lisp/org.el
index 4827594..2a451ed 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -3874,10 +3874,18 @@ Org mode to function properly:
Therefore you should not modify this variable unless you know
what you are doing. The one reason to change it anyway is that
you might be loading some other package that conflicts with one
-of the default packages. Each cell is of the format
-\( \"options\" \"package\" snippet-flag). If SNIPPET-FLAG is t,
-the package also needs to be included when compiling LaTeX
-snippets into images for inclusion into non-LaTeX output."
+of the default packages. Each element is either a cell or
+a string.
+
+A cell is of the format:
+
+ \( \"options\" \"package\" SNIPPET-FLAG).
+
+If SNIPPET-FLAG is non-nil, the package also needs to be included
+when compiling LaTeX snippets into images for inclusion into
+non-LaTeX output.
+
+A string will be inserted as-is in the header of the document."
:group 'org-latex
:group 'org-export-latex
:set 'org-set-packages-alist
@@ -3895,18 +3903,22 @@ snippets into images for inclusion into non-LaTeX output."
"Alist of packages to be inserted in every LaTeX header.
These will be inserted after `org-latex-default-packages-alist'.
-Each cell is of the format:
+Each element is either a cell or a string.
- \(\"options\" \"package\" snippet-flag)
+A cell is of the format:
-SNIPPET-FLAG, when t, indicates that this package is also needed
-when turning LaTeX snippets into images for inclusion into
+ \(\"options\" \"package\" SNIPPET-FLAG)
+
+SNIPPET-FLAG, when non-nil, indicates that this package is also
+needed when turning LaTeX snippets into images for inclusion into
non-LaTeX output.
+A string will be inserted as-is in the header of the document.
+
Make sure that you only list packages here which:
- - you want in every file
- - do not conflict with the setup in `org-format-latex-header'.
+ - you want in every file;
+ - do not conflict with the setup in `org-format-latex-header';
- do not conflict with the default packages in
`org-latex-default-packages-alist'."
:group 'org-latex
@@ -4120,8 +4132,8 @@ You need to reload Org or to restart Emacs after customizing this.")
`(("*" bold)
("/" italic)
("_" underline)
- ("=" org-code verbatim)
- ("~" org-verbatim verbatim)
+ ("=" org-verbatim verbatim)
+ ("~" org-code verbatim)
("+" ,(if (featurep 'xemacs) 'org-table '(:strike-through t))))
"Alist of characters and faces to emphasize text.
Text starting and ending with a special character will be emphasized,
@@ -5153,11 +5165,11 @@ Support for group tags is controlled by the option
(defun org-file-contents (file &optional noerror)
"Return the contents of FILE, as a string."
- (if (or (not file)
- (not (file-readable-p file)))
- (if noerror
- (message "Cannot read file \"%s\"" file)
- (error "Cannot read file \"%s\"" file))
+ (if (or (not file) (not (file-readable-p file)))
+ (if (not noerror)
+ (error "Cannot read file \"%s\"" file)
+ (message "Cannot read file \"%s\"" file)
+ "")
(with-temp-buffer
(insert-file-contents file)
(buffer-string))))
@@ -5341,6 +5353,8 @@ The following commands are available:
;; Modify a few syntax entries
(modify-syntax-entry ?@ "w")
(modify-syntax-entry ?\" "\"")
+ (modify-syntax-entry ?\\ "_")
+ (modify-syntax-entry ?~ "_")
(if org-startup-truncated (setq truncate-lines t))
(when org-startup-indented (require 'org-indent) (org-indent-mode 1))
(org-set-local 'font-lock-unfontify-region-function
@@ -5364,7 +5378,12 @@ The following commands are available:
(org-setup-comments-handling)
;; Beginning/end of defun
(org-set-local 'beginning-of-defun-function 'org-backward-element)
- (org-set-local 'end-of-defun-function 'org-forward-element)
+ (org-set-local 'end-of-defun-function
+ (lambda ()
+ (if (not (org-at-heading-p))
+ (org-forward-element)
+ (org-forward-element)
+ (forward-char -1))))
;; Next error for sparse trees
(org-set-local 'next-error-function 'org-occur-next-match)
;; Make sure dependence stuff works reliably, even for users who set it
@@ -5431,7 +5450,9 @@ The following commands are available:
(unless org-inhibit-startup-visibility-stuff
(org-set-startup-visibility))))
;; Try to set org-hide correctly
- (set-face-foreground 'org-hide (org-find-invisible-foreground)))
+ (let ((foreground (org-find-invisible-foreground)))
+ (if foreground
+ (set-face-foreground 'org-hide foreground))))
;; Update `customize-package-emacs-version-alist'
(add-to-list 'customize-package-emacs-version-alist
@@ -5577,59 +5598,55 @@ stacked delimiters is N. Escaping delimiters is not possible."
(defun org-make-link-regexps ()
"Update the link regular expressions.
This should be called after the variable `org-link-types' has changed."
- (setq org-link-types-re
- (concat
- "\\`\\(" (mapconcat 'regexp-quote org-link-types "\\|") "\\):")
- org-link-re-with-space
- (concat
- "<?\\(" (mapconcat 'regexp-quote org-link-types "\\|") "\\):"
- "\\([^" org-non-link-chars " ]"
- "[^" org-non-link-chars "]*"
- "[^" org-non-link-chars " ]\\)>?")
- org-link-re-with-space2
- (concat
- "<?\\(" (mapconcat 'regexp-quote org-link-types "\\|") "\\):"
- "\\([^" org-non-link-chars " ]"
- "[^\t\n\r]*"
- "[^" org-non-link-chars " ]\\)>?")
- org-link-re-with-space3
- (concat
- "<?\\(" (mapconcat 'regexp-quote org-link-types "\\|") "\\):"
- "\\([^" org-non-link-chars " ]"
- "[^\t\n\r]*\\)")
- org-angle-link-re
- (concat
- "<\\(" (mapconcat 'regexp-quote org-link-types "\\|") "\\):"
- "\\([^" org-non-link-chars " ]"
- "[^" org-non-link-chars "]*"
- "\\)>")
- org-plain-link-re
- (concat
- "\\<\\(" (mapconcat 'regexp-quote org-link-types "\\|") "\\):"
- (org-re "\\([^ \t\n()<>]+\\(?:([[:word:]0-9_]+)\\|\\([^[:punct:] \t\n]\\|/\\)\\)\\)"))
- ;; "\\([^]\t\n\r<>() ]+[^]\t\n\r<>,.;() ]\\)")
- org-bracket-link-regexp
- "\\[\\[\\([^][]+\\)\\]\\(\\[\\([^][]+\\)\\]\\)?\\]"
- org-bracket-link-analytic-regexp
- (concat
- "\\[\\["
- "\\(\\(" (mapconcat 'regexp-quote org-link-types "\\|") "\\):\\)?"
- "\\([^]]+\\)"
- "\\]"
- "\\(\\[" "\\([^]]+\\)" "\\]\\)?"
- "\\]")
- org-bracket-link-analytic-regexp++
- (concat
- "\\[\\["
- "\\(\\(" (mapconcat 'regexp-quote (cons "coderef" org-link-types) "\\|") "\\):\\)?"
- "\\([^]]+\\)"
- "\\]"
- "\\(\\[" "\\([^]]+\\)" "\\]\\)?"
- "\\]")
- org-any-link-re
- (concat "\\(" org-bracket-link-regexp "\\)\\|\\("
- org-angle-link-re "\\)\\|\\("
- org-plain-link-re "\\)")))
+ (let ((types-re (regexp-opt org-link-types t)))
+ (setq org-link-types-re
+ (concat "\\`" types-re ":")
+ org-link-re-with-space
+ (concat "<?" types-re ":"
+ "\\([^" org-non-link-chars " ]"
+ "[^" org-non-link-chars "]*"
+ "[^" org-non-link-chars " ]\\)>?")
+ org-link-re-with-space2
+ (concat "<?" types-re ":"
+ "\\([^" org-non-link-chars " ]"
+ "[^\t\n\r]*"
+ "[^" org-non-link-chars " ]\\)>?")
+ org-link-re-with-space3
+ (concat "<?" types-re ":"
+ "\\([^" org-non-link-chars " ]"
+ "[^\t\n\r]*\\)")
+ org-angle-link-re
+ (concat "<" types-re ":"
+ "\\([^" org-non-link-chars " ]"
+ "[^" org-non-link-chars "]*"
+ "\\)>")
+ org-plain-link-re
+ (concat
+ "\\<" types-re ":"
+ (org-re "\\([^ \t\n()<>]+\\(?:([[:word:]0-9_]+)\\|\\([^[:punct:] \t\n]\\|/\\)\\)\\)"))
+ ;; "\\([^]\t\n\r<>() ]+[^]\t\n\r<>,.;() ]\\)")
+ org-bracket-link-regexp
+ "\\[\\[\\([^][]+\\)\\]\\(\\[\\([^][]+\\)\\]\\)?\\]"
+ org-bracket-link-analytic-regexp
+ (concat
+ "\\[\\["
+ "\\(" types-re ":\\)?"
+ "\\([^]]+\\)"
+ "\\]"
+ "\\(\\[" "\\([^]]+\\)" "\\]\\)?"
+ "\\]")
+ org-bracket-link-analytic-regexp++
+ (concat
+ "\\[\\["
+ "\\(" (regexp-opt (cons "coderef" org-link-types) t) ":\\)?"
+ "\\([^]]+\\)"
+ "\\]"
+ "\\(\\[" "\\([^]]+\\)" "\\]\\)?"
+ "\\]")
+ org-any-link-re
+ (concat "\\(" org-bracket-link-regexp "\\)\\|\\("
+ org-angle-link-re "\\)\\|\\("
+ org-plain-link-re "\\)"))))
(org-make-link-regexps)
@@ -5668,24 +5685,30 @@ The time stamps may be either active or inactive.")
"Run through the buffer and add overlays to emphasized strings."
(let (rtn a)
(while (and (not rtn) (re-search-forward org-emph-re limit t))
- (if (not (= (char-after (match-beginning 3))
- (char-after (match-beginning 4))))
- (progn
- (setq rtn t)
- (setq a (assoc (match-string 3) org-emphasis-alist))
- (font-lock-prepend-text-property (match-beginning 2) (match-end 2)
- 'face
- (nth 1 a))
- (and (nth 2 a)
- (org-remove-flyspell-overlays-in
- (match-beginning 0) (match-end 0)))
- (add-text-properties (match-beginning 2) (match-end 2)
- '(font-lock-multiline t org-emphasis t))
- (when org-hide-emphasis-markers
- (add-text-properties (match-end 4) (match-beginning 5)
- '(invisible org-link))
- (add-text-properties (match-beginning 3) (match-end 3)
- '(invisible org-link)))))
+ (let* ((border (char-after (match-beginning 3)))
+ (bre (regexp-quote (char-to-string border))))
+ (if (and (not (= border (char-after (match-beginning 4))))
+ (not (save-match-data
+ (string-match (concat bre ".*" bre)
+ (replace-regexp-in-string
+ "\n" " "
+ (substring (match-string 2) 1 -1))))))
+ (progn
+ (setq rtn t)
+ (setq a (assoc (match-string 3) org-emphasis-alist))
+ (font-lock-prepend-text-property (match-beginning 2) (match-end 2)
+ 'face
+ (nth 1 a))
+ (and (nth 2 a)
+ (org-remove-flyspell-overlays-in
+ (match-beginning 0) (match-end 0)))
+ (add-text-properties (match-beginning 2) (match-end 2)
+ '(font-lock-multiline t org-emphasis t))
+ (when org-hide-emphasis-markers
+ (add-text-properties (match-end 4) (match-beginning 5)
+ '(invisible org-link))
+ (add-text-properties (match-beginning 3) (match-end 3)
+ '(invisible org-link))))))
(goto-char (1+ (match-beginning 0))))
rtn))
@@ -6087,7 +6110,7 @@ The regular expression finds the targets also if there is a line break
between words."
(and targets
(concat
- "\\<\\("
+ "\\_<\\("
(mapconcat
(lambda (x)
(setq x (regexp-quote x))
@@ -6096,7 +6119,7 @@ between words."
x)
targets
"\\|")
- "\\)\\>")))
+ "\\)\\_>")))
(defun org-activate-tags (limit)
(if (re-search-forward (org-re "^\\*+.*[ \t]\\(:[[:alnum:]_@#%:]+:\\)[ \r\n]") limit t)
@@ -6580,6 +6603,9 @@ in special contexts.
(show-all)
(org-unlogged-message "Entire buffer visible, including drawers"))
+ ;; Try cdlatex TAB completion
+ ((org-try-cdlatex-tab))
+
;; Table: enter it or move to the next field.
((org-at-table-p 'any)
(if (org-at-table.el-p)
@@ -6616,8 +6642,6 @@ in special contexts.
(or (bolp) (not (eq org-cycle-emulate-tab 'exc-hl-bol))))
(org-inlinetask-toggle-visibility))
- ((org-try-cdlatex-tab))
-
;; At an item/headline: delegate to `org-cycle-internal-local'.
((and (or (and org-cycle-include-plain-lists (org-at-item-p))
(save-excursion (beginning-of-line 1)
@@ -6890,6 +6914,7 @@ results."
"Show all headlines in the buffer, like a table of contents.
With numerical argument N, show content up to level N."
(interactive "P")
+ (org-overview)
(save-excursion
;; Visit all headings and show their offspring
(and (integerp arg) (org-overview))
@@ -7521,27 +7546,37 @@ When NEXT is non-nil, check the next line instead."
(defun org-insert-heading (&optional arg invisible-ok)
"Insert a new heading or item with same depth at point.
-If point is in a plain list and ARG is nil, create a new list item.
-With one universal prefix argument, insert a heading even in lists.
-With two universal prefix arguments, insert the heading at the end
-of the parent subtree.
-If point is at the beginning of a headline, insert a sibling before
-the current headline. If point is not at the beginning, split the line
-and create a new headline with the text in the current line after point
-\(see `org-M-RET-may-split-line' on how to modify this behavior).
+If point is at the beginning of a heading or a list item, insert
+a heading or a list item before it.
+
+If point is at the beginning of a normal line, turn this line
+into a heading.
-If point is at the beginning of a normal line, turn this line into
-a heading.
+If point is in the middle of a headline or a list item, split the
+headline or the item and create a new headline/item with the text
+in the current line after point \(see `org-M-RET-may-split-line'
+on how to modify this behavior).
-When INVISIBLE-OK is set, stop at invisible headlines when going back.
-This is important for non-interactive uses of the command."
+With one universal prefix argument: If point is within a list,
+insert a heading instead of a list item. Otherwise, set the
+value of `org-insert-heading-respect-content' to `t' for the
+duration of the command.
+
+With two universal prefix arguments, insert the heading at the
+end of the grandparent subtree. For example, if point is within
+a 2nd-level heading, then it will insert a 2nd-level heading at
+the end of the 1st-level parent heading.
+
+When INVISIBLE-OK is set, stop at invisible headlines when going
+back. This is important for non-interactive uses of the
+command."
(interactive "P")
(if (org-called-interactively-p 'any) (org-reveal))
(let ((itemp (org-in-item-p))
(may-split (org-get-alist-option org-M-RET-may-split-line 'headline))
(respect-content (or org-insert-heading-respect-content
- (equal arg '(16))))
+ (equal arg '(4))))
(initial-content "")
(adjust-empty-lines t))
@@ -7564,6 +7599,10 @@ This is important for non-interactive uses of the command."
(org-insert-item))
(t
+ ;; Maybe move at the end of the subtree
+ (when (equal arg '(16))
+ (org-up-heading-safe)
+ (org-end-of-subtree t))
;; Insert a heading
(save-restriction
(widen)
@@ -7611,10 +7650,11 @@ This is important for non-interactive uses of the command."
pos hide-previous previous-pos)
;; If we insert after content, move there and clean up whitespace
- (when respect-content
+ (when (and respect-content (not (org-on-heading-p)))
(org-end-of-subtree nil t)
(skip-chars-backward " \r\n")
- (and (looking-at "[ \t]+") (replace-match ""))
+ (and (not (looking-back "^\*+"))
+ (looking-at "[ \t]+") (replace-match ""))
(unless (eobp) (forward-char 1))
(when (looking-at "^\\*")
(unless (bobp) (backward-char 1))
@@ -7758,8 +7798,8 @@ This is a list with the following elements:
(defun org-insert-todo-heading (arg &optional force-heading)
"Insert a new heading with the same level and TODO state as current heading.
If the heading has no TODO state, or if the state is DONE, use the first
-state (TODO by default). Also one prefix arg, force first state. With two
-prefix args, force inserting at the end of the parent subtree."
+state (TODO by default). Also with one prefix arg, force first state. With
+two prefix args, force inserting at the end of the parent subtree."
(interactive "P")
(when (or force-heading (not (org-insert-item 'checkbox)))
(org-insert-heading (or (and (equal arg '(16)) '(16))
@@ -7770,7 +7810,7 @@ prefix args, force inserting at the end of the parent subtree."
(looking-at org-todo-line-regexp))
(let*
((new-mark-x
- (if (or arg
+ (if (or (equal arg '(4))
(not (match-beginning 2))
(member (match-string 2) org-done-keywords))
(car org-todo-keywords-1)
@@ -8614,7 +8654,8 @@ links."
(setq start (point)
end (progn (org-end-of-subtree t t)
(or (bolp) (insert "\n"))
- (org-back-over-empty-lines)
+ (when (>= (org-back-over-empty-lines) 1)
+ (forward-line 1))
(point))
what "children")
(goto-char start)
@@ -9266,7 +9307,7 @@ property to set."
(save-excursion
(org-back-to-heading t)
(put-text-property
- (point-at-bol) (org-end-of-subtree t t) tprop p))))))))
+ (point-at-bol) (or (outline-next-heading) (point-max)) tprop p))))))))
;;;; Link Stuff
@@ -9518,8 +9559,9 @@ active region."
;; Store a link using the ID at point
(setq link (condition-case nil
(prog1 (org-id-store-link)
- (setq desc (plist-get org-store-link-plist
- :description)))
+ (setq desc (or (plist-get org-store-link-plist
+ :description)
+ "")))
(error
;; Probably before first headline, link only to file
(concat "file:"
@@ -9582,7 +9624,7 @@ active region."
(setq link (or link cpltxt)
desc (or desc cpltxt))
(cond ((equal desc "NONE") (setq desc nil))
- ((string-match org-bracket-link-analytic-regexp desc)
+ ((and desc (string-match org-bracket-link-analytic-regexp desc))
(let ((d0 (match-string 3 desc))
(p0 (match-string 5 desc)))
(setq desc
@@ -10259,7 +10301,7 @@ See the docstring of `org-open-file' for details."
This is saved in case the need arises to restore it.")
(defvar org-open-link-marker (make-marker)
- "Marker pointing to the location where `org-open-at-point; was called.")
+ "Marker pointing to the location where `org-open-at-point' was called.")
;;;###autoload
(defun org-open-at-point-global ()
@@ -10339,7 +10381,8 @@ application the system uses for this file type."
(let (type path link line search (pos (point)))
(catch 'match
(save-excursion
- (skip-chars-forward "^]\n\r")
+ (or (org-in-regexp org-plain-link-re)
+ (skip-chars-forward "^]\n\r"))
(when (org-in-regexp org-bracket-link-regexp 1)
(setq link (org-extract-attributes
(org-link-unescape (org-match-string-no-properties 1))))
@@ -10377,9 +10420,10 @@ application the system uses for this file type."
;; Check a plain link is not within a bracket link
(and match
(save-excursion
- (progn
- (goto-char (car match))
- (not (org-in-regexp org-bracket-link-regexp))))))
+ (save-match-data
+ (progn
+ (goto-char (car match))
+ (not (org-in-regexp org-bracket-link-regexp)))))))
(let ((line_ending (save-excursion (end-of-line) (point))))
;; We are in a line before a plain or bracket link
(or (re-search-forward org-plain-link-re line_ending t)
@@ -11502,7 +11546,9 @@ prefix argument (`C-u C-u C-u C-c C-w')."
(interactive "P")
(if (member goto '(0 (64)))
(org-refile-cache-clear)
- (let* ((actionmsg (or msg "Refile"))
+ (let* ((actionmsg (cond (msg msg)
+ ((equal goto 3) "Refile (and keep)")
+ (t "Refile")))
(cbuf (current-buffer))
(regionp (org-region-active-p))
(region-start (and regionp (region-beginning)))
@@ -11537,13 +11583,13 @@ prefix argument (`C-u C-u C-u C-c C-w')."
(setq it (or rfloc
(let (heading-text)
(save-excursion
- (unless goto
+ (unless (and goto (listp goto))
(org-back-to-heading t)
(setq heading-text
(nth 4 (org-heading-components))))
(org-refile-get-location
- (cond (goto "Goto")
+ (cond ((and goto (listp goto)) "Goto")
(regionp (concat actionmsg " region to"))
(t (concat actionmsg " subtree \""
heading-text "\" to")))
@@ -11904,8 +11950,9 @@ blocks in the buffer."
This means to empty the block, parse for parameters and then call
the correct writing function."
(interactive)
- (save-window-excursion
- (let* ((pos (point))
+ (save-excursion
+ (let* ((win (selected-window))
+ (pos (point))
(line (org-current-line))
(params (org-prepare-dblock))
(name (plist-get params :name))
@@ -11918,6 +11965,7 @@ the correct writing function."
(when (and indent (> indent 0))
(setq indent (make-string indent ?\ ))
(save-excursion
+ (select-window win)
(org-beginning-of-dblock)
(forward-line 1)
(while (not (looking-at org-dblock-end-re))
@@ -13443,49 +13491,44 @@ a Show deadlines and scheduled items after a date.
d Show deadlines due within `org-deadline-warning-days'.
D Show deadlines and scheduled items between a date range."
(interactive "P")
- (let (ans kwd value ts-type)
- (setq type (or type org-sparse-tree-default-date-type))
- (setq org-ts-type type)
- (message "Sparse tree: [/]regexp [t]odo [T]odo-kwd [m]atch [p]roperty\n [d]eadlines [b]efore-date [a]fter-date [D]ates range\n [c]ycle through date types: %s"
- (cond ((eq type 'all) "all timestamps")
- ((eq type 'scheduled) "only scheduled")
- ((eq type 'deadline) "only deadline")
- ((eq type 'active) "only active timestamps")
- ((eq type 'inactive) "only inactive timestamps")
- ((eq type 'scheduled-or-deadline) "scheduled/deadline")
- ((eq type 'closed) "with a closed time-stamp")
- (t "scheduled/deadline")))
- (setq ans (read-char-exclusive))
- (cond
- ((equal ans ?c)
- (org-sparse-tree
- arg (cadr (member type '(scheduled-or-deadline
- all scheduled deadline active inactive closed)))))
- ((equal ans ?d)
- (call-interactively 'org-check-deadlines))
- ((equal ans ?b)
- (call-interactively 'org-check-before-date))
- ((equal ans ?a)
- (call-interactively 'org-check-after-date))
- ((equal ans ?D)
- (call-interactively 'org-check-dates-range))
- ((equal ans ?t)
- (call-interactively 'org-show-todo-tree))
- ((equal ans ?T)
- (org-show-todo-tree '(4)))
- ((member ans '(?T ?m))
- (call-interactively 'org-match-sparse-tree))
- ((member ans '(?p ?P))
- (setq kwd (org-icompleting-read "Property: "
- (mapcar 'list (org-buffer-property-keys))))
- (setq value (org-icompleting-read "Value: "
- (mapcar 'list (org-property-values kwd))))
- (unless (string-match "\\`{.*}\\'" value)
- (setq value (concat "\"" value "\"")))
- (org-match-sparse-tree arg (concat kwd "=" value)))
- ((member ans '(?r ?R ?/))
- (call-interactively 'org-occur))
- (t (user-error "No such sparse tree command \"%c\"" ans)))))
+ (setq type (or type org-sparse-tree-default-date-type))
+ (setq org-ts-type type)
+ (message "Sparse tree: [/]regexp [t]odo [T]odo-kwd [m]atch [p]roperty
+ [d]eadlines [b]efore-date [a]fter-date [D]ates range
+ [c]ycle through date types: %s"
+ (case type
+ (all "all timestamps")
+ (scheduled "only scheduled")
+ (deadline "only deadline")
+ (active "only active timestamps")
+ (inactive "only inactive timestamps")
+ (scheduled-or-deadline "scheduled/deadline")
+ (closed "with a closed time-stamp")
+ (otherwise "scheduled/deadline")))
+ (let ((answer (read-char-exclusive)))
+ (case answer
+ (?c
+ (org-sparse-tree
+ arg
+ (cadr (memq type '(scheduled-or-deadline all scheduled deadline active
+ inactive closed)))))
+ (?d (call-interactively #'org-check-deadlines))
+ (?b (call-interactively #'org-check-before-date))
+ (?a (call-interactively #'org-check-after-date))
+ (?D (call-interactively #'org-check-dates-range))
+ (?t (call-interactively #'org-show-todo-tree))
+ (?T (org-show-todo-tree '(4)))
+ (?m (call-interactively #'org-match-sparse-tree))
+ ((?p ?P)
+ (let* ((kwd (org-icompleting-read
+ "Property: " (mapcar #'list (org-buffer-property-keys))))
+ (value (org-icompleting-read
+ "Value: " (mapcar #'list (org-property-values kwd)))))
+ (unless (string-match "\\`{.*}\\'" value)
+ (setq value (concat "\"" value "\"")))
+ (org-match-sparse-tree arg (concat kwd "=" value))))
+ ((?r ?R ?/) (call-interactively #'org-occur))
+ (otherwise (user-error "No such sparse tree command \"%c\"" answer)))))
(defvar org-occur-highlights nil
"List of overlays used for occur matches.")
@@ -14383,6 +14426,7 @@ If ONOFF is `on' or `off', don't toggle but set to this state."
(defun org-align-tags-here (to-col)
;; Assumes that this is a headline
+ "Align tags on the current headline to TO-COL."
(let ((pos (point)) (col (current-column)) ncol tags-l p)
(beginning-of-line 1)
(if (and (looking-at (org-re ".*?\\([ \t]+\\)\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$"))
@@ -14401,7 +14445,7 @@ If ONOFF is `on' or `off', don't toggle but set to this state."
(insert (make-string (- ncol (current-column)) ?\ ))
(setq ncol (current-column))
(when indent-tabs-mode (tabify p (point-at-eol)))
- (org-move-to-column (min ncol col) t nil t))
+ (org-move-to-column (min ncol col)))
(goto-char pos))))
(defun org-set-tags-command (&optional arg just-align)
@@ -14460,9 +14504,7 @@ If DATA is nil or the empty string, any tags will be removed."
(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.
-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."
+When JUST-ALIGN is non-nil, only align tags."
(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)
@@ -14559,7 +14601,7 @@ the column by ignoring invisible text."
(and (not (featurep 'xemacs)) c0 indent-tabs-mode (tabify p0 (point)))
tags)
(t (error "Tags alignment failed")))
- (org-move-to-column col nil nil (not (eq just-align 'ignore-column)))
+ (org-move-to-column col)
(unless just-align
(run-hooks 'org-after-tags-change-hook))))))
@@ -14962,7 +15004,7 @@ a *different* entry, you cannot use these techniques."
((eq match nil) (setq matcher t))
(t (setq matcher (if match (cdr (org-make-tags-matcher match)) t))))
- (save-window-excursion
+ (save-excursion
(save-restriction
(cond ((eq scope 'tree)
(org-back-to-heading t)
@@ -15308,7 +15350,13 @@ when a \"nil\" value can supersede a non-nil value higher up the hierarchy."
(cdr (assoc property (org-entry-properties nil 'special property)))
(org-with-wide-buffer
(let ((range (org-get-property-block)))
- (when (and range (not (eq (car range) (cdr range))))
+ (when (and range (not (eq (car range) (cdr range)))
+ (save-excursion
+ (goto-char (car range))
+ (re-search-forward
+ (concat (org-re-property property) "\\|"
+ (org-re-property (concat property "+")))
+ (cdr range) t)))
(let* ((props
(list (or (assoc property org-file-properties)
(assoc property org-global-properties)
@@ -15440,7 +15488,7 @@ However, if LITERAL-NIL is set, return the string value \"nil\" instead."
(widen)
(catch 'ex
(while t
- (when (setq tmp (org-entry-get nil property nil 'literal-nil))
+ (when (setq tmp (org-entry-get nil property nil literal-nil))
(or (ignore-errors (org-back-to-heading t))
(goto-char (point-min)))
(move-marker org-entry-property-inherited-from (point))
@@ -15797,13 +15845,16 @@ When optional argument DELETE-EMPTY-DRAWER is a string, it defines
an empty drawer to delete."
(interactive
(let* ((completion-ignore-case t)
- (prop (org-icompleting-read "Property: "
- (org-entry-properties nil 'standard))))
+ (cat (org-entry-get (point) "CATEGORY"))
+ (props0 (org-entry-properties nil 'standard))
+ (props (if cat props0
+ (delete `("CATEGORY" . ,(org-get-category)) props0)))
+ (prop (if (< 1 (length props))
+ (org-icompleting-read "Property: " props nil t)
+ (caar props))))
(list prop)))
- (message "Property %s %s" property
- (if (org-entry-delete nil property delete-empty-drawer)
- "deleted"
- "was not present in the entry")))
+ (if (org-entry-delete nil property delete-empty-drawer)
+ (message "Property %s deleted" property)))
(defun org-delete-property-globally (property)
"Remove PROPERTY globally, from all entries."
@@ -18058,7 +18109,7 @@ When a buffer is unmodified, it is just killed. When modified, it is saved
file re pos)
(setq org-tag-alist-for-agenda nil
org-tag-groups-alist-for-agenda nil)
- (save-window-excursion
+ (save-excursion
(save-restriction
(while (setq file (pop files))
(catch 'nextfile
@@ -19424,7 +19475,7 @@ The detailed reaction depends on the user option `org-catch-invisible-edits'."
(if invisible-before-point
(goto-char (previous-single-char-property-change
(point) 'invisible)))
- (org-cycle))
+ (show-subtree))
(cond
((eq org-catch-invisible-edits 'show)
;; That's it, we do the edit after showing
@@ -20232,13 +20283,15 @@ This command does many different things, depending on context:
;; When at a link, act according to the parent instead.
(link (setq context (org-element-property :parent context))
(setq type (org-element-type context)))
- ;; Unsupported object types: check parent element instead.
+ ;; Unsupported object types: refer to the first supported
+ ;; element or object containing it.
((bold code entity export-snippet inline-babel-call inline-src-block
italic latex-fragment line-break macro strike-through subscript
superscript underline verbatim)
(while (and (setq context (org-element-property :parent context))
(not (memq (setq type (org-element-type context))
- '(paragraph verse-block)))))))
+ '(radio-target paragraph verse-block
+ table-cell)))))))
;; For convenience: at the first line of a paragraph on the
;; same line as an item, apply function on that item instead.
(when (eq type 'paragraph)
diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el
index e8f1b1f..6208cdb 100644
--- a/lisp/ox-ascii.el
+++ b/lisp/ox-ascii.el
@@ -750,7 +750,6 @@ generation. INFO is a plist used as a communication channel."
(defun org-ascii--unique-links (element info)
"Return a list of unique link references in ELEMENT.
-
ELEMENT is either a headline element or a section element. INFO
is a plist used as a communication channel."
(let* (seen
@@ -760,8 +759,14 @@ is a plist used as a communication channel."
;; Update SEEN links along the way.
(lambda (link)
(let ((footprint
+ ;; Normalize description in footprints.
(cons (org-element-property :raw-link link)
- (org-element-contents link))))
+ (let ((contents (org-element-contents link)))
+ (and contents
+ (replace-regexp-in-string
+ "[ \r\t\n]+" " "
+ (org-trim
+ (org-element-interpret-data contents))))))))
;; Ignore LINK if it hasn't been translated already.
;; It can happen if it is located in an affiliated
;; keyword that was ignored.
@@ -1387,10 +1392,7 @@ INFO is a plist holding contextual information."
(org-export-resolve-coderef ref info))))
;; Do not apply a special syntax on radio links. Though, use
;; transcoded target's contents as output.
- ((string= type "radio")
- (let ((destination (org-export-resolve-radio-link link info)))
- (when destination
- (org-export-data (org-element-contents destination) info))))
+ ((string= type "radio") desc)
;; Do not apply a special syntax on fuzzy links pointing to
;; targets.
((string= type "fuzzy")
diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el
index 485f098..f3a79d7 100644
--- a/lisp/ox-beamer.el
+++ b/lisp/ox-beamer.el
@@ -644,11 +644,11 @@ contextual information."
(and (eq (org-element-type first-element) 'paragraph)
(org-beamer--element-has-overlay-p first-element))))
(output (org-export-with-backend 'latex item contents info)))
- (if (not action) output
+ (if (or (not action) (not (string-match "\\\\item" output))) output
;; If the item starts with a paragraph and that paragraph starts
;; with an export snippet specifying an overlay, insert it after
;; \item command.
- (replace-regexp-in-string "\\\\item" (concat "\\\\item" action) output))))
+ (replace-match (concat "\\\\item" action) nil nil output))))
;;;; Keyword
@@ -690,8 +690,9 @@ used as a communication channel."
(when destination
(format "\\hyperlink%s{%s}{%s}"
(or (org-beamer--element-has-overlay-p link) "")
- (org-export-solidify-link-text path)
- (org-export-data (org-element-contents destination) info)))))
+ (org-export-solidify-link-text
+ (org-element-property :value destination))
+ contents))))
((and (member type '("custom-id" "fuzzy" "id"))
(let ((destination (if (string= type "fuzzy")
(org-export-resolve-fuzzy-link link info)
@@ -1166,7 +1167,9 @@ Return output file name."
;; working directory and then moved to publishing directory.
(org-publish-attachment
plist
- (org-latex-compile (org-publish-org-to 'beamer filename ".tex" plist))
+ (org-latex-compile
+ (org-publish-org-to
+ 'beamer filename ".tex" plist (file-name-directory filename)))
pub-dir))
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index db8ac69..88e5720 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -170,10 +170,8 @@
"progress" "section" "video")
"New elements in html5.
-<hgroup> is not included because it's currently impossible to
-wrap special blocks around multiple headlines. For other blocks
-that should contain headlines, use the HTML_CONTAINER property on
-the headline itself.")
+For blocks that should contain headlines, use the HTML_CONTAINER
+property on the headline itself.")
(defconst org-html-special-string-regexps
'(("\\\\-" . "&#x00ad;") ; shy
@@ -457,6 +455,7 @@ export back-end currently used."
(not org-html-use-infojs)
(and (eq org-html-use-infojs 'when-configured)
(or (not (plist-get exp-plist :infojs-opt))
+ (string= "" (plist-get exp-plist :infojs-opt))
(string-match "\\<view:nil\\>"
(plist-get exp-plist :infojs-opt)))))
(let* ((template org-html-infojs-template)
@@ -2661,19 +2660,20 @@ INFO is a plist holding contextual information. See
(path
(cond
((member type '("http" "https" "ftp" "mailto"))
- (concat type ":" raw-path))
+ (org-link-escape
+ (org-link-unescape
+ (concat type ":" raw-path)) org-link-escape-chars-browser))
((string= type "file")
;; Treat links to ".org" files as ".html", if needed.
(setq raw-path
(funcall link-org-files-as-html-maybe raw-path info))
;; If file path is absolute, prepend it with protocol
- ;; component - "file://".
- (cond ((file-name-absolute-p raw-path)
- (setq raw-path
- (concat "file://" (expand-file-name
- raw-path))))
- ((and home use-abs-url)
- (setq raw-path (concat (file-name-as-directory home) raw-path))))
+ ;; component - "file:".
+ (cond
+ ((file-name-absolute-p raw-path)
+ (setq raw-path (concat "file:" raw-path)))
+ ((and home use-abs-url)
+ (setq raw-path (concat (file-name-as-directory home) raw-path))))
;; Add search option, if any. A search option can be
;; relative to a custom-id or a headline title. Any other
;; option is ignored.
@@ -2721,9 +2721,9 @@ INFO is a plist holding contextual information. See
(let ((destination (org-export-resolve-radio-link link info)))
(when destination
(format "<a href=\"#%s\"%s>%s</a>"
- (org-export-solidify-link-text path)
- attributes
- (org-export-data (org-element-contents destination) info)))))
+ (org-export-solidify-link-text
+ (org-element-property :value destination))
+ attributes desc))))
;; Links pointing to a headline: Find destination and build
;; appropriate referencing command.
((member type '("custom-id" "fuzzy" "id"))
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 19f055e..53cc54f 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -998,7 +998,9 @@ See `org-latex-text-markup-alist' for details."
;; and use "\\verb" command.
((eq 'verb fmt)
(let ((separator (org-latex--find-verb-separator text)))
- (concat "\\verb" separator text separator)))
+ (concat "\\verb" separator
+ (replace-regexp-in-string "\n" " " text)
+ separator)))
;; Handle the `protectedtexttt' special case: Protect some
;; special chars and use "\texttt{%s}" format string.
((eq 'protectedtexttt fmt)
@@ -1342,7 +1344,16 @@ holding contextual information."
((= (length sec) 4)
(if numberedp (concat (car sec) "\n%s" (nth 1 sec))
(concat (nth 2 sec) "\n%s" (nth 3 sec)))))))
- (text (org-export-data (org-element-property :title headline) info))
+ ;; Create a temporary export back-end that hard-codes
+ ;; "\underline" within "\section" and alike.
+ (section-back-end
+ (org-export-create-backend
+ :parent 'latex
+ :transcoders
+ '((underline . (lambda (o c i) (format "\\underline{%s}" c))))))
+ (text
+ (org-export-data-with-backend
+ (org-element-property :title headline) section-back-end info))
(todo
(and (plist-get info :with-todo-keywords)
(let ((todo (org-element-property :todo-keyword headline)))
@@ -1395,8 +1406,9 @@ holding contextual information."
(let ((opt-title
(funcall org-latex-format-headline-function
todo todo-type priority
- (org-export-data
- (org-export-get-alt-title headline info) info)
+ (org-export-data-with-backend
+ (org-export-get-alt-title headline info)
+ section-back-end info)
(and (eq (plist-get info :with-tags) t) tags))))
(if (and numberedp opt-title
(not (equal opt-title full-text))
@@ -1464,7 +1476,7 @@ contextual information."
(let* ((org-lang (org-element-property :language inline-src-block))
(mint-lang (or (cadr (assq (intern org-lang)
org-latex-minted-langs))
- org-lang))
+ (downcase org-lang)))
(options (org-latex--make-option-string
org-latex-minted-options)))
(concat (format "\\mint%s{%s}"
@@ -1778,7 +1790,8 @@ DESC is the description part of the link, or the empty string.
INFO is a plist holding contextual information. See
`org-export-data'."
(let* ((type (org-element-property :type link))
- (raw-path (org-element-property :path link))
+ (raw-path (replace-regexp-in-string
+ "%" "\\%" (org-element-property :path link) nil t))
;; Ensure DESC really exists, or set it to nil.
(desc (and (not (string= desc "")) desc))
(imagep (org-export-inline-image-p
@@ -1786,9 +1799,8 @@ INFO is a plist holding contextual information. See
(path (cond
((member type '("http" "https" "ftp" "mailto"))
(concat type ":" raw-path))
- ((string= type "file")
- (if (not (file-name-absolute-p raw-path)) raw-path
- (concat "file://" (expand-file-name raw-path))))
+ ((and (string= type "file") (file-name-absolute-p raw-path))
+ (concat "file:" raw-path))
(t raw-path)))
protocol)
(cond
@@ -1800,8 +1812,9 @@ INFO is a plist holding contextual information. See
(let ((destination (org-export-resolve-radio-link link info)))
(when destination
(format "\\hyperref[%s]{%s}"
- (org-export-solidify-link-text path)
- (org-export-data (org-element-contents destination) info)))))
+ (org-export-solidify-link-text
+ (org-element-property :value destination))
+ desc))))
;; Links pointing to a headline: Find destination and build
;; appropriate referencing command.
((member type '("custom-id" "fuzzy" "id"))
@@ -2102,7 +2115,8 @@ contextual information."
("firstnumber" ,(number-to-string (1+ num-start))))
org-latex-minted-options)))
;; Language.
- (or (cadr (assq (intern lang) org-latex-minted-langs)) lang)
+ (or (cadr (assq (intern lang) org-latex-minted-langs))
+ (downcase lang))
;; Source code.
(let* ((code-info (org-export-unravel-code src-block))
(max-width
@@ -2151,8 +2165,8 @@ contextual information."
((and float (not (assoc "float" org-latex-listings-options)))
`(("float" ,org-latex-default-figure-position))))
`(("language" ,lst-lang))
- (when label `(("label" ,label)))
- (when caption-str `(("caption" ,caption-str)))
+ (if label `(("label" ,label)) '(("label" " ")))
+ (if caption-str `(("caption" ,caption-str)) '(("caption" " ")))
(cond ((assoc "numbers" org-latex-listings-options) nil)
((not num-start) '(("numbers" "none")))
((zerop num-start) '(("numbers" "left")))
@@ -2922,7 +2936,9 @@ Return output file name."
;; in working directory and then moved to publishing directory.
(org-publish-attachment
plist
- (org-latex-compile (org-publish-org-to 'latex filename ".tex" plist))
+ (org-latex-compile
+ (org-publish-org-to
+ 'latex filename ".tex" plist (file-name-directory filename)))
pub-dir))
diff --git a/lisp/ox-man.el b/lisp/ox-man.el
index f5653f1..d58c119 100644
--- a/lisp/ox-man.el
+++ b/lisp/ox-man.el
@@ -638,21 +638,15 @@ CONTENTS is nil. INFO is a plist holding contextual information."
DESC is the description part of the link, or the empty string.
INFO is a plist holding contextual information. See
`org-export-data'."
-
(let* ((type (org-element-property :type link))
(raw-path (org-element-property :path link))
;; Ensure DESC really exists, or set it to nil.
(desc (and (not (string= desc "")) desc))
-
(path (cond
((member type '("http" "https" "ftp" "mailto"))
(concat type ":" raw-path))
- ((string= type "file")
- (when (string-match "\\(.+\\)::.+" raw-path)
- (setq raw-path (match-string 1 raw-path)))
- (if (file-name-absolute-p raw-path)
- (concat "file://" (expand-file-name raw-path))
- (concat "file://" raw-path)))
+ ((and (string= type "file") (file-name-absolute-p raw-path))
+ (concat "file:" raw-path))
(t raw-path)))
protocol)
(cond
diff --git a/lisp/ox-md.el b/lisp/ox-md.el
index 2ecafc8..1f841c8 100644
--- a/lisp/ox-md.el
+++ b/lisp/ox-md.el
@@ -157,7 +157,7 @@ channel."
(replace-regexp-in-string
"^" " "
(org-remove-indentation
- (org-element-property :value example-block))))
+ (org-export-format-code-default example-block info))))
;;;; Headline
@@ -271,24 +271,18 @@ channel."
"Transcode LINE-BREAK object into Markdown format.
CONTENTS is the link's description. INFO is a plist used as
a communication channel."
- (let ((--link-org-files-as-html-maybe
+ (let ((link-org-files-as-md
(function
- (lambda (raw-path info)
- ;; Treat links to `file.org' as links to `file.html', if
- ;; needed. See `org-html-link-org-files-as-html'.
- (cond
- ((and org-html-link-org-files-as-html
- (string= ".org"
- (downcase (file-name-extension raw-path "."))))
- (concat (file-name-sans-extension raw-path) "."
- (plist-get info :html-extension)))
- (t raw-path)))))
+ (lambda (raw-path)
+ ;; Treat links to `file.org' as links to `file.md'.
+ (if (string= ".org" (downcase (file-name-extension raw-path ".")))
+ (concat (file-name-sans-extension raw-path) ".md")
+ raw-path))))
(type (org-element-property :type link)))
(cond ((member type '("custom-id" "id"))
(let ((destination (org-export-resolve-id-link link info)))
(if (stringp destination) ; External file.
- (let ((path (funcall --link-org-files-as-html-maybe
- destination info)))
+ (let ((path (funcall link-org-files-as-md destination)))
(if (not contents) (format "<%s>" path)
(format "[%s](%s)" contents path)))
(concat
@@ -302,19 +296,18 @@ a communication channel."
((org-export-inline-image-p link org-html-inline-image-rules)
(let ((path (let ((raw-path (org-element-property :path link)))
(if (not (file-name-absolute-p raw-path)) raw-path
- (expand-file-name raw-path)))))
- (format "![%s](%s)"
- (let ((caption (org-export-get-caption
- (org-export-get-parent-element link))))
- (when caption (org-export-data caption info)))
- path)))
+ (expand-file-name raw-path))))
+ (caption (org-export-data
+ (org-export-get-caption
+ (org-export-get-parent-element link)) info)))
+ (format "![img](%s)"
+ (if (not (org-string-nw-p caption)) path
+ (format "%s \"%s\"" path caption)))))
((string= type "coderef")
(let ((ref (org-element-property :path link)))
(format (org-export-get-coderef-format ref contents)
(org-export-resolve-coderef ref info))))
- ((equal type "radio")
- (let ((destination (org-export-resolve-radio-link link info)))
- (org-export-data (org-element-contents destination) info)))
+ ((equal type "radio") contents)
((equal type "fuzzy")
(let ((destination (org-export-resolve-fuzzy-link link info)))
(if (org-string-nw-p contents) contents
@@ -324,20 +317,17 @@ a communication channel."
(if (atom number) (number-to-string number)
(mapconcat 'number-to-string number "."))))))))
(t (let* ((raw-path (org-element-property :path link))
- (path (cond
- ((member type '("http" "https" "ftp"))
- (concat type ":" raw-path))
- ((equal type "file")
- ;; Treat links to ".org" files as ".html",
- ;; if needed.
- (setq raw-path
- (funcall --link-org-files-as-html-maybe
- raw-path info))
- ;; If file path is absolute, prepend it
- ;; with protocol component - "file://".
- (if (not (file-name-absolute-p raw-path)) raw-path
- (concat "file://" (expand-file-name raw-path))))
- (t raw-path))))
+ (path
+ (cond
+ ((member type '("http" "https" "ftp"))
+ (concat type ":" raw-path))
+ ((string= type "file")
+ (let ((path (funcall link-org-files-as-md raw-path)))
+ (if (not (file-name-absolute-p path)) path
+ ;; If file path is absolute, prepend it
+ ;; with "file:" component.
+ (concat "file:" path))))
+ (t raw-path))))
(if (not contents) (format "<%s>" path)
(format "[%s](%s)" contents path)))))))
diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index 1e966fe..772017c 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -1502,7 +1502,7 @@ original parsed data. INFO is a plist holding export options."
(email (and (plist-get info :with-email) email)))
(concat
;; Title.
- (when title
+ (when (org-string-nw-p title)
(concat
(format "\n<text:p text:style-name=\"%s\">%s</text:p>"
"OrgTitle" (format "\n<text:title>%s</text:title>" title))
@@ -2713,10 +2713,8 @@ INFO is a plist holding contextual information. See
(path (cond
((member type '("http" "https" "ftp" "mailto"))
(concat type ":" raw-path))
- ((string= type "file")
- (if (file-name-absolute-p raw-path)
- (concat "file://" (expand-file-name raw-path))
- (concat "file://" raw-path)))
+ ((and (string= type "file") (file-name-absolute-p raw-path))
+ (concat "file:" raw-path))
(t raw-path)))
;; Convert & to &amp; for correct XML representation
(path (replace-regexp-in-string "&" "&amp;" path))
@@ -2735,11 +2733,11 @@ INFO is a plist holding contextual information. See
((string= type "radio")
(let ((destination (org-export-resolve-radio-link link info)))
(when destination
- (let ((desc (org-export-data (org-element-contents destination) info))
- (href (org-export-solidify-link-text path)))
- (format
- "<text:bookmark-ref text:reference-format=\"text\" text:ref-name=\"OrgXref.%s\">%s</text:bookmark-ref>"
- href desc)))))
+ (format
+ "<text:bookmark-ref text:reference-format=\"text\" text:ref-name=\"OrgXref.%s\">%s</text:bookmark-ref>"
+ (org-export-solidify-link-text
+ (org-element-property :value destination))
+ desc))))
;; Links pointing to a headline: Find destination and build
;; appropriate referencing command.
((member type '("custom-id" "fuzzy" "id"))
diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el
index 55cb646..b38fca9 100644
--- a/lisp/ox-publish.el
+++ b/lisp/ox-publish.el
@@ -808,7 +808,8 @@ Default for SITEMAP-FILENAME is 'sitemap.org'."
(org-mode)
(let ((title
(let ((property (plist-get (org-export-get-environment) :title)))
- (if property (org-element-interpret-data property)
+ (if property
+ (org-no-properties (org-element-interpret-data property))
(file-name-nondirectory (file-name-sans-extension file))))))
(unless visiting (kill-buffer buffer))
(org-publish-cache-set-file-property file :title title)
diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el
index ef881af..a961d7a 100644
--- a/lisp/ox-texinfo.el
+++ b/lisp/ox-texinfo.el
@@ -1222,10 +1222,8 @@ INFO is a plist holding contextual information. See
(path (cond
((member type '("http" "https" "ftp"))
(concat type ":" raw-path))
- ((string= type "file")
- (if (file-name-absolute-p raw-path)
- (concat "file://" (expand-file-name raw-path))
- (concat "file://" raw-path)))
+ ((and (string= type "file") (file-name-absolute-p raw-path))
+ (concat "file:" raw-path))
(t raw-path)))
(email (if (string= type "mailto")
(let ((text (replace-regexp-in-string
diff --git a/lisp/ox.el b/lisp/ox.el
index 9b77874..faa2e05 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -795,7 +795,8 @@ HTML code while every other back-end will ignore it."
:type 'coding-system)
(defcustom org-export-copy-to-kill-ring 'if-interactive
- "Should we push exported content to the kill ring?"
+ "Non-nil means pushing export output to the kill ring.
+This variable is ignored during asynchronous export."
:group 'org-export-general
:version "24.3"
:type '(choice
diff --git a/mk/version.mk b/mk/version.mk
index c3da814..9fe40e7 100644
--- a/mk/version.mk
+++ b/mk/version.mk
@@ -1,2 +1,2 @@
-ORGVERSION ?= 8.2.5h
-GITVERSION ?= 8.2.5h-dist
+ORGVERSION ?= 8.2.6
+GITVERSION ?= 8.2.6-dist
diff --git a/request-assign-future.txt b/request-assign-future.txt
index 8ee7747..f0133bd 100644
--- a/request-assign-future.txt
+++ b/request-assign-future.txt
@@ -8,7 +8,7 @@ REQUEST: SEND FORM FOR PAST AND FUTURE CHANGES
[What is the name of the program or package you're contributing to?]
- Org-mode, which is part of Emacs
+ Emacs
[Did you copy any files or text written by someone else in these changes?
Even if that material is free software, we need to know about it.]