1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-21 06:55:35 +00:00

Fix errors reported by cus-test.el

* ox.el (org-export-async-init-file): Use :set to set the
default value.

* ox-texinfo.el (org-texinfo-filename): Fix default value.
(org-texinfo-format-headline-function): Use 'ignore as the
default value.
(org-texinfo-format-drawer-function): Use a function as the
default value.  Update docstring.
(org-texinfo-drawer): Always use
`org-texinfo-format-drawer-function' as it is now a function
by default.
(org-texinfo-headline): Compare
`org-texinfo-format-headline-function' against 'ignore.
(org-texinfo-inlinetask): Compare
`org-texinfo-format-inlinetask-function' against 'ignore.

* ox-odt.el (org-odt-format-drawer-function): Use a function
as the default value.  Update docstring.
(org-odt-format-headline-function)
(org-odt-format-inlinetask-function): Fix default value.
(org-odt-with-latex): Use :set to set the default value.
(org-odt-drawer): Always use `org-odt-format-drawer-function'
as it is now a function by default.
(org-odt-format-headline--wrap): Compare
`org-odt-format-headline-function' against 'ignore.

* ox-latex.el (org-latex-format-drawer-function): Use a
function as the default value.  Update docstring.
(org-latex-format-inlinetask-function): Fix default value.
(org-latex-drawer): Always use
`org-latex-format-drawer-function' as it is now a function by
default.
(org-latex-inlinetask): Compare
`org-latex-format-inlinetask-function' against 'ignore.

* ox-html.el (org-html-format-drawer-function): Use a
function as the default value.  Update docstring.
(org-html-format-headline-function)
(org-html-format-inlinetask-function): Fix default value.
(org-html-with-latex): Use :set to set the default value.
(org-html--format-toc-headline)
(org-html-format-headline--wrap): Compare
`org-html-format-headline-function' against 'ignore.
(org-html-inlinetask): Compare
`org-html-format-inlinetask-function' against 'ignore.

* ox-ascii.el (org-ascii-format-drawer-function): Use a
function as the default value.  Update docstring.
(org-ascii-drawer): Always use
`org-ascii-format-drawer-function' as it is now a function by
default.
(org-ascii-format-inlinetask-default): New function.
(org-ascii-format-inlinetask-function): Use
`org-ascii-format-inlinetask-default' as the default.

* org.el (org-mouse-1-follows-link): Use :set to set the
default value.  Update custom type.
(org-log-note-headings): Fix order or list items in the custom
type.
(orgstruct-heading-prefix-regexp): Use an empty string as the
default value.  Use 'regexp as the custom type.
(orgstruct-make-binding): Tiny docstring enhancement.  Assume
`orgstruct-heading-prefix-regexp' is a string.

* org-agenda.el (org-agenda-search-view-max-outline-level):
Set default value to 0.  Update docstring.
(org-agenda-deadline-leaders): Fix custom type.
(org-search-view): Assume
`org-agenda-search-view-max-outline-level' is a number.

* ob-ruby.el (org-babel-ruby-nil-to): Fix custom type.

* ob-python.el (org-babel-python-mode): Use :set to set the
default value.
(org-babel-python-None-to): Fix custom type.

* ob-plantuml.el (org-plantuml-jar-path): Fix default value.
(org-babel-execute:plantuml): Assume `org-plantuml-jar-path'
is a string.

* ob-latex.el (org-babel-latex-htlatex): Fix default value.
(org-babel-latex-htlatex-packages): Fix custom type.
(org-babel-execute:latex): Assume `org-babel-latex-htlatex' is
a string.

Thanks to Glenn Morris for reporting this.
This commit is contained in:
Bastien Guerry 2013-11-14 14:05:18 +01:00
parent 8c5406d962
commit adcebf38f8
12 changed files with 156 additions and 199 deletions

View File

@ -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}

View File

@ -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

View File

@ -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.

View File

@ -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.

View File

@ -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.
@ -4583,7 +4583,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)
@ -4593,7 +4593,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)

View File

@ -1725,13 +1725,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.
@ -2663,12 +2670,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))
@ -8850,13 +8857,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
@ -9017,8 +9024,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))
@ -9044,14 +9051,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

View File

@ -336,7 +336,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:
@ -347,63 +348,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)
@ -1071,11 +1041,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
@ -1228,55 +1194,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

View File

@ -567,7 +567,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:
@ -579,9 +580,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")
@ -626,7 +625,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:
@ -655,7 +654,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:
@ -674,7 +673,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
@ -695,6 +694,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)
@ -2009,7 +2009,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))
@ -2254,7 +2254,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)))
@ -2381,9 +2381,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

View File

@ -556,7 +556,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:
@ -565,19 +566,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:
@ -1212,12 +1210,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)))
@ -1502,7 +1496,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.

View File

@ -646,7 +646,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:
@ -655,21 +656,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:
@ -688,7 +684,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:
@ -708,7 +704,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
@ -729,6 +725,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)
@ -1626,12 +1623,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))
@ -1812,10 +1805,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))))
@ -1938,9 +1931,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

View File

@ -143,7 +143,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"))
@ -202,7 +202,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:
@ -316,7 +316,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:
@ -325,18 +326,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:
@ -882,12 +880,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
@ -1036,7 +1030,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)
@ -1051,7 +1045,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)
@ -1153,7 +1147,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.

View File

@ -822,7 +822,7 @@ automatically. But you can retrieve them with \\[org-export-stack]."
:package-version '(Org . "8.0")
:type 'boolean)
(defcustom org-export-async-init-file user-init-file
(defcustom org-export-async-init-file "~/.emacs.el"
"File used to initialize external export process.
Value must be an absolute file name. It defaults to user's
initialization file. Though, a specific configuration makes the
@ -830,6 +830,7 @@ process faster and the export more portable."
:group 'org-export-general
:version "24.4"
:package-version '(Org . "8.0")
:set (lambda (var val) (set-default var user-init-file))
:type '(file :must-match t))
(defcustom org-export-dispatch-use-expert-ui nil