summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2012-05-23 12:13:39 +0200
committerBastien Guerry <bzg@altern.org>2012-05-23 12:13:39 +0200
commit31aa82c998bda91cf8dbbd5f7ec48dd45e0a1db3 (patch)
tree303c183b106fd262e5514f3814977c2ab7d62a21
parentb62b49bc2bd87e0dd0bfbcbb654c0c3da32dcef5 (diff)
parent141d0fd24bbad52065e41ba7692f53710f627e73 (diff)
downloadorg-mode-31aa82c998bda91cf8dbbd5f7ec48dd45e0a1db3.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/ob-plantuml.el3
-rw-r--r--lisp/ob.el15
-rw-r--r--lisp/org.el5
3 files changed, 14 insertions, 9 deletions
diff --git a/lisp/ob-plantuml.el b/lisp/ob-plantuml.el
index 55729eb..7da6893 100644
--- a/lisp/ob-plantuml.el
+++ b/lisp/ob-plantuml.el
@@ -55,9 +55,10 @@ This function is called by `org-babel-execute-src-block'."
(error "plantuml requires a \":file\" header argument")))
(cmdline (cdr (assoc :cmdline params)))
(in-file (org-babel-temp-file "plantuml-"))
+ (java (or (cdr (assoc :java params)) ""))
(cmd (if (not org-plantuml-jar-path)
(error "`org-plantuml-jar-path' is not set")
- (concat "java -jar "
+ (concat "java " java " -jar "
(shell-quote-argument
(expand-file-name org-plantuml-jar-path))
(if (string= (file-name-extension out-file) "svg")
diff --git a/lisp/ob.el b/lisp/ob.el
index 15eefe0..d2d94b8 100644
--- a/lisp/ob.el
+++ b/lisp/ob.el
@@ -2040,11 +2040,16 @@ file's directory then expand relative links."
result)
(if description (concat "[" description "]") ""))))
+(defvar org-babel-capitalize-examplize-region-markers nil
+ "Make true to capitalize begin/end example markers inserted by code blocks.")
+
(defun org-babel-examplize-region (beg end &optional results-switches)
"Comment out region using the inline '==' or ': ' org example quote."
(interactive "*r")
(flet ((chars-between (b e)
- (not (string-match "^[\\s]*$" (buffer-substring b e)))))
+ (not (string-match "^[\\s]*$" (buffer-substring b e))))
+ (maybe-cap (str) (if org-babel-capitalize-examplize-region-markers
+ (upcase str) str)))
(if (or (chars-between (save-excursion (goto-char beg) (point-at-bol)) beg)
(chars-between end (save-excursion (goto-char end) (point-at-eol))))
(save-excursion
@@ -2061,10 +2066,12 @@ file's directory then expand relative links."
(t
(goto-char beg)
(insert (if results-switches
- (format "#+begin_example%s\n" results-switches)
- "#+begin_example\n"))
+ (format "%s%s\n"
+ (maybe-cap "#+begin_example")
+ results-switches)
+ (maybe-cap "#+begin_example\n")))
(if (markerp end) (goto-char end) (forward-char (- end beg)))
- (insert "#+end_example\n"))))))))
+ (insert (maybe-cap "#+end_example\n")))))))))
(defun org-babel-update-block-body (new-body)
"Update the body of the current code block to NEW-BODY."
diff --git a/lisp/org.el b/lisp/org.el
index 05f5375..0b00851 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -12918,10 +12918,7 @@ headlines matching this string."
org-outline-regexp)
" *\\(\\<\\("
(mapconcat 'regexp-quote org-todo-keywords-1 "\\|")
- (org-re
- (if todo-only
- "\\>\\)\\)[ \t]+\\(.*?\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*$"
- "\\>\\)\\)? *\\([^ ].*?\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*$"))))
+ (org-re "\\)\\>\\)? *\\(.*?\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*$")))
(props (list 'face 'default
'done-face 'org-agenda-done
'undone-face 'default