summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2013-11-14 14:09:25 +0100
committerBastien Guerry <bzg@altern.org>2013-11-14 14:09:25 +0100
commit786ebde30317603b43308fc69c1e57c2c06deb2c (patch)
tree0f759ed6bae57e086d35d572ac22f8ce92b5c70f
parent46db5623ae5176e651487f03018fd62030296380 (diff)
parentadcebf38f8ba4f5053757529dd0ef0ecb0b78781 (diff)
downloadorg-mode-786ebde30317603b43308fc69c1e57c2c06deb2c.tar.gz
Merge branch 'maint'
Conflicts: lisp/ox.el
-rw-r--r--lisp/ob-latex.el6
-rw-r--r--lisp/ob-plantuml.el4
-rw-r--r--lisp/ob-python.el10
-rw-r--r--lisp/ob-ruby.el4
-rw-r--r--lisp/org-agenda.el18
-rw-r--r--lisp/org.el36
-rw-r--r--lisp/ox-ascii.el161
-rw-r--r--lisp/ox-html.el22
-rw-r--r--lisp/ox-latex.el24
-rw-r--r--lisp/ox-odt.el35
-rw-r--r--lisp/ox-texinfo.el32
-rw-r--r--lisp/ox.el2
12 files changed, 155 insertions, 199 deletions
diff --git a/lisp/ob-latex.el b/lisp/ob-latex.el
index edc9fe8..85918e6 100644
--- a/lisp/ob-latex.el
+++ b/lisp/ob-latex.el
@@ -50,7 +50,7 @@
'((:results . "latex") (:exports . "results"))
"Default arguments to use when evaluating a LaTeX source block.")
-(defcustom org-babel-latex-htlatex nil
+(defcustom org-babel-latex-htlatex ""
"The htlatex command to enable conversion of latex to SVG or HTML."
:group 'org-babel
:type 'string)
@@ -59,7 +59,7 @@
'("[usenames]{color}" "{tikz}" "{color}" "{listings}" "{amsmath}")
"Packages to use for htlatex export."
:group 'org-babel
- :type '(list string))
+ :type '(list (string)))
(defun org-babel-expand-body:latex (body params)
"Expand BODY according to PARAMS, return the expanded body."
@@ -141,7 +141,7 @@ This function is called by `org-babel-execute-src-block'."
(delete-file transient-pdf-file))))))
((and (or (string-match "\\.svg$" out-file)
(string-match "\\.html$" out-file))
- org-babel-latex-htlatex)
+ (not (string= "" org-babel-latex-htlatex)))
(with-temp-file tex-file
(insert (concat
"\\documentclass[preview]{standalone}
diff --git a/lisp/ob-plantuml.el b/lisp/ob-plantuml.el
index c17d444..f992d04 100644
--- a/lisp/ob-plantuml.el
+++ b/lisp/ob-plantuml.el
@@ -40,7 +40,7 @@
'((:results . "file") (:exports . "results"))
"Default arguments for evaluating a plantuml source block.")
-(defcustom org-plantuml-jar-path nil
+(defcustom org-plantuml-jar-path ""
"Path to the plantuml.jar file."
:group 'org-babel
:version "24.1"
@@ -55,7 +55,7 @@ This function is called by `org-babel-execute-src-block'."
(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)
+ (cmd (if (string= "" org-plantuml-jar-path)
(error "`org-plantuml-jar-path' is not set")
(concat "java " java " -jar "
(shell-quote-argument
diff --git a/lisp/ob-python.el b/lisp/ob-python.el
index b8f8a6d..fc7b9e2 100644
--- a/lisp/ob-python.el
+++ b/lisp/ob-python.el
@@ -47,14 +47,16 @@
:group 'org-babel
:type 'string)
-(defcustom org-babel-python-mode
- (if (or (featurep 'xemacs) (featurep 'python-mode)) 'python-mode 'python)
+(defcustom org-babel-python-mode 'python
"Preferred python mode for use in running python interactively.
This will typically be either 'python or 'python-mode."
:group 'org-babel
:version "24.4"
:package-version '(Org . "8.0")
- :type 'function)
+ :set (lambda (var val)
+ (set-default var (if (or (featurep 'xemacs) (featurep 'python-mode))
+ 'python-mode 'python)))
+ :type 'symbol)
(defvar org-src-preserve-indentation)
@@ -70,7 +72,7 @@ This will typically be either 'python or 'python-mode."
:group 'org-babel
:version "24.4"
:package-version '(Org . "8.0")
- :type 'string)
+ :type 'symbol)
(defun org-babel-execute:python (body params)
"Execute a block of Python code with Babel.
diff --git a/lisp/ob-ruby.el b/lisp/ob-ruby.el
index a3eef64..cee9b0f 100644
--- a/lisp/ob-ruby.el
+++ b/lisp/ob-ruby.el
@@ -62,9 +62,7 @@
:group 'org-babel
:version "24.4"
:package-version '(Org . "8.0")
- :type 'string)
-
-
+ :type 'symbol)
(defun org-babel-execute:ruby (body params)
"Execute a block of Ruby code with Babel.
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index e4bd7fd..027ab7a 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -1419,13 +1419,14 @@ When nil, they may also match part of a word."
:version "24.1"
:type 'boolean)
-(defcustom org-agenda-search-view-max-outline-level nil
+(defcustom org-agenda-search-view-max-outline-level 0
"Maximum outline level to display in search view.
E.g. when this is set to 1, the search view will only
-show headlines of level 1."
+show headlines of level 1. When set to 0, the default
+value, don't limit agenda view by outline level."
:group 'org-agenda-search-view
:version "24.4"
- :package-version '(Org . "8.0")
+ :package-version '(Org . "8.3")
:type 'integer)
(defgroup org-agenda-time-grid nil
@@ -1746,10 +1747,9 @@ to capture the number of days."
:version "24.4"
:package-version '(Org . "8.0")
:type '(list
- (string :tag "Deadline today ")
- (choice :tag "Deadline relative"
- (string :tag "Format string")
- (function))))
+ (string :tag "Deadline today ")
+ (string :tag "Deadline in the future ")
+ (string :tag "Deadline in the past ")))
(defcustom org-agenda-remove-times-when-in-prefix t
"Non-nil means remove duplicate time specifications in agenda items.
@@ -4584,7 +4584,7 @@ in `org-agenda-text-search-extra-files'."
(goto-char (max (point-min) (1- (point))))
(while (re-search-forward regexp nil t)
(org-back-to-heading t)
- (while (and org-agenda-search-view-max-outline-level
+ (while (and (not (zerop org-agenda-search-view-max-outline-level))
(> (org-reduced-level (org-outline-level))
org-agenda-search-view-max-outline-level)
(forward-line -1)
@@ -4594,7 +4594,7 @@ in `org-agenda-text-search-extra-files'."
beg1 (point)
end (progn
(outline-next-heading)
- (while (and org-agenda-search-view-max-outline-level
+ (while (and (not (zerop org-agenda-search-view-max-outline-level))
(> (org-reduced-level (org-outline-level))
org-agenda-search-view-max-outline-level)
(forward-line 1)
diff --git a/lisp/org.el b/lisp/org.el
index b29636a..bd7a593 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -1721,13 +1721,20 @@ In tables, the special behavior of RET has precedence."
:group 'org-link-follow
:type 'boolean)
-(defcustom org-mouse-1-follows-link
- (if (boundp 'mouse-1-click-follows-link) mouse-1-click-follows-link t)
+(defcustom org-mouse-1-follows-link 450
"Non-nil means mouse-1 on a link will follow the link.
A longer mouse click will still set point. Does not work on XEmacs.
Needs to be set before org.el is loaded."
:group 'org-link-follow
- :type 'boolean)
+ :version "24.4"
+ :package-version '(Org . "8.3")
+ :set (lambda (var val)
+ (set-default var (if (boundp 'mouse-1-click-follows-link)
+ mouse-1-click-follows-link t)))
+ :type '(choice
+ (const :tag "A double click follows the link" 'double)
+ (const :tag "Unconditionally follow the link with mouse-1" t)
+ (integer :tag "mouse-1 click does not follow the link if longer than N ms" 450)))
(defcustom org-mark-ring-length 4
"Number of different positions to be recorded in the ring.
@@ -2658,12 +2665,12 @@ agenda log mode depends on the format of these entries."
"Heading when changing todo state (todo sequence only)"
state) string)
(cons (const :tag "Heading when just taking a note" note) string)
- (cons (const :tag "Heading when clocking out" clock-out) string)
- (cons (const :tag "Heading when an item is no longer scheduled" delschedule) string)
(cons (const :tag "Heading when rescheduling" reschedule) string)
+ (cons (const :tag "Heading when an item is no longer scheduled" delschedule) string)
(cons (const :tag "Heading when changing deadline" redeadline) string)
(cons (const :tag "Heading when deleting a deadline" deldeadline) string)
- (cons (const :tag "Heading when refiling" refile) string)))
+ (cons (const :tag "Heading when refiling" refile) string)
+ (cons (const :tag "Heading when clocking out" clock-out) string)))
(unless (assq 'note org-log-note-headings)
(push '(note . "%t") org-log-note-headings))
@@ -8847,13 +8854,13 @@ If WITH-CASE is non-nil, the sorting will be case-sensitive."
;; command. There might be problems if any of the keys is otherwise
;; used as a prefix key.
-(defcustom orgstruct-heading-prefix-regexp nil
+(defcustom orgstruct-heading-prefix-regexp ""
"Regexp that matches the custom prefix of Org headlines in
orgstruct(++)-mode."
:group 'org
:version "24.4"
- :package-version '(Org . "8.0")
- :type 'string)
+ :package-version '(Org . "8.3")
+ :type 'regexp)
;;;###autoload(put 'orgstruct-heading-prefix-regexp 'safe-local-variable 'stringp)
(defcustom orgstruct-setup-hook nil
@@ -9014,8 +9021,8 @@ buffer. It will also recognize item context in multiline items."
"Create a function for binding in the structure minor mode.
FUN is the command to call inside a table. KEY is the key that
should be checked in for a command to execute outside of tables.
-Non-nil DISABLE-WHEN-HEADING-PREFIX means to disable the command
-if `orgstruct-heading-prefix-regexp' is non-nil."
+Non-nil `disable-when-heading-prefix' means to disable the command
+if `orgstruct-heading-prefix-regexp' is not empty."
(let ((name (concat "orgstruct-hijacker-" (symbol-name fun))))
(let ((nname name)
(i 0))
@@ -9041,14 +9048,13 @@ if `orgstruct-heading-prefix-regexp' is non-nil."
(key-description key) "'."
(when disable-when-heading-prefix
(concat
- "\nIf `orgstruct-heading-prefix-regexp' is non-nil, this command will always fall\n"
+ "\nIf `orgstruct-heading-prefix-regexp' is not empty, this command will always fall\n"
"back to the default binding due to limitations of Org's implementation of\n"
"`" (symbol-name fun) "'.")))
(interactive "p")
(let* ((disable
- ,(when disable-when-heading-prefix
- '(and orgstruct-heading-prefix-regexp
- (not (string= orgstruct-heading-prefix-regexp "")))))
+ ,(and disable-when-heading-prefix
+ '(not (string= orgstruct-heading-prefix-regexp ""))))
(fallback
(or disable
(not
diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el
index 136b02c..0ae6f7b 100644
--- a/lisp/ox-ascii.el
+++ b/lisp/ox-ascii.el
@@ -338,7 +338,8 @@ Otherwise, place it right after it."
:package-version '(Org . "8.0")
:type 'string)
-(defcustom org-ascii-format-drawer-function nil
+(defcustom org-ascii-format-drawer-function
+ (lambda (name contents width) contents)
"Function called to format a drawer in ASCII.
The function must accept three parameters:
@@ -349,63 +350,32 @@ The function must accept three parameters:
The function should return either the string to be exported or
nil to ignore the drawer.
-For example, the variable could be set to the following function
-in order to mimic default behaviour:
-
-\(defun org-ascii-format-drawer-default (name contents width)
- \"Format a drawer element for ASCII export.\"
- contents)"
+The default value simply returns the value of CONTENTS."
:group 'org-export-ascii
:version "24.4"
:package-version '(Org . "8.0")
:type 'function)
-(defcustom org-ascii-format-inlinetask-function nil
+(defcustom org-ascii-format-inlinetask-function
+ 'org-ascii-format-inlinetask-default
"Function called to format an inlinetask in ASCII.
-The function must accept six parameters:
- TODO the todo keyword, as a string
- TODO-TYPE the todo type, a symbol among `todo', `done' and nil.
- PRIORITY the inlinetask priority, as a string
- NAME the inlinetask name, as a string.
- TAGS the inlinetask tags, as a list of strings.
- CONTENTS the contents of the inlinetask, as a string.
+The function must accept nine parameters:
+ TODO the todo keyword, as a string
+ TODO-TYPE the todo type, a symbol among `todo', `done' and nil.
+ PRIORITY the inlinetask priority, as a string
+ NAME the inlinetask name, as a string.
+ TAGS the inlinetask tags, as a list of strings.
+ CONTENTS the contents of the inlinetask, as a string.
+ WIDTH the width of the inlinetask, as a number.
+ INLINETASK the inlinetask itself.
+ INFO the info channel.
The function should return either the string to be exported or
-nil to ignore the inline task.
-
-For example, the variable could be set to the following function
-in order to mimic default behaviour:
-
-\(defun org-ascii-format-inlinetask-default
- \(todo type priority name tags contents\)
- \"Format an inline task element for ASCII export.\"
- \(let* \(\(utf8p \(eq \(plist-get info :ascii-charset\) 'utf-8\)\)
- \(width org-ascii-inlinetask-width\)
- \(org-ascii--indent-string
- \(concat
- ;; Top line, with an additional blank line if not in UTF-8.
- \(make-string width \(if utf8p ?━ ?_\)\) \"\\n\"
- \(unless utf8p \(concat \(make-string width ? \) \"\\n\"\)\)
- ;; Add title. Fill it if wider than inlinetask.
- \(let \(\(title \(org-ascii--build-title inlinetask info width\)\)\)
- \(if \(<= \(length title\) width\) title
- \(org-ascii--fill-string title width info\)\)\)
- \"\\n\"
- ;; If CONTENTS is not empty, insert it along with
- ;; a separator.
- \(when \(org-string-nw-p contents\)
- \(concat \(make-string width \(if utf8p ?─ ?-\)\) \"\\n\" contents\)\)
- ;; Bottom line.
- \(make-string width \(if utf8p ?━ ?_\)\)\)
- ;; Flush the inlinetask to the right.
- \(- \(plist-get info :ascii-width\)
- \(plist-get info :ascii-margin\)
- \(plist-get info :ascii-inner-margin\)
- \(org-ascii--current-text-width inlinetask info\)\)"
+nil to ignore the inline task."
:group 'org-export-ascii
:version "24.4"
- :package-version '(Org . "8.0")
+ :package-version '(Org . "8.3")
:type 'function)
@@ -1073,11 +1043,7 @@ CONTENTS holds the contents of the block. INFO is a plist
holding contextual information."
(let ((name (org-element-property :drawer-name drawer))
(width (org-ascii--current-text-width drawer info)))
- (if (functionp org-ascii-format-drawer-function)
- (funcall org-ascii-format-drawer-function name contents width)
- ;; If there's no user defined function: simply
- ;; display contents of the drawer.
- contents)))
+ (funcall org-ascii-format-drawer-function name contents width)))
;;;; Dynamic Block
@@ -1230,55 +1196,58 @@ contextual information."
;;;; Inlinetask
+(defun org-ascii-format-inlinetask-default
+ (todo type priority name tags contents width inlinetask info)
+ "Format an inline task element for ASCII export.
+See `org-ascii-format-inlinetask-function' for a description
+of the paramaters."
+ (let* ((utf8p (eq (plist-get info :ascii-charset) 'utf-8))
+ (width (or width org-ascii-inlinetask-width)))
+ (org-ascii--indent-string
+ (concat
+ ;; Top line, with an additional blank line if not in UTF-8.
+ (make-string width (if utf8p ?━ ?_)) "\n"
+ (unless utf8p (concat (make-string width ? ) "\n"))
+ ;; Add title. Fill it if wider than inlinetask.
+ (let ((title (org-ascii--build-title inlinetask info width)))
+ (if (<= (length title) width) title
+ (org-ascii--fill-string title width info)))
+ "\n"
+ ;; If CONTENTS is not empty, insert it along with
+ ;; a separator.
+ (when (org-string-nw-p contents)
+ (concat (make-string width (if utf8p ?─ ?-)) "\n" contents))
+ ;; Bottom line.
+ (make-string width (if utf8p ?━ ?_)))
+ ;; Flush the inlinetask to the right.
+ (- org-ascii-text-width org-ascii-global-margin
+ (if (not (org-export-get-parent-headline inlinetask)) 0
+ org-ascii-inner-margin)
+ (org-ascii--current-text-width inlinetask info)))))
+
(defun org-ascii-inlinetask (inlinetask contents info)
"Transcode an INLINETASK element from Org to ASCII.
CONTENTS holds the contents of the block. INFO is a plist
holding contextual information."
(let ((width (org-ascii--current-text-width inlinetask info)))
- ;; If `org-ascii-format-inlinetask-function' is provided, call it
- ;; with appropriate arguments.
- (if (functionp org-ascii-format-inlinetask-function)
- (funcall org-ascii-format-inlinetask-function
- ;; todo.
- (and (plist-get info :with-todo-keywords)
- (let ((todo (org-element-property
- :todo-keyword inlinetask)))
- (and todo (org-export-data todo info))))
- ;; todo-type
- (org-element-property :todo-type inlinetask)
- ;; priority
- (and (plist-get info :with-priority)
- (org-element-property :priority inlinetask))
- ;; title
- (org-export-data (org-element-property :title inlinetask) info)
- ;; tags
- (and (plist-get info :with-tags)
- (org-element-property :tags inlinetask))
- ;; contents and width
- contents width)
- ;; Otherwise, use a default template.
- (let* ((utf8p (eq (plist-get info :ascii-charset) 'utf-8)))
- (org-ascii--indent-string
- (concat
- ;; Top line, with an additional blank line if not in UTF-8.
- (make-string width (if utf8p ?━ ?_)) "\n"
- (unless utf8p (concat (make-string width ? ) "\n"))
- ;; Add title. Fill it if wider than inlinetask.
- (let ((title (org-ascii--build-title inlinetask info width)))
- (if (<= (length title) width) title
- (org-ascii--fill-string title width info)))
- "\n"
- ;; If CONTENTS is not empty, insert it along with
- ;; a separator.
- (when (org-string-nw-p contents)
- (concat (make-string width (if utf8p ?─ ?-)) "\n" contents))
- ;; Bottom line.
- (make-string width (if utf8p ?━ ?_)))
- ;; Flush the inlinetask to the right.
- (- org-ascii-text-width org-ascii-global-margin
- (if (not (org-export-get-parent-headline inlinetask)) 0
- org-ascii-inner-margin)
- (org-ascii--current-text-width inlinetask info)))))))
+ (funcall org-ascii-format-inlinetask-function
+ ;; todo.
+ (and (plist-get info :with-todo-keywords)
+ (let ((todo (org-element-property
+ :todo-keyword inlinetask)))
+ (and todo (org-export-data todo info))))
+ ;; todo-type
+ (org-element-property :todo-type inlinetask)
+ ;; priority
+ (and (plist-get info :with-priority)
+ (org-element-property :priority inlinetask))
+ ;; title
+ (org-export-data (org-element-property :title inlinetask) info)
+ ;; tags
+ (and (plist-get info :with-tags)
+ (org-element-property :tags inlinetask))
+ ;; contents and width
+ contents width inlinetask info)))
;;;; Italic
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 0a844a5..6d44f07 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -568,7 +568,8 @@ Warning: non-nil may break indentation of source code blocks."
;;;; Drawers
-(defcustom org-html-format-drawer-function nil
+(defcustom org-html-format-drawer-function
+ (lambda (name contents) contents)
"Function called to format a drawer in HTML code.
The function must accept two parameters:
@@ -580,9 +581,7 @@ The function should return the string to be exported.
For example, the variable could be set to the following function
in order to mimic default behaviour:
-\(defun org-html-format-drawer-default \(name contents\)
- \"Format a drawer element for HTML export.\"
- contents\)"
+The default value simply returns the value of CONTENTS."
:group 'org-export-html
:version "24.4"
:package-version '(Org . "8.0")
@@ -627,7 +626,7 @@ document title."
:group 'org-export-html
:type 'integer)
-(defcustom org-html-format-headline-function nil
+(defcustom org-html-format-headline-function 'ignore
"Function to format headline text.
This function will be called with 5 arguments:
@@ -656,7 +655,7 @@ attributes, when appropriate."
;;;; Inlinetasks
-(defcustom org-html-format-inlinetask-function nil
+(defcustom org-html-format-inlinetask-function 'ignore
"Function called to format an inlinetask in HTML code.
The function must accept six parameters:
@@ -675,7 +674,7 @@ The function should return the string to be exported."
;;;; LaTeX
-(defcustom org-html-with-latex org-export-with-latex
+(defcustom org-html-with-latex t
"Non-nil means process LaTeX math snippets.
When set, the exporter will process LaTeX environments and
@@ -696,6 +695,7 @@ t Synonym for `mathjax'."
:group 'org-export-html
:version "24.4"
:package-version '(Org . "8.0")
+ :set (lambda (var val) (set-default var org-export-with-latex))
:type '(choice
(const :tag "Do not process math in any way" nil)
(const :tag "Use dvipng to make images" dvipng)
@@ -2010,7 +2010,7 @@ INFO is a plist used as a communication channel."
#'number-to-string
(org-export-get-headline-number headline info)
"-"))))
- (apply (if (functionp org-html-format-headline-function)
+ (apply (if (not (eq org-html-format-headline-function 'ignore))
(lambda (todo todo-type priority text tags &rest ignore)
(funcall org-html-format-headline-function
todo todo-type priority text tags))
@@ -2255,7 +2255,7 @@ holding contextual information."
headline-number "-"))))
(format-function
(cond ((functionp format-function) format-function)
- ((functionp org-html-format-headline-function)
+ ((not (eq org-html-format-headline-function 'ignore))
(lambda (todo todo-type priority text tags &rest ignore)
(funcall org-html-format-headline-function
todo todo-type priority text tags)))
@@ -2382,9 +2382,9 @@ contextual information."
CONTENTS holds the contents of the block. INFO is a plist
holding contextual information."
(cond
- ;; If `org-html-format-inlinetask-function' is provided, call it
+ ;; If `org-html-format-inlinetask-function' is not 'ignore, call it
;; with appropriate arguments.
- ((functionp org-html-format-inlinetask-function)
+ ((not (eq org-html-format-inlinetask-function 'ignore))
(let ((format-function
(function*
(lambda (todo todo-type priority text tags
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 34b88b3..807a60f 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -561,7 +561,8 @@ returned as-is."
;;;; Drawers
-(defcustom org-latex-format-drawer-function nil
+(defcustom org-latex-format-drawer-function
+ (lambda (name contents) contents)
"Function called to format a drawer in LaTeX code.
The function must accept two parameters:
@@ -570,19 +571,16 @@ The function must accept two parameters:
The function should return the string to be exported.
-For example, the variable could be set to the following function
-in order to mimic default behaviour:
-
-\(defun org-latex-format-drawer-default \(name contents\)
- \"Format a drawer element for LaTeX export.\"
- contents\)"
+The default function simply returns the value of CONTENTS."
:group 'org-export-latex
+ :version "24.4"
+ :package-version '(Org . "8.3")
:type 'function)
;;;; Inlinetasks
-(defcustom org-latex-format-inlinetask-function nil
+(defcustom org-latex-format-inlinetask-function 'ignore
"Function called to format an inlinetask in LaTeX code.
The function must accept six parameters:
@@ -1223,12 +1221,8 @@ channel."
CONTENTS holds the contents of the block. INFO is a plist
holding contextual information."
(let* ((name (org-element-property :drawer-name drawer))
- (output (if (functionp org-latex-format-drawer-function)
- (funcall org-latex-format-drawer-function
- name contents)
- ;; If there's no user defined function: simply
- ;; display contents of the drawer.
- contents)))
+ (output (funcall org-latex-format-drawer-function
+ name contents)))
(org-latex--wrap-label drawer output)))
@@ -1513,7 +1507,7 @@ holding contextual information."
(org-element-property :priority inlinetask))))
;; If `org-latex-format-inlinetask-function' is provided, call it
;; with appropriate arguments.
- (if (functionp org-latex-format-inlinetask-function)
+ (if (not (eq org-latex-format-inlinetask-function 'ignore))
(funcall org-latex-format-inlinetask-function
todo todo-type priority title tags contents)
;; Otherwise, use a default template.
diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index 097929c..c6017d0 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -647,7 +647,8 @@ values. See Info node `(emacs) File Variables'."
;;;; Drawers
-(defcustom org-odt-format-drawer-function nil
+(defcustom org-odt-format-drawer-function
+ (lambda (name contents) contents)
"Function called to format a drawer in ODT code.
The function must accept two parameters:
@@ -656,21 +657,16 @@ The function must accept two parameters:
The function should return the string to be exported.
-For example, the variable could be set to the following function
-in order to mimic default behaviour:
-
-\(defun org-odt-format-drawer-default \(name contents\)
- \"Format a drawer element for ODT export.\"
- contents\)"
+The default value simply returns the value of CONTENTS."
:group 'org-export-odt
:version "24.4"
- :package-version '(Org . "8.0")
+ :package-version '(Org . "8.3")
:type 'function)
;;;; Headline
-(defcustom org-odt-format-headline-function nil
+(defcustom org-odt-format-headline-function 'ignore
"Function to format headline text.
This function will be called with 5 arguments:
@@ -689,7 +685,7 @@ The function result will be used as headline text."
;;;; Inlinetasks
-(defcustom org-odt-format-inlinetask-function nil
+(defcustom org-odt-format-inlinetask-function 'ignore
"Function called to format an inlinetask in ODT code.
The function must accept six parameters:
@@ -709,7 +705,7 @@ The function should return the string to be exported."
;;;; LaTeX
-(defcustom org-odt-with-latex org-export-with-latex
+(defcustom org-odt-with-latex t
"Non-nil means process LaTeX math snippets.
When set, the exporter will process LaTeX environments and
@@ -730,6 +726,7 @@ t Synonym for `mathjax'."
:group 'org-export-odt
:version "24.4"
:package-version '(Org . "8.0")
+ :set (lambda (var val) (set-default var org-export-with-latex))
:type '(choice
(const :tag "Do not process math in any way" nil)
(const :tag "Use dvipng to make images" dvipng)
@@ -1627,12 +1624,8 @@ channel."
CONTENTS holds the contents of the block. INFO is a plist
holding contextual information."
(let* ((name (org-element-property :drawer-name drawer))
- (output (if (functionp org-odt-format-drawer-function)
- (funcall org-odt-format-drawer-function
- name contents)
- ;; If there's no user defined function: simply
- ;; display contents of the drawer.
- contents)))
+ (output (funcall org-odt-format-drawer-function
+ name contents)))
output))
@@ -1813,10 +1806,10 @@ INFO is a plist holding contextual information."
headline-number "-")))
(format-function (cond
((functionp format-function) format-function)
- ((functionp org-odt-format-headline-function)
+ ((not (eq org-odt-format-headline-function 'ignore))
(function*
(lambda (todo todo-type priority text tags
- &allow-other-keys)
+ &allow-other-keys)
(funcall org-odt-format-headline-function
todo todo-type priority text tags))))
(t 'org-odt-format-headline))))
@@ -1939,9 +1932,9 @@ contextual information."
CONTENTS holds the contents of the block. INFO is a plist
holding contextual information."
(cond
- ;; If `org-odt-format-inlinetask-function' is provided, call it
+ ;; If `org-odt-format-inlinetask-function' is not 'ignore, call it
;; with appropriate arguments.
- ((functionp org-odt-format-inlinetask-function)
+ ((not (eq org-odt-format-inlinetask-function 'ignore))
(let ((format-function
(function*
(lambda (todo todo-type priority text tags
diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el
index b71d687..fe57ca7 100644
--- a/lisp/ox-texinfo.el
+++ b/lisp/ox-texinfo.el
@@ -144,7 +144,7 @@
;;; Preamble
-(defcustom org-texinfo-filename nil
+(defcustom org-texinfo-filename ""
"Default filename for Texinfo output."
:group 'org-export-texinfo
:type '(string :tag "Export Filename"))
@@ -203,7 +203,7 @@ a format string in which the section title will be added."
;;; Headline
-(defcustom org-texinfo-format-headline-function nil
+(defcustom org-texinfo-format-headline-function 'ignore
"Function to format headline text.
This function will be called with 5 arguments:
@@ -317,7 +317,8 @@ returned as-is."
;;; Drawers
-(defcustom org-texinfo-format-drawer-function nil
+(defcustom org-texinfo-format-drawer-function
+ (lambda (name contents) contents)
"Function called to format a drawer in Texinfo code.
The function must accept two parameters:
@@ -326,18 +327,15 @@ The function must accept two parameters:
The function should return the string to be exported.
-For example, the variable could be set to the following function
-in order to mimic default behaviour:
-
-\(defun org-texinfo-format-drawer-default \(name contents\)
- \"Format a drawer element for Texinfo export.\"
- contents\)"
+The default function simply returns the value of CONTENTS."
:group 'org-export-texinfo
+ :version "24.4"
+ :package-version '(Org . "8.3")
:type 'function)
;;; Inlinetasks
-(defcustom org-texinfo-format-inlinetask-function nil
+(defcustom org-texinfo-format-inlinetask-function 'ignore
"Function called to format an inlinetask in Texinfo code.
The function must accept six parameters:
@@ -883,12 +881,8 @@ contextual information."
CONTENTS holds the contents of the block. INFO is a plist
holding contextual information."
(let* ((name (org-element-property :drawer-name drawer))
- (output (if (functionp org-texinfo-format-drawer-function)
- (funcall org-texinfo-format-drawer-function
- name contents)
- ;; If there's no user defined function: simply
- ;; display contents of the drawer.
- contents)))
+ (output (funcall org-texinfo-format-drawer-function
+ name contents)))
output))
;;; Dynamic Block
@@ -1037,7 +1031,7 @@ holding contextual information."
;; Create the headline text along with a no-tag version. The
;; latter is required to remove tags from table of contents.
(full-text (org-texinfo--sanitize-content
- (if (functionp org-texinfo-format-headline-function)
+ (if (not (eq org-texinfo-format-headline-function 'ignore))
;; User-defined formatting function.
(funcall org-texinfo-format-headline-function
todo todo-type priority text tags)
@@ -1052,7 +1046,7 @@ holding contextual information."
(mapconcat 'identity tags ":")))))))
(full-text-no-tag
(org-texinfo--sanitize-content
- (if (functionp org-texinfo-format-headline-function)
+ (if (not (eq org-texinfo-format-headline-function 'ignore))
;; User-defined formatting function.
(funcall org-texinfo-format-headline-function
todo todo-type priority text nil)
@@ -1154,7 +1148,7 @@ holding contextual information."
(org-element-property :priority inlinetask))))
;; If `org-texinfo-format-inlinetask-function' is provided, call it
;; with appropriate arguments.
- (if (functionp org-texinfo-format-inlinetask-function)
+ (if (not (eq org-texinfo-format-inlinetask-function 'ignore))
(funcall org-texinfo-format-inlinetask-function
todo todo-type priority title tags contents)
;; Otherwise, use a default template.
diff --git a/lisp/ox.el b/lisp/ox.el
index 56c24c0..91571d1 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -854,7 +854,7 @@ Therefore, using a specific configuration makes the process to
load faster and the export more portable."
:group 'org-export-general
:version "24.4"
- :package-version '(Org . "8.3")
+ :package-version '(Org . "8.0")
:type '(choice
(const :tag "Regular startup" nil)
(file :tag "Specific start-up file" :must-match t)))