diff options
| author | Bastien Guerry | 2013-12-06 12:21:31 +0100 |
|---|---|---|
| committer | Bastien Guerry | 2013-12-06 12:21:31 +0100 |
| commit | 73d3db828e8149847b3666acbc38f94898ac15a9 (patch) | |
| tree | 7cd2d596b9cd5c2c54aef94c4cdf900e99009401 | |
| parent | 64ed4306fc76b2b5386deef8cdd101a2dfe13b74 (diff) | |
| download | emacs-73d3db828e8149847b3666acbc38f94898ac15a9.tar.gz emacs-73d3db828e8149847b3666acbc38f94898ac15a9.zip | |
Merge Org 8.2.4
| -rw-r--r-- | doc/misc/ChangeLog | 9 | ||||
| -rw-r--r-- | doc/misc/org.texi | 15 | ||||
| -rw-r--r-- | etc/refcards/orgcard.tex | 2 | ||||
| -rw-r--r-- | lisp/org/ChangeLog | 184 | ||||
| -rw-r--r-- | lisp/org/ob-latex.el | 6 | ||||
| -rw-r--r-- | lisp/org/ob-plantuml.el | 4 | ||||
| -rw-r--r-- | lisp/org/ob-python.el | 4 | ||||
| -rw-r--r-- | lisp/org/ob-ruby.el | 4 | ||||
| -rw-r--r-- | lisp/org/org-agenda.el | 19 | ||||
| -rw-r--r-- | lisp/org/org-archive.el | 1 | ||||
| -rw-r--r-- | lisp/org/org-clock.el | 3 | ||||
| -rw-r--r-- | lisp/org/org-colview.el | 5 | ||||
| -rw-r--r-- | lisp/org/org-compat.el | 10 | ||||
| -rw-r--r-- | lisp/org/org-crypt.el | 10 | ||||
| -rw-r--r-- | lisp/org/org-docview.el | 8 | ||||
| -rw-r--r-- | lisp/org/org-element.el | 10 | ||||
| -rw-r--r-- | lisp/org/org-id.el | 4 | ||||
| -rw-r--r-- | lisp/org/org-macs.el | 8 | ||||
| -rw-r--r-- | lisp/org/org-table.el | 5 | ||||
| -rw-r--r-- | lisp/org/org.el | 356 | ||||
| -rw-r--r-- | lisp/org/ox-ascii.el | 161 | ||||
| -rw-r--r-- | lisp/org/ox-html.el | 92 | ||||
| -rw-r--r-- | lisp/org/ox-latex.el | 24 | ||||
| -rw-r--r-- | lisp/org/ox-odt.el | 43 | ||||
| -rw-r--r-- | lisp/org/ox-publish.el | 5 | ||||
| -rw-r--r-- | lisp/org/ox-texinfo.el | 32 | ||||
| -rw-r--r-- | lisp/org/ox.el | 32 |
27 files changed, 622 insertions, 434 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index bc1c83d39d6..6e427fa24b0 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2013-12-06 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 2 | |||
| 3 | * org.texi (Creating one-off styles): Use new export snippet | ||
| 4 | syntax. | ||
| 5 | |||
| 6 | * org.texi (Export settings): documentation describing how text | ||
| 7 | above the first heading is ignored when an :export: tag is in a | ||
| 8 | file. | ||
| 9 | |||
| 1 | 2013-12-05 Michael Albinus <michael.albinus@gmx.de> | 10 | 2013-12-05 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 11 | ||
| 3 | * dbus.texi (Type Conversion): Clarify unibyte-ness of strings. | 12 | * dbus.texi (Type Conversion): Clarify unibyte-ness of strings. |
diff --git a/doc/misc/org.texi b/doc/misc/org.texi index 5c416b65d77..9ebbb0a6295 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | @c %**start of header | 2 | @c %**start of header |
| 3 | @setfilename ../../info/org | 3 | @setfilename ../../info/org |
| 4 | @settitle The Org Manual | 4 | @settitle The Org Manual |
| 5 | @set VERSION 8.2.3 (GNU Emacs 24.3) | 5 | @set VERSION 8.2.4 (GNU Emacs 24.3) |
| 6 | 6 | ||
| 7 | @c Use proper quote and backtick for code sections in PDF output | 7 | @c Use proper quote and backtick for code sections in PDF output |
| 8 | @c Cf. Texinfo manual 14.2 | 8 | @c Cf. Texinfo manual 14.2 |
| @@ -10518,7 +10518,8 @@ clocktable. | |||
| 10518 | The tags that select a tree for export (@code{org-export-select-tags}). The | 10518 | The tags that select a tree for export (@code{org-export-select-tags}). The |
| 10519 | default value is @code{:export:}. Within a subtree tagged with | 10519 | default value is @code{:export:}. Within a subtree tagged with |
| 10520 | @code{:export:}, you can still exclude entries with @code{:noexport:} (see | 10520 | @code{:export:}, you can still exclude entries with @code{:noexport:} (see |
| 10521 | below). | 10521 | below). When headlines are selectively exported with @code{:export:} |
| 10522 | anywhere in a file, text before the first headline is ignored. | ||
| 10522 | 10523 | ||
| 10523 | @item EXCLUDE_TAGS | 10524 | @item EXCLUDE_TAGS |
| 10524 | The tags that exclude a tree from export (@code{org-export-exclude-tags}). | 10525 | The tags that exclude a tree from export (@code{org-export-exclude-tags}). |
| @@ -12542,13 +12543,13 @@ file. The use of this feature is better illustrated with couple of examples. | |||
| 12542 | @enumerate | 12543 | @enumerate |
| 12543 | @item Embedding ODT tags as part of regular text | 12544 | @item Embedding ODT tags as part of regular text |
| 12544 | 12545 | ||
| 12545 | You can include simple OpenDocument tags by prefixing them with | 12546 | You can inline OpenDocument syntax by enclosing it within |
| 12546 | @samp{@@}. For example, to highlight a region of text do the following: | 12547 | @samp{@@@@odt:...@@@@} markup. For example, to highlight a region of text do |
| 12548 | the following: | ||
| 12547 | 12549 | ||
| 12548 | @example | 12550 | @example |
| 12549 | @@<text:span text:style-name="Highlight">This is a | 12551 | @@@@odt:<text:span text:style-name="Highlight">This is a highlighted |
| 12550 | highlighted text@@</text:span>. But this is a | 12552 | text</text:span>@@@@. But this is a regular text. |
| 12551 | regular text. | ||
| 12552 | @end example | 12553 | @end example |
| 12553 | 12554 | ||
| 12554 | @strong{Hint:} To see the above example in action, edit your | 12555 | @strong{Hint:} To see the above example in action, edit your |
diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex index 0e19d32a1a7..3956ffaac90 100644 --- a/etc/refcards/orgcard.tex +++ b/etc/refcards/orgcard.tex | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | % Reference Card for Org Mode | 1 | % Reference Card for Org Mode |
| 2 | \def\orgversionnumber{8.2.3} | 2 | \def\orgversionnumber{8.2.4} |
| 3 | \def\versionyear{2013} % latest update | 3 | \def\versionyear{2013} % latest update |
| 4 | \input emacsver.tex | 4 | \input emacsver.tex |
| 5 | 5 | ||
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index a9d2731892f..fa9dc824c99 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog | |||
| @@ -1,3 +1,187 @@ | |||
| 1 | 2013-12-06 Achim Gratz <Stromeko@Stromeko.DE> | ||
| 2 | |||
| 3 | * org-crypt.el: Declare `epg-context´. | ||
| 4 | (org-encrypt-string): Correct indentation. | ||
| 5 | |||
| 6 | * org.el (org-version): Replace `_version´ by `version1´. | ||
| 7 | |||
| 8 | 2013-12-06 Alexander Vorobiev <alexander.vorobiev@gmail.com> (tiny change) | ||
| 9 | |||
| 10 | * org-compat.el (org-get-x-clipboard): Use w32-get-clipboard-data | ||
| 11 | to get the clipboard data under Windows. | ||
| 12 | |||
| 13 | 2013-12-06 Bastien Guerry <bzg@gnu.org> | ||
| 14 | |||
| 15 | * ox.el (org-export-with-sub-superscripts): | ||
| 16 | * org.el (org-use-sub-superscripts): Fix version and enhance | ||
| 17 | docstring again. | ||
| 18 | |||
| 19 | * ox.el (org-export-with-sub-superscripts): | ||
| 20 | * org.el (org-use-sub-superscripts): Enhance docstrings. | ||
| 21 | |||
| 22 | * org-macs.el (org-autoload): Delete. | ||
| 23 | |||
| 24 | * org-docview.el ("docview"): Fix declarations and require | ||
| 25 | doc-view directly. | ||
| 26 | |||
| 27 | * org-id.el (org-id-copy) | ||
| 28 | (org-id-get-with-outline-path-completion) | ||
| 29 | (org-id-get-with-outline-drilling, org-id-new): | ||
| 30 | |||
| 31 | * org-colview.el: | ||
| 32 | (org-colview-initial-truncate-line-value) | ||
| 33 | (org-columns-open-link, org-string-to-number): | ||
| 34 | * org-clock.el: | ||
| 35 | (org-clock-put-overlay, org-count-quarter, org-clock-loaded): | ||
| 36 | * org-archive.el (org-get-local-archive-location): | ||
| 37 | * org-agenda.el (org-agenda-todo-custom-ignore-p): | ||
| 38 | Autoload. | ||
| 39 | |||
| 40 | * org.el (org-return-follows-link): | ||
| 41 | * ob-python.el (org-babel-python-command): Don't use :set. | ||
| 42 | |||
| 43 | * ox-odt.el (org-odt-content-template-file): Fix version. | ||
| 44 | |||
| 45 | * ox-texinfo.el (org-texinfo-filename): Fix default value. | ||
| 46 | (org-texinfo-format-headline-function): Use 'ignore as the | ||
| 47 | default value. | ||
| 48 | (org-texinfo-format-drawer-function): Use a function as the | ||
| 49 | default value. Update docstring. | ||
| 50 | (org-texinfo-drawer): Always use | ||
| 51 | `org-texinfo-format-drawer-function' as it is now a function | ||
| 52 | by default. | ||
| 53 | (org-texinfo-headline): Compare | ||
| 54 | `org-texinfo-format-headline-function' against 'ignore. | ||
| 55 | (org-texinfo-inlinetask): Compare | ||
| 56 | `org-texinfo-format-inlinetask-function' against 'ignore. | ||
| 57 | |||
| 58 | * ox-odt.el (org-odt-format-drawer-function): Use a function as | ||
| 59 | the default value. Update docstring. | ||
| 60 | (org-odt-format-headline-function) | ||
| 61 | (org-odt-format-inlinetask-function): Fix default value. | ||
| 62 | (org-odt-drawer): Always use `org-odt-format-drawer-function' | ||
| 63 | as it is now a function by default. | ||
| 64 | (org-odt-format-headline--wrap): Compare | ||
| 65 | `org-odt-format-headline-function' against 'ignore. | ||
| 66 | |||
| 67 | * ox-latex.el (org-latex-format-drawer-function): Use a function | ||
| 68 | as the default value. Update docstring. | ||
| 69 | (org-latex-format-inlinetask-function): Fix default value. | ||
| 70 | (org-latex-drawer): Always use | ||
| 71 | `org-latex-format-drawer-function' as it is now a function by | ||
| 72 | default. | ||
| 73 | (org-latex-inlinetask): Compare | ||
| 74 | `org-latex-format-inlinetask-function' against 'ignore. | ||
| 75 | |||
| 76 | * ox-html.el (org-html-format-drawer-function): Use a function as | ||
| 77 | the default value. Update docstring. | ||
| 78 | (org-html-format-headline-function) | ||
| 79 | (org-html-format-inlinetask-function): Fix default value. | ||
| 80 | (org-html--format-toc-headline) | ||
| 81 | (org-html-format-headline--wrap): Compare | ||
| 82 | `org-html-format-headline-function' against 'ignore. | ||
| 83 | (org-html-inlinetask): Compare | ||
| 84 | `org-html-format-inlinetask-function' against 'ignore. | ||
| 85 | |||
| 86 | * ox-ascii.el (org-ascii-format-drawer-function): Use a | ||
| 87 | function as the default value. Update docstring. | ||
| 88 | (org-ascii-drawer): Always use | ||
| 89 | `org-ascii-format-drawer-function' as it is now a function by | ||
| 90 | default. | ||
| 91 | (org-ascii-format-inlinetask-default): New function. | ||
| 92 | (org-ascii-format-inlinetask-function): Use | ||
| 93 | `org-ascii-format-inlinetask-default' as the default. | ||
| 94 | |||
| 95 | * org.el (org-mouse-1-follows-link): Use :set to set the default | ||
| 96 | value. Update custom type. | ||
| 97 | (org-log-note-headings): Fix order or list items in the custom | ||
| 98 | type. | ||
| 99 | (orgstruct-heading-prefix-regexp): Use an empty string as the | ||
| 100 | default value. Use 'regexp as the custom type. | ||
| 101 | (orgstruct-make-binding): Tiny docstring enhancement. Assume | ||
| 102 | `orgstruct-heading-prefix-regexp' is a string. | ||
| 103 | |||
| 104 | * org-agenda.el (org-agenda-search-view-max-outline-level): Set | ||
| 105 | default value to 0. Update docstring. | ||
| 106 | (org-agenda-deadline-leaders): Fix custom type. | ||
| 107 | (org-search-view): Assume | ||
| 108 | `org-agenda-search-view-max-outline-level' is a number. | ||
| 109 | |||
| 110 | * ob-ruby.el (org-babel-ruby-nil-to): Fix custom type. | ||
| 111 | |||
| 112 | * ob-python.el (org-babel-python-mode): Use :set to set the | ||
| 113 | default value. | ||
| 114 | (org-babel-python-None-to): Fix custom type. | ||
| 115 | |||
| 116 | * ob-plantuml.el (org-plantuml-jar-path): Fix default value. | ||
| 117 | (org-babel-execute:plantuml): Assume `org-plantuml-jar-path' is a | ||
| 118 | string. | ||
| 119 | |||
| 120 | * ob-latex.el (org-babel-latex-htlatex): Fix default value. | ||
| 121 | (org-babel-latex-htlatex-packages): Fix custom type. | ||
| 122 | (org-babel-execute:latex): Assume `org-babel-latex-htlatex' is a | ||
| 123 | string. | ||
| 124 | |||
| 125 | * ox-odt.el (org-odt-display-outline-level): Fix version. | ||
| 126 | |||
| 127 | * ox-odt.el (org-odt-inline-formula-rules) | ||
| 128 | (org-odt-inline-image-rules, org-odt-use-date-fields): Add version | ||
| 129 | and package-version. | ||
| 130 | |||
| 131 | * ox-html.el (org-html-format-drawer-function) | ||
| 132 | (org-html-format-headline-function) | ||
| 133 | (org-html-format-inlinetask-function) | ||
| 134 | (org-html-creator-string): Add version and package-version. | ||
| 135 | |||
| 136 | * ox-html.el (org-html-text-markup-alist): Fix version. | ||
| 137 | |||
| 138 | * org-agenda.el (org-agenda-set-restriction-lock): Autoload. | ||
| 139 | |||
| 140 | * ob-abc.el (org-babel-expand-body:abc): Use dolist. | ||
| 141 | (org-babel-execute:abc): Fix regexp quoting. | ||
| 142 | |||
| 143 | * ob-calc.el (org--var-syms): Rename from `var-syms'. | ||
| 144 | |||
| 145 | * ob-lilypond.el (ly-compile-lilyfile): Remove redundant | ||
| 146 | let-binding. | ||
| 147 | |||
| 148 | * ob-table.el (sbe): Move debug declaration. | ||
| 149 | |||
| 150 | * org-clock.el (org--msg-extra): Rename from `msg-extra'. | ||
| 151 | |||
| 152 | 2013-12-06 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 153 | |||
| 154 | * org.el (org-ctrl-c-ctrl-c): When point is on an unsupported | ||
| 155 | object, look for something to do at a higher level instead of | ||
| 156 | bailing out. | ||
| 157 | |||
| 158 | * ox-html.el (org-html-format-latex): Add an argument. Ensure | ||
| 159 | latex header is the same as specified in the original buffer when | ||
| 160 | exporting a LaTeX fragment or environment. | ||
| 161 | (org-html-latex-environment, org-html-latex-fragment): Apply | ||
| 162 | signature change. | ||
| 163 | |||
| 164 | * ox-publish.el (org-publish-cache-ctime-of-src): Return an error | ||
| 165 | when publishing a non-existent file. | ||
| 166 | |||
| 167 | * org-element.el (org-element-paragraph-separate): More accurate | ||
| 168 | regexp. | ||
| 169 | |||
| 170 | * org.el (org-entry-get): Widen buffer in order to retrieve | ||
| 171 | properties, as `org-entry-properties' and | ||
| 172 | `org-entry-get-with-inheritance' already do. | ||
| 173 | |||
| 174 | * ox-html.el (org-html--format-toc-headline): Add missing headline | ||
| 175 | number in TOC entries. | ||
| 176 | |||
| 177 | * org.el (org-entry-properties): Ignore narrowing when retrieving | ||
| 178 | current headline properties. | ||
| 179 | |||
| 180 | 2013-12-06 Thierry Volpiatto <thierry.volpiatto@gmail.com> (tiny change) | ||
| 181 | |||
| 182 | * org-crypt.el (org-encrypt-string, org-encrypt-entry) | ||
| 183 | (org-decrypt-entry): Fix warning. | ||
| 184 | |||
| 1 | 2013-11-17 Paul Eggert <eggert@cs.ucla.edu> | 185 | 2013-11-17 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 186 | ||
| 3 | Spelling fixes. | 187 | Spelling fixes. |
diff --git a/lisp/org/ob-latex.el b/lisp/org/ob-latex.el index edc9fe8813f..85918e60bb7 100644 --- a/lisp/org/ob-latex.el +++ b/lisp/org/ob-latex.el | |||
| @@ -50,7 +50,7 @@ | |||
| 50 | '((:results . "latex") (:exports . "results")) | 50 | '((:results . "latex") (:exports . "results")) |
| 51 | "Default arguments to use when evaluating a LaTeX source block.") | 51 | "Default arguments to use when evaluating a LaTeX source block.") |
| 52 | 52 | ||
| 53 | (defcustom org-babel-latex-htlatex nil | 53 | (defcustom org-babel-latex-htlatex "" |
| 54 | "The htlatex command to enable conversion of latex to SVG or HTML." | 54 | "The htlatex command to enable conversion of latex to SVG or HTML." |
| 55 | :group 'org-babel | 55 | :group 'org-babel |
| 56 | :type 'string) | 56 | :type 'string) |
| @@ -59,7 +59,7 @@ | |||
| 59 | '("[usenames]{color}" "{tikz}" "{color}" "{listings}" "{amsmath}") | 59 | '("[usenames]{color}" "{tikz}" "{color}" "{listings}" "{amsmath}") |
| 60 | "Packages to use for htlatex export." | 60 | "Packages to use for htlatex export." |
| 61 | :group 'org-babel | 61 | :group 'org-babel |
| 62 | :type '(list string)) | 62 | :type '(list (string))) |
| 63 | 63 | ||
| 64 | (defun org-babel-expand-body:latex (body params) | 64 | (defun org-babel-expand-body:latex (body params) |
| 65 | "Expand BODY according to PARAMS, return the expanded body." | 65 | "Expand BODY according to PARAMS, return the expanded body." |
| @@ -141,7 +141,7 @@ This function is called by `org-babel-execute-src-block'." | |||
| 141 | (delete-file transient-pdf-file)))))) | 141 | (delete-file transient-pdf-file)))))) |
| 142 | ((and (or (string-match "\\.svg$" out-file) | 142 | ((and (or (string-match "\\.svg$" out-file) |
| 143 | (string-match "\\.html$" out-file)) | 143 | (string-match "\\.html$" out-file)) |
| 144 | org-babel-latex-htlatex) | 144 | (not (string= "" org-babel-latex-htlatex))) |
| 145 | (with-temp-file tex-file | 145 | (with-temp-file tex-file |
| 146 | (insert (concat | 146 | (insert (concat |
| 147 | "\\documentclass[preview]{standalone} | 147 | "\\documentclass[preview]{standalone} |
diff --git a/lisp/org/ob-plantuml.el b/lisp/org/ob-plantuml.el index c17d4448a3c..f992d04da52 100644 --- a/lisp/org/ob-plantuml.el +++ b/lisp/org/ob-plantuml.el | |||
| @@ -40,7 +40,7 @@ | |||
| 40 | '((:results . "file") (:exports . "results")) | 40 | '((:results . "file") (:exports . "results")) |
| 41 | "Default arguments for evaluating a plantuml source block.") | 41 | "Default arguments for evaluating a plantuml source block.") |
| 42 | 42 | ||
| 43 | (defcustom org-plantuml-jar-path nil | 43 | (defcustom org-plantuml-jar-path "" |
| 44 | "Path to the plantuml.jar file." | 44 | "Path to the plantuml.jar file." |
| 45 | :group 'org-babel | 45 | :group 'org-babel |
| 46 | :version "24.1" | 46 | :version "24.1" |
| @@ -55,7 +55,7 @@ This function is called by `org-babel-execute-src-block'." | |||
| 55 | (cmdline (cdr (assoc :cmdline params))) | 55 | (cmdline (cdr (assoc :cmdline params))) |
| 56 | (in-file (org-babel-temp-file "plantuml-")) | 56 | (in-file (org-babel-temp-file "plantuml-")) |
| 57 | (java (or (cdr (assoc :java params)) "")) | 57 | (java (or (cdr (assoc :java params)) "")) |
| 58 | (cmd (if (not org-plantuml-jar-path) | 58 | (cmd (if (string= "" org-plantuml-jar-path) |
| 59 | (error "`org-plantuml-jar-path' is not set") | 59 | (error "`org-plantuml-jar-path' is not set") |
| 60 | (concat "java " java " -jar " | 60 | (concat "java " java " -jar " |
| 61 | (shell-quote-argument | 61 | (shell-quote-argument |
diff --git a/lisp/org/ob-python.el b/lisp/org/ob-python.el index 99c35ce2863..3c3f6646877 100644 --- a/lisp/org/ob-python.el +++ b/lisp/org/ob-python.el | |||
| @@ -54,7 +54,7 @@ This will typically be either 'python or 'python-mode." | |||
| 54 | :group 'org-babel | 54 | :group 'org-babel |
| 55 | :version "24.4" | 55 | :version "24.4" |
| 56 | :package-version '(Org . "8.0") | 56 | :package-version '(Org . "8.0") |
| 57 | :type 'function) | 57 | :type 'symbol) |
| 58 | 58 | ||
| 59 | (defvar org-src-preserve-indentation) | 59 | (defvar org-src-preserve-indentation) |
| 60 | 60 | ||
| @@ -70,7 +70,7 @@ This will typically be either 'python or 'python-mode." | |||
| 70 | :group 'org-babel | 70 | :group 'org-babel |
| 71 | :version "24.4" | 71 | :version "24.4" |
| 72 | :package-version '(Org . "8.0") | 72 | :package-version '(Org . "8.0") |
| 73 | :type 'string) | 73 | :type 'symbol) |
| 74 | 74 | ||
| 75 | (defun org-babel-execute:python (body params) | 75 | (defun org-babel-execute:python (body params) |
| 76 | "Execute a block of Python code with Babel. | 76 | "Execute a block of Python code with Babel. |
diff --git a/lisp/org/ob-ruby.el b/lisp/org/ob-ruby.el index fe1ee0ff098..34b9eaf47ca 100644 --- a/lisp/org/ob-ruby.el +++ b/lisp/org/ob-ruby.el | |||
| @@ -62,9 +62,7 @@ | |||
| 62 | :group 'org-babel | 62 | :group 'org-babel |
| 63 | :version "24.4" | 63 | :version "24.4" |
| 64 | :package-version '(Org . "8.0") | 64 | :package-version '(Org . "8.0") |
| 65 | :type 'string) | 65 | :type 'symbol) |
| 66 | |||
| 67 | |||
| 68 | 66 | ||
| 69 | (defun org-babel-execute:ruby (body params) | 67 | (defun org-babel-execute:ruby (body params) |
| 70 | "Execute a block of Ruby code with Babel. | 68 | "Execute a block of Ruby code with Babel. |
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index 5ef92f7aaeb..4dfa3e9e3cf 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el | |||
| @@ -1419,13 +1419,14 @@ When nil, they may also match part of a word." | |||
| 1419 | :version "24.1" | 1419 | :version "24.1" |
| 1420 | :type 'boolean) | 1420 | :type 'boolean) |
| 1421 | 1421 | ||
| 1422 | (defcustom org-agenda-search-view-max-outline-level nil | 1422 | (defcustom org-agenda-search-view-max-outline-level 0 |
| 1423 | "Maximum outline level to display in search view. | 1423 | "Maximum outline level to display in search view. |
| 1424 | E.g. when this is set to 1, the search view will only | 1424 | E.g. when this is set to 1, the search view will only |
| 1425 | show headlines of level 1." | 1425 | show headlines of level 1. When set to 0, the default |
| 1426 | value, don't limit agenda view by outline level." | ||
| 1426 | :group 'org-agenda-search-view | 1427 | :group 'org-agenda-search-view |
| 1427 | :version "24.4" | 1428 | :version "24.4" |
| 1428 | :package-version '(Org . "8.0") | 1429 | :package-version '(Org . "8.3") |
| 1429 | :type 'integer) | 1430 | :type 'integer) |
| 1430 | 1431 | ||
| 1431 | (defgroup org-agenda-time-grid nil | 1432 | (defgroup org-agenda-time-grid nil |
| @@ -1746,10 +1747,9 @@ to capture the number of days." | |||
| 1746 | :version "24.4" | 1747 | :version "24.4" |
| 1747 | :package-version '(Org . "8.0") | 1748 | :package-version '(Org . "8.0") |
| 1748 | :type '(list | 1749 | :type '(list |
| 1749 | (string :tag "Deadline today ") | 1750 | (string :tag "Deadline today ") |
| 1750 | (choice :tag "Deadline relative" | 1751 | (string :tag "Deadline in the future ") |
| 1751 | (string :tag "Format string") | 1752 | (string :tag "Deadline in the past "))) |
| 1752 | (function)))) | ||
| 1753 | 1753 | ||
| 1754 | (defcustom org-agenda-remove-times-when-in-prefix t | 1754 | (defcustom org-agenda-remove-times-when-in-prefix t |
| 1755 | "Non-nil means remove duplicate time specifications in agenda items. | 1755 | "Non-nil means remove duplicate time specifications in agenda items. |
| @@ -4583,7 +4583,7 @@ in `org-agenda-text-search-extra-files'." | |||
| 4583 | (goto-char (max (point-min) (1- (point)))) | 4583 | (goto-char (max (point-min) (1- (point)))) |
| 4584 | (while (re-search-forward regexp nil t) | 4584 | (while (re-search-forward regexp nil t) |
| 4585 | (org-back-to-heading t) | 4585 | (org-back-to-heading t) |
| 4586 | (while (and org-agenda-search-view-max-outline-level | 4586 | (while (and (not (zerop org-agenda-search-view-max-outline-level)) |
| 4587 | (> (org-reduced-level (org-outline-level)) | 4587 | (> (org-reduced-level (org-outline-level)) |
| 4588 | org-agenda-search-view-max-outline-level) | 4588 | org-agenda-search-view-max-outline-level) |
| 4589 | (forward-line -1) | 4589 | (forward-line -1) |
| @@ -4593,7 +4593,7 @@ in `org-agenda-text-search-extra-files'." | |||
| 4593 | beg1 (point) | 4593 | beg1 (point) |
| 4594 | end (progn | 4594 | end (progn |
| 4595 | (outline-next-heading) | 4595 | (outline-next-heading) |
| 4596 | (while (and org-agenda-search-view-max-outline-level | 4596 | (while (and (not (zerop org-agenda-search-view-max-outline-level)) |
| 4597 | (> (org-reduced-level (org-outline-level)) | 4597 | (> (org-reduced-level (org-outline-level)) |
| 4598 | org-agenda-search-view-max-outline-level) | 4598 | org-agenda-search-view-max-outline-level) |
| 4599 | (forward-line 1) | 4599 | (forward-line 1) |
| @@ -5451,6 +5451,7 @@ This function is invoked if `org-agenda-todo-ignore-deadlines', | |||
| 5451 | (>= days n) | 5451 | (>= days n) |
| 5452 | (<= days n)))) | 5452 | (<= days n)))) |
| 5453 | 5453 | ||
| 5454 | ;;;###autoload | ||
| 5454 | (defun org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item | 5455 | (defun org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item |
| 5455 | (&optional end) | 5456 | (&optional end) |
| 5456 | "Do we have a reason to ignore this TODO entry because it has a time stamp?" | 5457 | "Do we have a reason to ignore this TODO entry because it has a time stamp?" |
diff --git a/lisp/org/org-archive.el b/lisp/org/org-archive.el index d5bdff16f9b..3dc52c1c990 100644 --- a/lisp/org/org-archive.el +++ b/lisp/org/org-archive.el | |||
| @@ -135,6 +135,7 @@ information." | |||
| 135 | (match-string 1)) | 135 | (match-string 1)) |
| 136 | (t org-archive-location)))))) | 136 | (t org-archive-location)))))) |
| 137 | 137 | ||
| 138 | ;;;###autoload | ||
| 138 | (defun org-add-archive-files (files) | 139 | (defun org-add-archive-files (files) |
| 139 | "Splice the archive files into the list of files. | 140 | "Splice the archive files into the list of files. |
| 140 | This implies visiting all these files and finding out what the | 141 | This implies visiting all these files and finding out what the |
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index 978bde475d4..3238c8ca947 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el | |||
| @@ -1871,6 +1871,7 @@ will be easy to remove." | |||
| 1871 | (overlay-put ov 'end-glyph (make-glyph tx))) | 1871 | (overlay-put ov 'end-glyph (make-glyph tx))) |
| 1872 | (push ov org-clock-overlays))) | 1872 | (push ov org-clock-overlays))) |
| 1873 | 1873 | ||
| 1874 | ;;;###autoload | ||
| 1874 | (defun org-clock-remove-overlays (&optional beg end noremove) | 1875 | (defun org-clock-remove-overlays (&optional beg end noremove) |
| 1875 | "Remove the occur highlights from the buffer. | 1876 | "Remove the occur highlights from the buffer. |
| 1876 | BEG and END are ignored. If NOREMOVE is nil, remove this function | 1877 | BEG and END are ignored. If NOREMOVE is nil, remove this function |
| @@ -2143,6 +2144,7 @@ If you can combine both, the month starting day will have priority." | |||
| 2143 | ((= n 3) "3rd") | 2144 | ((= n 3) "3rd") |
| 2144 | ((= n 4) "4th"))) | 2145 | ((= n 4) "4th"))) |
| 2145 | 2146 | ||
| 2147 | ;;;###autoload | ||
| 2146 | (defun org-clocktable-shift (dir n) | 2148 | (defun org-clocktable-shift (dir n) |
| 2147 | "Try to shift the :block date of the clocktable at point. | 2149 | "Try to shift the :block date of the clocktable at point. |
| 2148 | Point must be in the #+BEGIN: line of a clocktable, or this function | 2150 | Point must be in the #+BEGIN: line of a clocktable, or this function |
| @@ -2752,6 +2754,7 @@ This function is made for clock tables." | |||
| 2752 | (defvar org-clock-loaded nil | 2754 | (defvar org-clock-loaded nil |
| 2753 | "Was the clock file loaded?") | 2755 | "Was the clock file loaded?") |
| 2754 | 2756 | ||
| 2757 | ;;;###autoload | ||
| 2755 | (defun org-clock-update-time-maybe () | 2758 | (defun org-clock-update-time-maybe () |
| 2756 | "If this is a CLOCK line, update it and return t. | 2759 | "If this is a CLOCK line, update it and return t. |
| 2757 | Otherwise, return nil." | 2760 | Otherwise, return nil." |
diff --git a/lisp/org/org-colview.el b/lisp/org/org-colview.el index 523b42186b4..361560dcbaf 100644 --- a/lisp/org/org-colview.el +++ b/lisp/org/org-colview.el | |||
| @@ -323,6 +323,7 @@ for the duration of the command.") | |||
| 323 | (defvar org-colview-initial-truncate-line-value nil | 323 | (defvar org-colview-initial-truncate-line-value nil |
| 324 | "Remember the value of `truncate-lines' across colview.") | 324 | "Remember the value of `truncate-lines' across colview.") |
| 325 | 325 | ||
| 326 | ;;;###autoload | ||
| 326 | (defun org-columns-remove-overlays () | 327 | (defun org-columns-remove-overlays () |
| 327 | "Remove all currently active column overlays." | 328 | "Remove all currently active column overlays." |
| 328 | (interactive) | 329 | (interactive) |
| @@ -670,6 +671,7 @@ around it." | |||
| 670 | (let ((value (get-char-property (point) 'org-columns-value))) | 671 | (let ((value (get-char-property (point) 'org-columns-value))) |
| 671 | (org-open-link-from-string value arg))) | 672 | (org-open-link-from-string value arg))) |
| 672 | 673 | ||
| 674 | ;;;###autoload | ||
| 673 | (defun org-columns-get-format-and-top-level () | 675 | (defun org-columns-get-format-and-top-level () |
| 674 | (let ((fmt (org-columns-get-format))) | 676 | (let ((fmt (org-columns-get-format))) |
| 675 | (org-columns-goto-top-level) | 677 | (org-columns-goto-top-level) |
| @@ -951,6 +953,8 @@ display, or in the #+COLUMNS line of the current buffer." | |||
| 951 | 953 | ||
| 952 | (defvar org-inlinetask-min-level | 954 | (defvar org-inlinetask-min-level |
| 953 | (if (featurep 'org-inlinetask) org-inlinetask-min-level 15)) | 955 | (if (featurep 'org-inlinetask) org-inlinetask-min-level 15)) |
| 956 | |||
| 957 | ;;;###autoload | ||
| 954 | (defun org-columns-compute (property) | 958 | (defun org-columns-compute (property) |
| 955 | "Sum the values of property PROPERTY hierarchically, for the entire buffer." | 959 | "Sum the values of property PROPERTY hierarchically, for the entire buffer." |
| 956 | (interactive) | 960 | (interactive) |
| @@ -1054,6 +1058,7 @@ display, or in the #+COLUMNS line of the current buffer." | |||
| 1054 | (setq sum (+ (string-to-number (pop l)) (/ sum 60)))) | 1058 | (setq sum (+ (string-to-number (pop l)) (/ sum 60)))) |
| 1055 | sum))) | 1059 | sum))) |
| 1056 | 1060 | ||
| 1061 | ;;;###autoload | ||
| 1057 | (defun org-columns-number-to-string (n fmt &optional printf) | 1062 | (defun org-columns-number-to-string (n fmt &optional printf) |
| 1058 | "Convert a computed column number to a string value, according to FMT." | 1063 | "Convert a computed column number to a string value, according to FMT." |
| 1059 | (cond | 1064 | (cond |
diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el index b714f13a663..a3eb960e134 100644 --- a/lisp/org/org-compat.el +++ b/lisp/org/org-compat.el | |||
| @@ -190,10 +190,12 @@ If DELETE is non-nil, delete all those overlays." | |||
| 190 | found)) | 190 | found)) |
| 191 | 191 | ||
| 192 | (defun org-get-x-clipboard (value) | 192 | (defun org-get-x-clipboard (value) |
| 193 | "Get the value of the x clipboard, compatible with XEmacs, and GNU Emacs 21." | 193 | "Get the value of the x or Windows clipboard, compatible with XEmacs, and GNU Emacs 21." |
| 194 | (if (eq window-system 'x) | 194 | (cond ((eq window-system 'x) |
| 195 | (let ((x (org-get-x-clipboard-compat value))) | 195 | (let ((x (org-get-x-clipboard-compat value))) |
| 196 | (if x (org-no-properties x))))) | 196 | (if x (org-no-properties x)))) |
| 197 | ((and (eq window-system 'w32) (fboundp 'w32-get-clipboard-data)) | ||
| 198 | (w32-get-clipboard-data)))) | ||
| 197 | 199 | ||
| 198 | (defsubst org-decompose-region (beg end) | 200 | (defsubst org-decompose-region (beg end) |
| 199 | "Decompose from BEG to END." | 201 | "Decompose from BEG to END." |
diff --git a/lisp/org/org-crypt.el b/lisp/org/org-crypt.el index b02a7ceffbd..2024144fa57 100644 --- a/lisp/org/org-crypt.el +++ b/lisp/org/org-crypt.el | |||
| @@ -73,6 +73,8 @@ | |||
| 73 | compress-algorithm)) | 73 | compress-algorithm)) |
| 74 | (declare-function epg-encrypt-string "epg" | 74 | (declare-function epg-encrypt-string "epg" |
| 75 | (context plain recipients &optional sign always-trust)) | 75 | (context plain recipients &optional sign always-trust)) |
| 76 | (defvar epg-context) | ||
| 77 | |||
| 76 | 78 | ||
| 77 | (defgroup org-crypt nil | 79 | (defgroup org-crypt nil |
| 78 | "Org Crypt." | 80 | "Org Crypt." |
| @@ -161,8 +163,8 @@ See `org-crypt-disable-auto-save'." | |||
| 161 | (if (and (string= crypt-key (get-text-property 0 'org-crypt-key str)) | 163 | (if (and (string= crypt-key (get-text-property 0 'org-crypt-key str)) |
| 162 | (string= (sha1 str) (get-text-property 0 'org-crypt-checksum str))) | 164 | (string= (sha1 str) (get-text-property 0 'org-crypt-checksum str))) |
| 163 | (get-text-property 0 'org-crypt-text str) | 165 | (get-text-property 0 'org-crypt-text str) |
| 164 | (let ((epg-context (epg-make-context nil t t))) | 166 | (set (make-local-variable 'epg-context) (epg-make-context nil t t)) |
| 165 | (epg-encrypt-string epg-context str (epg-list-keys epg-context crypt-key))))) | 167 | (epg-encrypt-string epg-context str (epg-list-keys epg-context crypt-key)))) |
| 166 | 168 | ||
| 167 | (defun org-encrypt-entry () | 169 | (defun org-encrypt-entry () |
| 168 | "Encrypt the content of the current headline." | 170 | "Encrypt the content of the current headline." |
| @@ -170,11 +172,11 @@ See `org-crypt-disable-auto-save'." | |||
| 170 | (require 'epg) | 172 | (require 'epg) |
| 171 | (save-excursion | 173 | (save-excursion |
| 172 | (org-back-to-heading t) | 174 | (org-back-to-heading t) |
| 175 | (set (make-local-variable 'epg-context) (epg-make-context nil t t)) | ||
| 173 | (let ((start-heading (point))) | 176 | (let ((start-heading (point))) |
| 174 | (forward-line) | 177 | (forward-line) |
| 175 | (when (not (looking-at "-----BEGIN PGP MESSAGE-----")) | 178 | (when (not (looking-at "-----BEGIN PGP MESSAGE-----")) |
| 176 | (let ((folded (outline-invisible-p)) | 179 | (let ((folded (outline-invisible-p)) |
| 177 | (epg-context (epg-make-context nil t t)) | ||
| 178 | (crypt-key (org-crypt-key-for-heading)) | 180 | (crypt-key (org-crypt-key-for-heading)) |
| 179 | (beg (point)) | 181 | (beg (point)) |
| 180 | end encrypted-text) | 182 | end encrypted-text) |
| @@ -206,11 +208,11 @@ See `org-crypt-disable-auto-save'." | |||
| 206 | (forward-line) | 208 | (forward-line) |
| 207 | (when (looking-at "-----BEGIN PGP MESSAGE-----") | 209 | (when (looking-at "-----BEGIN PGP MESSAGE-----") |
| 208 | (org-crypt-check-auto-save) | 210 | (org-crypt-check-auto-save) |
| 211 | (set (make-local-variable 'epg-context) (epg-make-context nil t t)) | ||
| 209 | (let* ((end (save-excursion | 212 | (let* ((end (save-excursion |
| 210 | (search-forward "-----END PGP MESSAGE-----") | 213 | (search-forward "-----END PGP MESSAGE-----") |
| 211 | (forward-line) | 214 | (forward-line) |
| 212 | (point))) | 215 | (point))) |
| 213 | (epg-context (epg-make-context nil t t)) | ||
| 214 | (encrypted-text (buffer-substring-no-properties (point) end)) | 216 | (encrypted-text (buffer-substring-no-properties (point) end)) |
| 215 | (decrypted-text | 217 | (decrypted-text |
| 216 | (decode-coding-string | 218 | (decode-coding-string |
diff --git a/lisp/org/org-docview.el b/lisp/org/org-docview.el index 72ccc46d62a..8e61c8ab1df 100644 --- a/lisp/org/org-docview.el +++ b/lisp/org/org-docview.el | |||
| @@ -44,12 +44,10 @@ | |||
| 44 | 44 | ||
| 45 | 45 | ||
| 46 | (require 'org) | 46 | (require 'org) |
| 47 | (require 'doc-view) | ||
| 47 | 48 | ||
| 48 | (declare-function doc-view-goto-page "ext:doc-view" (page)) | 49 | (declare-function doc-view-goto-page "doc-view" (page)) |
| 49 | (declare-function image-mode-window-get "ext:image-mode" | 50 | (declare-function image-mode-window-get "image-mode" (prop &optional winprops)) |
| 50 | (prop &optional winprops)) | ||
| 51 | |||
| 52 | (org-autoload "doc-view" '(doc-view-goto-page)) | ||
| 53 | 51 | ||
| 54 | (org-add-link-type "docview" 'org-docview-open 'org-docview-export) | 52 | (org-add-link-type "docview" 'org-docview-open 'org-docview-export) |
| 55 | (add-hook 'org-store-link-functions 'org-docview-store-link) | 53 | (add-hook 'org-store-link-functions 'org-docview-store-link) |
diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el index 55efb500843..61623833f77 100644 --- a/lisp/org/org-element.el +++ b/lisp/org/org-element.el | |||
| @@ -143,10 +143,12 @@ | |||
| 143 | "$" "\\|" | 143 | "$" "\\|" |
| 144 | ;; Tables (any type). | 144 | ;; Tables (any type). |
| 145 | "\\(?:|\\|\\+-[-+]\\)" "\\|" | 145 | "\\(?:|\\|\\+-[-+]\\)" "\\|" |
| 146 | ;; Blocks (any type), Babel calls, drawers (any type), | 146 | ;; Blocks (any type), Babel calls and keywords. Note: this |
| 147 | ;; fixed-width areas and keywords. Note: this is only an | 147 | ;; is only an indication and need some thorough check. |
| 148 | ;; indication and need some thorough check. | 148 | "#\\(?:[+ ]\\|$\\)" "\\|" |
| 149 | "[#:]" "\\|" | 149 | ;; Drawers (any type) and fixed-width areas. This is also |
| 150 | ;; only an indication. | ||
| 151 | ":" "\\|" | ||
| 150 | ;; Horizontal rules. | 152 | ;; Horizontal rules. |
| 151 | "-\\{5,\\}[ \t]*$" "\\|" | 153 | "-\\{5,\\}[ \t]*$" "\\|" |
| 152 | ;; LaTeX environments. | 154 | ;; LaTeX environments. |
diff --git a/lisp/org/org-id.el b/lisp/org/org-id.el index f1fa05bdc70..37f6e70e821 100644 --- a/lisp/org/org-id.el +++ b/lisp/org/org-id.el | |||
| @@ -233,6 +233,7 @@ With optional argument FORCE, force the creation of a new ID." | |||
| 233 | (org-entry-put (point) "ID" nil)) | 233 | (org-entry-put (point) "ID" nil)) |
| 234 | (org-id-get (point) 'create)) | 234 | (org-id-get (point) 'create)) |
| 235 | 235 | ||
| 236 | ;;;###autoload | ||
| 236 | (defun org-id-copy () | 237 | (defun org-id-copy () |
| 237 | "Copy the ID of the entry at point to the kill ring. | 238 | "Copy the ID of the entry at point to the kill ring. |
| 238 | Create an ID if necessary." | 239 | Create an ID if necessary." |
| @@ -258,6 +259,7 @@ In any case, the ID of the entry is returned." | |||
| 258 | (org-id-add-location id (buffer-file-name (buffer-base-buffer))) | 259 | (org-id-add-location id (buffer-file-name (buffer-base-buffer))) |
| 259 | id))))) | 260 | id))))) |
| 260 | 261 | ||
| 262 | ;;;###autoload | ||
| 261 | (defun org-id-get-with-outline-path-completion (&optional targets) | 263 | (defun org-id-get-with-outline-path-completion (&optional targets) |
| 262 | "Use `outline-path-completion' to retrieve the ID of an entry. | 264 | "Use `outline-path-completion' to retrieve the ID of an entry. |
| 263 | TARGETS may be a setting for `org-refile-targets' to define | 265 | TARGETS may be a setting for `org-refile-targets' to define |
| @@ -274,6 +276,7 @@ If necessary, the ID is created." | |||
| 274 | (prog1 (org-id-get pom 'create) | 276 | (prog1 (org-id-get pom 'create) |
| 275 | (move-marker pom nil)))) | 277 | (move-marker pom nil)))) |
| 276 | 278 | ||
| 279 | ;;;###autoload | ||
| 277 | (defun org-id-get-with-outline-drilling (&optional targets) | 280 | (defun org-id-get-with-outline-drilling (&optional targets) |
| 278 | "Use an outline-cycling interface to retrieve the ID of an entry. | 281 | "Use an outline-cycling interface to retrieve the ID of an entry. |
| 279 | This only finds entries in the current buffer, using `org-get-location'. | 282 | This only finds entries in the current buffer, using `org-get-location'. |
| @@ -320,6 +323,7 @@ With optional argument MARKERP, return the position as a new marker." | |||
| 320 | 323 | ||
| 321 | ;; Creating new IDs | 324 | ;; Creating new IDs |
| 322 | 325 | ||
| 326 | ;;;###autoload | ||
| 323 | (defun org-id-new (&optional prefix) | 327 | (defun org-id-new (&optional prefix) |
| 324 | "Create a new globally unique ID. | 328 | "Create a new globally unique ID. |
| 325 | 329 | ||
diff --git a/lisp/org/org-macs.el b/lisp/org/org-macs.el index 0083d293edc..4afbace56c1 100644 --- a/lisp/org/org-macs.el +++ b/lisp/org/org-macs.el | |||
| @@ -283,14 +283,6 @@ we turn off invisibility temporarily. Use this in a `let' form." | |||
| 283 | (<= (match-beginning n) pos) | 283 | (<= (match-beginning n) pos) |
| 284 | (>= (match-end n) pos))) | 284 | (>= (match-end n) pos))) |
| 285 | 285 | ||
| 286 | (defun org-autoload (file functions) | ||
| 287 | "Establish autoload for all FUNCTIONS in FILE, if not bound already." | ||
| 288 | (let ((d (format "Documentation will be available after `%s.el' is loaded." | ||
| 289 | file)) | ||
| 290 | f) | ||
| 291 | (while (setq f (pop functions)) | ||
| 292 | (or (fboundp f) (autoload f file d t))))) | ||
| 293 | |||
| 294 | (defun org-match-line (re) | 286 | (defun org-match-line (re) |
| 295 | "Looking-at at the beginning of the current line." | 287 | "Looking-at at the beginning of the current line." |
| 296 | (save-excursion | 288 | (save-excursion |
diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index 1ef90443935..8418cf6fbd1 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el | |||
| @@ -915,6 +915,7 @@ When nil, simply write \"#ERROR\" in corrupted fields.") | |||
| 915 | (setq org-table-may-need-update nil) | 915 | (setq org-table-may-need-update nil) |
| 916 | )) | 916 | )) |
| 917 | 917 | ||
| 918 | ;;;###autoload | ||
| 918 | (defun org-table-begin (&optional table-type) | 919 | (defun org-table-begin (&optional table-type) |
| 919 | "Find the beginning of the table and return its position. | 920 | "Find the beginning of the table and return its position. |
| 920 | With argument TABLE-TYPE, go to the beginning of a table.el-type table." | 921 | With argument TABLE-TYPE, go to the beginning of a table.el-type table." |
| @@ -928,6 +929,7 @@ With argument TABLE-TYPE, go to the beginning of a table.el-type table." | |||
| 928 | (beginning-of-line 2) | 929 | (beginning-of-line 2) |
| 929 | (point)))) | 930 | (point)))) |
| 930 | 931 | ||
| 932 | ;;;###autoload | ||
| 931 | (defun org-table-end (&optional table-type) | 933 | (defun org-table-end (&optional table-type) |
| 932 | "Find the end of the table and return its position. | 934 | "Find the end of the table and return its position. |
| 933 | With argument TABLE-TYPE, go to the end of a table.el-type table." | 935 | With argument TABLE-TYPE, go to the end of a table.el-type table." |
| @@ -1199,6 +1201,7 @@ Return t when the line exists, nil if it does not exist." | |||
| 1199 | (< (setq cnt (1+ cnt)) N))) | 1201 | (< (setq cnt (1+ cnt)) N))) |
| 1200 | (= cnt N))) | 1202 | (= cnt N))) |
| 1201 | 1203 | ||
| 1204 | ;;;###autoload | ||
| 1202 | (defun org-table-blank-field () | 1205 | (defun org-table-blank-field () |
| 1203 | "Blank the current table field or active region." | 1206 | "Blank the current table field or active region." |
| 1204 | (interactive) | 1207 | (interactive) |
| @@ -4121,7 +4124,7 @@ to execute outside of tables." | |||
| 4121 | '(arg) | 4124 | '(arg) |
| 4122 | (concat "In tables, run `" (symbol-name fun) "'.\n" | 4125 | (concat "In tables, run `" (symbol-name fun) "'.\n" |
| 4123 | "Outside of tables, run the binding of `" | 4126 | "Outside of tables, run the binding of `" |
| 4124 | (mapconcat (lambda (x) (format "%s" x)) keys "' or `") | 4127 | (mapconcat #'key-description keys "' or `") |
| 4125 | "'.") | 4128 | "'.") |
| 4126 | '(interactive "p") | 4129 | '(interactive "p") |
| 4127 | (list 'if | 4130 | (list 'if |
diff --git a/lisp/org/org.el b/lisp/org/org.el index 50d3842e03d..adaabebc6a5 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el | |||
| @@ -309,7 +309,7 @@ When MESSAGE is non-nil, display a message with the version." | |||
| 309 | (if here | 309 | (if here |
| 310 | (insert version) | 310 | (insert version) |
| 311 | (message version)) | 311 | (message version)) |
| 312 | (if message (message _version)) | 312 | (if message (message version1)) |
| 313 | version1))) | 313 | version1))) |
| 314 | 314 | ||
| 315 | (defconst org-version (org-version)) | 315 | (defconst org-version (org-version)) |
| @@ -654,11 +654,17 @@ the following lines anywhere in the buffer: | |||
| 654 | 654 | ||
| 655 | (defcustom org-use-sub-superscripts t | 655 | (defcustom org-use-sub-superscripts t |
| 656 | "Non-nil means interpret \"_\" and \"^\" for display. | 656 | "Non-nil means interpret \"_\" and \"^\" for display. |
| 657 | When this option is turned on, you can use TeX-like syntax for sub- and | 657 | |
| 658 | superscripts. Several characters after \"_\" or \"^\" will be | 658 | If you want to control how Org exports those characters, see |
| 659 | considered as a single item - so grouping with {} is normally not | 659 | `org-export-with-sub-superscripts'. `org-use-sub-superscripts' |
| 660 | needed. For example, the following things will be parsed as single | 660 | used to be an alias for `org-export-with-sub-superscripts' in |
| 661 | sub- or superscripts. | 661 | Org <8.0, it is not anymore. |
| 662 | |||
| 663 | When this option is turned on, you can use TeX-like syntax for | ||
| 664 | sub- and superscripts within the buffer. Several characters after | ||
| 665 | \"_\" or \"^\" will be considered as a single item - so grouping | ||
| 666 | with {} is normally not needed. For example, the following things | ||
| 667 | will be parsed as single sub- or superscripts: | ||
| 662 | 668 | ||
| 663 | 10^24 or 10^tau several digits will be considered 1 item. | 669 | 10^24 or 10^tau several digits will be considered 1 item. |
| 664 | 10^-12 or 10^-tau a leading sign with digits or a word | 670 | 10^-12 or 10^-tau a leading sign with digits or a word |
| @@ -666,13 +672,14 @@ sub- or superscripts. | |||
| 666 | terminated by almost any nonword/nondigit char. | 672 | terminated by almost any nonword/nondigit char. |
| 667 | x_{i^2} or x^(2-i) braces or parenthesis do grouping. | 673 | x_{i^2} or x^(2-i) braces or parenthesis do grouping. |
| 668 | 674 | ||
| 669 | Still, ambiguity is possible - so when in doubt use {} to enclose | 675 | Still, ambiguity is possible. So when in doubt, use {} to enclose |
| 670 | the sub/superscript. If you set this variable to the symbol | 676 | the sub/superscript. If you set this variable to the symbol `{}', |
| 671 | `{}', the braces are *required* in order to trigger | 677 | the braces are *required* in order to trigger interpretations as |
| 672 | interpretations as sub/superscript. This can be helpful in | 678 | sub/superscript. This can be helpful in documents that need \"_\" |
| 673 | documents that need \"_\" frequently in plain text." | 679 | frequently in plain text." |
| 674 | :group 'org-startup | 680 | :group 'org-startup |
| 675 | :version "24.1" | 681 | :version "24.4" |
| 682 | :package-version '(Org . "8.0") | ||
| 676 | :type '(choice | 683 | :type '(choice |
| 677 | (const :tag "Always interpret" t) | 684 | (const :tag "Always interpret" t) |
| 678 | (const :tag "Only with braces" {}) | 685 | (const :tag "Only with braces" {}) |
| @@ -1731,7 +1738,12 @@ In tables, the special behavior of RET has precedence." | |||
| 1731 | A longer mouse click will still set point. Does not work on XEmacs. | 1738 | A longer mouse click will still set point. Does not work on XEmacs. |
| 1732 | Needs to be set before org.el is loaded." | 1739 | Needs to be set before org.el is loaded." |
| 1733 | :group 'org-link-follow | 1740 | :group 'org-link-follow |
| 1734 | :type 'boolean) | 1741 | :version "24.4" |
| 1742 | :package-version '(Org . "8.3") | ||
| 1743 | :type '(choice | ||
| 1744 | (const :tag "A double click follows the link" 'double) | ||
| 1745 | (const :tag "Unconditionally follow the link with mouse-1" t) | ||
| 1746 | (integer :tag "mouse-1 click does not follow the link if longer than N ms" 450))) | ||
| 1735 | 1747 | ||
| 1736 | (defcustom org-mark-ring-length 4 | 1748 | (defcustom org-mark-ring-length 4 |
| 1737 | "Number of different positions to be recorded in the ring. | 1749 | "Number of different positions to be recorded in the ring. |
| @@ -2663,12 +2675,12 @@ agenda log mode depends on the format of these entries." | |||
| 2663 | "Heading when changing todo state (todo sequence only)" | 2675 | "Heading when changing todo state (todo sequence only)" |
| 2664 | state) string) | 2676 | state) string) |
| 2665 | (cons (const :tag "Heading when just taking a note" note) string) | 2677 | (cons (const :tag "Heading when just taking a note" note) string) |
| 2666 | (cons (const :tag "Heading when clocking out" clock-out) string) | ||
| 2667 | (cons (const :tag "Heading when an item is no longer scheduled" delschedule) string) | ||
| 2668 | (cons (const :tag "Heading when rescheduling" reschedule) string) | 2678 | (cons (const :tag "Heading when rescheduling" reschedule) string) |
| 2679 | (cons (const :tag "Heading when an item is no longer scheduled" delschedule) string) | ||
| 2669 | (cons (const :tag "Heading when changing deadline" redeadline) string) | 2680 | (cons (const :tag "Heading when changing deadline" redeadline) string) |
| 2670 | (cons (const :tag "Heading when deleting a deadline" deldeadline) string) | 2681 | (cons (const :tag "Heading when deleting a deadline" deldeadline) string) |
| 2671 | (cons (const :tag "Heading when refiling" refile) string))) | 2682 | (cons (const :tag "Heading when refiling" refile) string) |
| 2683 | (cons (const :tag "Heading when clocking out" clock-out) string))) | ||
| 2672 | 2684 | ||
| 2673 | (unless (assq 'note org-log-note-headings) | 2685 | (unless (assq 'note org-log-note-headings) |
| 2674 | (push '(note . "%t") org-log-note-headings)) | 2686 | (push '(note . "%t") org-log-note-headings)) |
| @@ -4242,12 +4254,6 @@ Normal means, no org-mode-specific context." | |||
| 4242 | "Detect the first line outside a table when searching from within it. | 4254 | "Detect the first line outside a table when searching from within it. |
| 4243 | This works for both table types.") | 4255 | This works for both table types.") |
| 4244 | 4256 | ||
| 4245 | ;; Autoload the functions in org-table.el that are needed by functions here. | ||
| 4246 | |||
| 4247 | (eval-and-compile | ||
| 4248 | (org-autoload "org-table" | ||
| 4249 | '(org-table-begin org-table-blank-field org-table-end))) | ||
| 4250 | |||
| 4251 | (defconst org-TBLFM-regexp "^[ \t]*#\\+TBLFM: " | 4257 | (defconst org-TBLFM-regexp "^[ \t]*#\\+TBLFM: " |
| 4252 | "Detect a #+TBLFM line.") | 4258 | "Detect a #+TBLFM line.") |
| 4253 | 4259 | ||
| @@ -4328,12 +4334,6 @@ If TABLE-TYPE is non-nil, also check for table.el-type tables." | |||
| 4328 | (re-search-forward org-table-any-border-regexp nil 1)))) | 4334 | (re-search-forward org-table-any-border-regexp nil 1)))) |
| 4329 | (unless quietly (message "Mapping tables: done"))) | 4335 | (unless quietly (message "Mapping tables: done"))) |
| 4330 | 4336 | ||
| 4331 | ;; Declare and autoload functions from org-agenda.el | ||
| 4332 | |||
| 4333 | (eval-and-compile | ||
| 4334 | (org-autoload "org-agenda" | ||
| 4335 | '(org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item))) | ||
| 4336 | |||
| 4337 | (declare-function org-clock-save-markers-for-cut-and-paste "org-clock" (beg end)) | 4337 | (declare-function org-clock-save-markers-for-cut-and-paste "org-clock" (beg end)) |
| 4338 | (declare-function org-clock-update-mode-line "org-clock" ()) | 4338 | (declare-function org-clock-update-mode-line "org-clock" ()) |
| 4339 | (declare-function org-resolve-clocks "org-clock" | 4339 | (declare-function org-resolve-clocks "org-clock" |
| @@ -4359,11 +4359,6 @@ If TABLE-TYPE is non-nil, also check for table.el-type tables." | |||
| 4359 | Return nil if no clock is running." | 4359 | Return nil if no clock is running." |
| 4360 | (marker-buffer org-clock-marker)) | 4360 | (marker-buffer org-clock-marker)) |
| 4361 | 4361 | ||
| 4362 | (eval-and-compile | ||
| 4363 | (org-autoload "org-clock" '(org-clock-remove-overlays | ||
| 4364 | org-clock-update-time-maybe | ||
| 4365 | org-clocktable-shift))) | ||
| 4366 | |||
| 4367 | (defun org-check-running-clock () | 4362 | (defun org-check-running-clock () |
| 4368 | "Check if the current buffer contains the running clock. | 4363 | "Check if the current buffer contains the running clock. |
| 4369 | If yes, offer to stop it and to save the buffer with the changes." | 4364 | If yes, offer to stop it and to save the buffer with the changes." |
| @@ -4563,33 +4558,18 @@ Otherwise, these types are allowed: | |||
| 4563 | 4558 | ||
| 4564 | (defalias 'org-advertized-archive-subtree 'org-archive-subtree) | 4559 | (defalias 'org-advertized-archive-subtree 'org-archive-subtree) |
| 4565 | 4560 | ||
| 4566 | (eval-and-compile | 4561 | ;; Declare Column View Code |
| 4567 | (org-autoload "org-archive" | ||
| 4568 | '(org-add-archive-files))) | ||
| 4569 | |||
| 4570 | ;; Autoload Column View Code | ||
| 4571 | 4562 | ||
| 4572 | (declare-function org-columns-number-to-string "org-colview" (n fmt &optional printf)) | 4563 | (declare-function org-columns-number-to-string "org-colview" (n fmt &optional printf)) |
| 4573 | (declare-function org-columns-get-format-and-top-level "org-colview" ()) | 4564 | (declare-function org-columns-get-format-and-top-level "org-colview" ()) |
| 4574 | (declare-function org-columns-compute "org-colview" (property)) | 4565 | (declare-function org-columns-compute "org-colview" (property)) |
| 4575 | 4566 | ||
| 4576 | (org-autoload (if (featurep 'xemacs) "org-colview-xemacs" "org-colview") | 4567 | ;; Declare ID code |
| 4577 | '(org-columns-number-to-string | ||
| 4578 | org-columns-get-format-and-top-level | ||
| 4579 | org-columns-compute | ||
| 4580 | org-columns-remove-overlays)) | ||
| 4581 | |||
| 4582 | ;; Autoload ID code | ||
| 4583 | 4568 | ||
| 4584 | (declare-function org-id-store-link "org-id") | 4569 | (declare-function org-id-store-link "org-id") |
| 4585 | (declare-function org-id-locations-load "org-id") | 4570 | (declare-function org-id-locations-load "org-id") |
| 4586 | (declare-function org-id-locations-save "org-id") | 4571 | (declare-function org-id-locations-save "org-id") |
| 4587 | (defvar org-id-track-globally) | 4572 | (defvar org-id-track-globally) |
| 4588 | (org-autoload "org-id" | ||
| 4589 | '(org-id-new | ||
| 4590 | org-id-copy | ||
| 4591 | org-id-get-with-outline-path-completion | ||
| 4592 | org-id-get-with-outline-drilling)) | ||
| 4593 | 4573 | ||
| 4594 | ;;; Variables for pre-computed regular expressions, all buffer local | 4574 | ;;; Variables for pre-computed regular expressions, all buffer local |
| 4595 | 4575 | ||
| @@ -8850,13 +8830,13 @@ If WITH-CASE is non-nil, the sorting will be case-sensitive." | |||
| 8850 | ;; command. There might be problems if any of the keys is otherwise | 8830 | ;; command. There might be problems if any of the keys is otherwise |
| 8851 | ;; used as a prefix key. | 8831 | ;; used as a prefix key. |
| 8852 | 8832 | ||
| 8853 | (defcustom orgstruct-heading-prefix-regexp nil | 8833 | (defcustom orgstruct-heading-prefix-regexp "" |
| 8854 | "Regexp that matches the custom prefix of Org headlines in | 8834 | "Regexp that matches the custom prefix of Org headlines in |
| 8855 | orgstruct(++)-mode." | 8835 | orgstruct(++)-mode." |
| 8856 | :group 'org | 8836 | :group 'org |
| 8857 | :version "24.4" | 8837 | :version "24.4" |
| 8858 | :package-version '(Org . "8.0") | 8838 | :package-version '(Org . "8.3") |
| 8859 | :type 'string) | 8839 | :type 'regexp) |
| 8860 | ;;;###autoload(put 'orgstruct-heading-prefix-regexp 'safe-local-variable 'stringp) | 8840 | ;;;###autoload(put 'orgstruct-heading-prefix-regexp 'safe-local-variable 'stringp) |
| 8861 | 8841 | ||
| 8862 | (defcustom orgstruct-setup-hook nil | 8842 | (defcustom orgstruct-setup-hook nil |
| @@ -9017,8 +8997,8 @@ buffer. It will also recognize item context in multiline items." | |||
| 9017 | "Create a function for binding in the structure minor mode. | 8997 | "Create a function for binding in the structure minor mode. |
| 9018 | FUN is the command to call inside a table. KEY is the key that | 8998 | FUN is the command to call inside a table. KEY is the key that |
| 9019 | should be checked in for a command to execute outside of tables. | 8999 | should be checked in for a command to execute outside of tables. |
| 9020 | Non-nil DISABLE-WHEN-HEADING-PREFIX means to disable the command | 9000 | Non-nil `disable-when-heading-prefix' means to disable the command |
| 9021 | if `orgstruct-heading-prefix-regexp' is non-nil." | 9001 | if `orgstruct-heading-prefix-regexp' is not empty." |
| 9022 | (let ((name (concat "orgstruct-hijacker-" (symbol-name fun)))) | 9002 | (let ((name (concat "orgstruct-hijacker-" (symbol-name fun)))) |
| 9023 | (let ((nname name) | 9003 | (let ((nname name) |
| 9024 | (i 0)) | 9004 | (i 0)) |
| @@ -9044,14 +9024,13 @@ if `orgstruct-heading-prefix-regexp' is non-nil." | |||
| 9044 | (key-description key) "'." | 9024 | (key-description key) "'." |
| 9045 | (when disable-when-heading-prefix | 9025 | (when disable-when-heading-prefix |
| 9046 | (concat | 9026 | (concat |
| 9047 | "\nIf `orgstruct-heading-prefix-regexp' is non-nil, this command will always fall\n" | 9027 | "\nIf `orgstruct-heading-prefix-regexp' is not empty, this command will always fall\n" |
| 9048 | "back to the default binding due to limitations of Org's implementation of\n" | 9028 | "back to the default binding due to limitations of Org's implementation of\n" |
| 9049 | "`" (symbol-name fun) "'."))) | 9029 | "`" (symbol-name fun) "'."))) |
| 9050 | (interactive "p") | 9030 | (interactive "p") |
| 9051 | (let* ((disable | 9031 | (let* ((disable |
| 9052 | ,(when disable-when-heading-prefix | 9032 | ,(and disable-when-heading-prefix |
| 9053 | '(and orgstruct-heading-prefix-regexp | 9033 | '(not (string= orgstruct-heading-prefix-regexp "")))) |
| 9054 | (not (string= orgstruct-heading-prefix-regexp ""))))) | ||
| 9055 | (fallback | 9034 | (fallback |
| 9056 | (or disable | 9035 | (or disable |
| 9057 | (not | 9036 | (not |
| @@ -15204,103 +15183,102 @@ is a string only get exactly this property. SPECIFIC can be a string, the | |||
| 15204 | specific property we are interested in. Specifying it can speed | 15183 | specific property we are interested in. Specifying it can speed |
| 15205 | things up because then unnecessary parsing is avoided." | 15184 | things up because then unnecessary parsing is avoided." |
| 15206 | (setq which (or which 'all)) | 15185 | (setq which (or which 'all)) |
| 15207 | (org-with-point-at pom | 15186 | (org-with-wide-buffer |
| 15208 | (let ((clockstr (substring org-clock-string 0 -1)) | 15187 | (org-with-point-at pom |
| 15209 | (excluded '("TODO" "TAGS" "ALLTAGS" "PRIORITY" "BLOCKED")) | 15188 | (let ((clockstr (substring org-clock-string 0 -1)) |
| 15210 | (case-fold-search nil) | 15189 | (excluded '("TODO" "TAGS" "ALLTAGS" "PRIORITY" "BLOCKED")) |
| 15211 | beg end range props sum-props key key1 value string clocksum clocksumt) | 15190 | (case-fold-search nil) |
| 15212 | (save-excursion | 15191 | beg end range props sum-props key key1 value string clocksum clocksumt) |
| 15213 | (when (condition-case nil | 15192 | (when (and (derived-mode-p 'org-mode) |
| 15214 | (and (derived-mode-p 'org-mode) (org-back-to-heading t)) | 15193 | (ignore-errors (org-back-to-heading t))) |
| 15215 | (error nil)) | 15194 | (setq beg (point)) |
| 15216 | (setq beg (point)) | 15195 | (setq sum-props (get-text-property (point) 'org-summaries)) |
| 15217 | (setq sum-props (get-text-property (point) 'org-summaries)) | 15196 | (setq clocksum (get-text-property (point) :org-clock-minutes) |
| 15218 | (setq clocksum (get-text-property (point) :org-clock-minutes) | 15197 | clocksumt (get-text-property (point) :org-clock-minutes-today)) |
| 15219 | clocksumt (get-text-property (point) :org-clock-minutes-today)) | 15198 | (outline-next-heading) |
| 15220 | (outline-next-heading) | 15199 | (setq end (point)) |
| 15221 | (setq end (point)) | 15200 | (when (memq which '(all special)) |
| 15222 | (when (memq which '(all special)) | 15201 | ;; Get the special properties, like TODO and tags |
| 15223 | ;; Get the special properties, like TODO and tags | 15202 | (goto-char beg) |
| 15224 | (goto-char beg) | 15203 | (when (and (or (not specific) (string= specific "TODO")) |
| 15225 | (when (and (or (not specific) (string= specific "TODO")) | 15204 | (looking-at org-todo-line-regexp) (match-end 2)) |
| 15226 | (looking-at org-todo-line-regexp) (match-end 2)) | 15205 | (push (cons "TODO" (org-match-string-no-properties 2)) props)) |
| 15227 | (push (cons "TODO" (org-match-string-no-properties 2)) props)) | 15206 | (when (and (or (not specific) (string= specific "PRIORITY")) |
| 15228 | (when (and (or (not specific) (string= specific "PRIORITY")) | 15207 | (looking-at org-priority-regexp)) |
| 15229 | (looking-at org-priority-regexp)) | 15208 | (push (cons "PRIORITY" (org-match-string-no-properties 2)) props)) |
| 15230 | (push (cons "PRIORITY" (org-match-string-no-properties 2)) props)) | 15209 | (when (or (not specific) (string= specific "FILE")) |
| 15231 | (when (or (not specific) (string= specific "FILE")) | 15210 | (push (cons "FILE" buffer-file-name) props)) |
| 15232 | (push (cons "FILE" buffer-file-name) props)) | 15211 | (when (and (or (not specific) (string= specific "TAGS")) |
| 15233 | (when (and (or (not specific) (string= specific "TAGS")) | 15212 | (setq value (org-get-tags-string)) |
| 15234 | (setq value (org-get-tags-string)) | 15213 | (string-match "\\S-" value)) |
| 15235 | (string-match "\\S-" value)) | 15214 | (push (cons "TAGS" value) props)) |
| 15236 | (push (cons "TAGS" value) props)) | 15215 | (when (and (or (not specific) (string= specific "ALLTAGS")) |
| 15237 | (when (and (or (not specific) (string= specific "ALLTAGS")) | 15216 | (setq value (org-get-tags-at))) |
| 15238 | (setq value (org-get-tags-at))) | 15217 | (push (cons "ALLTAGS" (concat ":" (mapconcat 'identity value ":") |
| 15239 | (push (cons "ALLTAGS" (concat ":" (mapconcat 'identity value ":") | 15218 | ":")) |
| 15240 | ":")) | 15219 | props)) |
| 15241 | props)) | 15220 | (when (or (not specific) (string= specific "BLOCKED")) |
| 15242 | (when (or (not specific) (string= specific "BLOCKED")) | 15221 | (push (cons "BLOCKED" (if (org-entry-blocked-p) "t" "")) props)) |
| 15243 | (push (cons "BLOCKED" (if (org-entry-blocked-p) "t" "")) props)) | 15222 | (when (or (not specific) |
| 15244 | (when (or (not specific) | 15223 | (member specific |
| 15245 | (member specific | 15224 | '("SCHEDULED" "DEADLINE" "CLOCK" "CLOSED" |
| 15246 | '("SCHEDULED" "DEADLINE" "CLOCK" "CLOSED" | 15225 | "TIMESTAMP" "TIMESTAMP_IA"))) |
| 15247 | "TIMESTAMP" "TIMESTAMP_IA"))) | 15226 | (catch 'match |
| 15248 | (catch 'match | 15227 | (while (re-search-forward org-maybe-keyword-time-regexp end t) |
| 15249 | (while (re-search-forward org-maybe-keyword-time-regexp end t) | 15228 | (setq key (if (match-end 1) |
| 15250 | (setq key (if (match-end 1) | 15229 | (substring (org-match-string-no-properties 1) |
| 15251 | (substring (org-match-string-no-properties 1) | 15230 | 0 -1)) |
| 15252 | 0 -1)) | 15231 | string (if (equal key clockstr) |
| 15253 | string (if (equal key clockstr) | 15232 | (org-trim |
| 15254 | (org-trim | 15233 | (buffer-substring-no-properties |
| 15255 | (buffer-substring-no-properties | 15234 | (match-beginning 3) (goto-char |
| 15256 | (match-beginning 3) (goto-char | 15235 | (point-at-eol)))) |
| 15257 | (point-at-eol)))) | 15236 | (substring (org-match-string-no-properties 3) |
| 15258 | (substring (org-match-string-no-properties 3) | 15237 | 1 -1))) |
| 15259 | 1 -1))) | 15238 | ;; Get the correct property name from the key. This is |
| 15260 | ;; Get the correct property name from the key. This is | 15239 | ;; necessary if the user has configured time keywords. |
| 15261 | ;; necessary if the user has configured time keywords. | 15240 | (setq key1 (concat key ":")) |
| 15262 | (setq key1 (concat key ":")) | 15241 | (cond |
| 15263 | (cond | 15242 | ((not key) |
| 15264 | ((not key) | 15243 | (setq key |
| 15265 | (setq key | 15244 | (if (= (char-after (match-beginning 3)) ?\[) |
| 15266 | (if (= (char-after (match-beginning 3)) ?\[) | 15245 | "TIMESTAMP_IA" "TIMESTAMP"))) |
| 15267 | "TIMESTAMP_IA" "TIMESTAMP"))) | 15246 | ((equal key1 org-scheduled-string) (setq key "SCHEDULED")) |
| 15268 | ((equal key1 org-scheduled-string) (setq key "SCHEDULED")) | 15247 | ((equal key1 org-deadline-string) (setq key "DEADLINE")) |
| 15269 | ((equal key1 org-deadline-string) (setq key "DEADLINE")) | 15248 | ((equal key1 org-closed-string) (setq key "CLOSED")) |
| 15270 | ((equal key1 org-closed-string) (setq key "CLOSED")) | 15249 | ((equal key1 org-clock-string) (setq key "CLOCK"))) |
| 15271 | ((equal key1 org-clock-string) (setq key "CLOCK"))) | 15250 | (if (and specific (equal key specific) (not (equal key "CLOCK"))) |
| 15272 | (if (and specific (equal key specific) (not (equal key "CLOCK"))) | 15251 | (progn |
| 15273 | (progn | 15252 | (push (cons key string) props) |
| 15274 | (push (cons key string) props) | 15253 | ;; no need to search further if match is found |
| 15275 | ;; no need to search further if match is found | 15254 | (throw 'match t)) |
| 15276 | (throw 'match t)) | 15255 | (when (or (equal key "CLOCK") (not (assoc key props))) |
| 15277 | (when (or (equal key "CLOCK") (not (assoc key props))) | 15256 | (push (cons key string) props))))))) |
| 15278 | (push (cons key string) props))))))) | 15257 | |
| 15279 | 15258 | (when (memq which '(all standard)) | |
| 15280 | (when (memq which '(all standard)) | 15259 | ;; Get the standard properties, like :PROP: ... |
| 15281 | ;; Get the standard properties, like :PROP: ... | 15260 | (setq range (org-get-property-block beg end)) |
| 15282 | (setq range (org-get-property-block beg end)) | 15261 | (when range |
| 15283 | (when range | 15262 | (goto-char (car range)) |
| 15284 | (goto-char (car range)) | 15263 | (while (re-search-forward org-property-re |
| 15285 | (while (re-search-forward org-property-re | 15264 | (cdr range) t) |
| 15286 | (cdr range) t) | 15265 | (setq key (org-match-string-no-properties 2) |
| 15287 | (setq key (org-match-string-no-properties 2) | 15266 | value (org-trim (or (org-match-string-no-properties 3) ""))) |
| 15288 | value (org-trim (or (org-match-string-no-properties 3) ""))) | 15267 | (unless (member key excluded) |
| 15289 | (unless (member key excluded) | 15268 | (push (cons key (or value "")) props))))) |
| 15290 | (push (cons key (or value "")) props))))) | 15269 | (if clocksum |
| 15291 | (if clocksum | 15270 | (push (cons "CLOCKSUM" |
| 15292 | (push (cons "CLOCKSUM" | 15271 | (org-columns-number-to-string (/ (float clocksum) 60.) |
| 15293 | (org-columns-number-to-string (/ (float clocksum) 60.) | 15272 | 'add_times)) |
| 15294 | 'add_times)) | 15273 | props)) |
| 15295 | props)) | 15274 | (if clocksumt |
| 15296 | (if clocksumt | 15275 | (push (cons "CLOCKSUM_T" |
| 15297 | (push (cons "CLOCKSUM_T" | 15276 | (org-columns-number-to-string (/ (float clocksumt) 60.) |
| 15298 | (org-columns-number-to-string (/ (float clocksumt) 60.) | 15277 | 'add_times)) |
| 15299 | 'add_times)) | 15278 | props)) |
| 15300 | props)) | 15279 | (unless (assoc "CATEGORY" props) |
| 15301 | (unless (assoc "CATEGORY" props) | 15280 | (push (cons "CATEGORY" (org-get-category)) props)) |
| 15302 | (push (cons "CATEGORY" (org-get-category)) props)) | 15281 | (append sum-props (nreverse props))))))) |
| 15303 | (append sum-props (nreverse props))))))) | ||
| 15304 | 15282 | ||
| 15305 | (defun org-entry-get (pom property &optional inherit literal-nil) | 15283 | (defun org-entry-get (pom property &optional inherit literal-nil) |
| 15306 | "Get value of PROPERTY for entry or content at point-or-marker POM. | 15284 | "Get value of PROPERTY for entry or content at point-or-marker POM. |
| @@ -15320,30 +15298,32 @@ when a \"nil\" value can supersede a non-nil value higher up the hierarchy." | |||
| 15320 | t)) | 15298 | t)) |
| 15321 | (org-entry-get-with-inheritance property literal-nil) | 15299 | (org-entry-get-with-inheritance property literal-nil) |
| 15322 | (if (member property org-special-properties) | 15300 | (if (member property org-special-properties) |
| 15323 | ;; We need a special property. Use `org-entry-properties' to | 15301 | ;; We need a special property. Use `org-entry-properties' |
| 15324 | ;; retrieve it, but specify the wanted property | 15302 | ;; to retrieve it, but specify the wanted property |
| 15325 | (cdr (assoc property (org-entry-properties nil 'special property))) | 15303 | (cdr (assoc property (org-entry-properties nil 'special property))) |
| 15326 | (let ((range (org-get-property-block))) | 15304 | (org-with-wide-buffer |
| 15327 | (when (and range (not (eq (car range) (cdr range)))) | 15305 | (let ((range (org-get-property-block))) |
| 15328 | (let* ((props (list (or (assoc property org-file-properties) | 15306 | (when (and range (not (eq (car range) (cdr range)))) |
| 15329 | (assoc property org-global-properties) | 15307 | (let* ((props |
| 15330 | (assoc property org-global-properties-fixed)))) | 15308 | (list (or (assoc property org-file-properties) |
| 15331 | (ap (lambda (key) | 15309 | (assoc property org-global-properties) |
| 15332 | (when (re-search-forward | 15310 | (assoc property org-global-properties-fixed)))) |
| 15333 | (org-re-property key) (cdr range) t) | 15311 | (ap (lambda (key) |
| 15334 | (setq props | 15312 | (when (re-search-forward |
| 15335 | (org-update-property-plist | 15313 | (org-re-property key) (cdr range) t) |
| 15336 | key | 15314 | (setq props |
| 15337 | (if (match-end 3) | 15315 | (org-update-property-plist |
| 15338 | (org-match-string-no-properties 3) "") | 15316 | key |
| 15339 | props))))) | 15317 | (if (match-end 3) |
| 15340 | val) | 15318 | (org-match-string-no-properties 3) "") |
| 15341 | (goto-char (car range)) | 15319 | props))))) |
| 15342 | (funcall ap property) | 15320 | val) |
| 15343 | (goto-char (car range)) | 15321 | (goto-char (car range)) |
| 15344 | (while (funcall ap (concat property "+"))) | 15322 | (funcall ap property) |
| 15345 | (setq val (cdr (assoc property props))) | 15323 | (goto-char (car range)) |
| 15346 | (when val (if literal-nil val (org-not-nil val)))))))))) | 15324 | (while (funcall ap (concat property "+"))) |
| 15325 | (setq val (cdr (assoc property props))) | ||
| 15326 | (when val (if literal-nil val (org-not-nil val))))))))))) | ||
| 15347 | 15327 | ||
| 15348 | (defun org-property-or-variable-value (var &optional inherit) | 15328 | (defun org-property-or-variable-value (var &optional inherit) |
| 15349 | "Check if there is a property fixing the value of VAR. | 15329 | "Check if there is a property fixing the value of VAR. |
| @@ -19525,9 +19505,6 @@ because, in this case the deletion might narrow the column." | |||
| 19525 | (put 'org-self-insert-command 'pabbrev-expand-after-command t) | 19505 | (put 'org-self-insert-command 'pabbrev-expand-after-command t) |
| 19526 | (put 'orgtbl-self-insert-command 'pabbrev-expand-after-command t) | 19506 | (put 'orgtbl-self-insert-command 'pabbrev-expand-after-command t) |
| 19527 | 19507 | ||
| 19528 | ;; How to do this: Measure non-white length of current string | ||
| 19529 | ;; If equal to column width, we should realign. | ||
| 19530 | |||
| 19531 | (defun org-remap (map &rest commands) | 19508 | (defun org-remap (map &rest commands) |
| 19532 | "In MAP, remap the functions given in COMMANDS. | 19509 | "In MAP, remap the functions given in COMMANDS. |
| 19533 | COMMANDS is a list of alternating OLDDEF NEWDEF command names." | 19510 | COMMANDS is a list of alternating OLDDEF NEWDEF command names." |
| @@ -20237,10 +20214,17 @@ This command does many different things, depending on context: | |||
| 20237 | (if (save-excursion (beginning-of-line) (looking-at "[ \t]*$")) | 20214 | (if (save-excursion (beginning-of-line) (looking-at "[ \t]*$")) |
| 20238 | (or (run-hook-with-args-until-success 'org-ctrl-c-ctrl-c-final-hook) | 20215 | (or (run-hook-with-args-until-success 'org-ctrl-c-ctrl-c-final-hook) |
| 20239 | (user-error "C-c C-c can do nothing useful at this location")) | 20216 | (user-error "C-c C-c can do nothing useful at this location")) |
| 20240 | ;; When at a link, act according to the parent instead. | 20217 | (case type |
| 20241 | (when (eq type 'link) | 20218 | ;; When at a link, act according to the parent instead. |
| 20242 | (setq context (org-element-property :parent context)) | 20219 | (link (setq context (org-element-property :parent context)) |
| 20243 | (setq type (org-element-type context))) | 20220 | (setq type (org-element-type context))) |
| 20221 | ;; Unsupported object types: check parent element instead. | ||
| 20222 | ((bold code entity export-snippet inline-babel-call inline-src-block | ||
| 20223 | italic latex-fragment line-break macro strike-through subscript | ||
| 20224 | superscript underline verbatim) | ||
| 20225 | (while (and (setq context (org-element-property :parent context)) | ||
| 20226 | (not (memq (setq type (org-element-type context)) | ||
| 20227 | '(paragraph verse-block))))))) | ||
| 20244 | ;; For convenience: at the first line of a paragraph on the | 20228 | ;; For convenience: at the first line of a paragraph on the |
| 20245 | ;; same line as an item, apply function on that item instead. | 20229 | ;; same line as an item, apply function on that item instead. |
| 20246 | (when (eq type 'paragraph) | 20230 | (when (eq type 'paragraph) |
diff --git a/lisp/org/ox-ascii.el b/lisp/org/ox-ascii.el index 5b41d2d3989..55bda8368e0 100644 --- a/lisp/org/ox-ascii.el +++ b/lisp/org/ox-ascii.el | |||
| @@ -336,7 +336,8 @@ Otherwise, place it right after it." | |||
| 336 | :package-version '(Org . "8.0") | 336 | :package-version '(Org . "8.0") |
| 337 | :type 'string) | 337 | :type 'string) |
| 338 | 338 | ||
| 339 | (defcustom org-ascii-format-drawer-function nil | 339 | (defcustom org-ascii-format-drawer-function |
| 340 | (lambda (name contents width) contents) | ||
| 340 | "Function called to format a drawer in ASCII. | 341 | "Function called to format a drawer in ASCII. |
| 341 | 342 | ||
| 342 | The function must accept three parameters: | 343 | The function must accept three parameters: |
| @@ -347,63 +348,32 @@ The function must accept three parameters: | |||
| 347 | The function should return either the string to be exported or | 348 | The function should return either the string to be exported or |
| 348 | nil to ignore the drawer. | 349 | nil to ignore the drawer. |
| 349 | 350 | ||
| 350 | For example, the variable could be set to the following function | 351 | The default value simply returns the value of CONTENTS." |
| 351 | in order to mimic default behaviour: | ||
| 352 | |||
| 353 | \(defun org-ascii-format-drawer-default (name contents width) | ||
| 354 | \"Format a drawer element for ASCII export.\" | ||
| 355 | contents)" | ||
| 356 | :group 'org-export-ascii | 352 | :group 'org-export-ascii |
| 357 | :version "24.4" | 353 | :version "24.4" |
| 358 | :package-version '(Org . "8.0") | 354 | :package-version '(Org . "8.0") |
| 359 | :type 'function) | 355 | :type 'function) |
| 360 | 356 | ||
| 361 | (defcustom org-ascii-format-inlinetask-function nil | 357 | (defcustom org-ascii-format-inlinetask-function |
| 358 | 'org-ascii-format-inlinetask-default | ||
| 362 | "Function called to format an inlinetask in ASCII. | 359 | "Function called to format an inlinetask in ASCII. |
| 363 | 360 | ||
| 364 | The function must accept six parameters: | 361 | The function must accept nine parameters: |
| 365 | TODO the todo keyword, as a string | 362 | TODO the todo keyword, as a string |
| 366 | TODO-TYPE the todo type, a symbol among `todo', `done' and nil. | 363 | TODO-TYPE the todo type, a symbol among `todo', `done' and nil. |
| 367 | PRIORITY the inlinetask priority, as a string | 364 | PRIORITY the inlinetask priority, as a string |
| 368 | NAME the inlinetask name, as a string. | 365 | NAME the inlinetask name, as a string. |
| 369 | TAGS the inlinetask tags, as a list of strings. | 366 | TAGS the inlinetask tags, as a list of strings. |
| 370 | CONTENTS the contents of the inlinetask, as a string. | 367 | CONTENTS the contents of the inlinetask, as a string. |
| 368 | WIDTH the width of the inlinetask, as a number. | ||
| 369 | INLINETASK the inlinetask itself. | ||
| 370 | INFO the info channel. | ||
| 371 | 371 | ||
| 372 | The function should return either the string to be exported or | 372 | The function should return either the string to be exported or |
| 373 | nil to ignore the inline task. | 373 | nil to ignore the inline task." |
| 374 | |||
| 375 | For example, the variable could be set to the following function | ||
| 376 | in order to mimic default behaviour: | ||
| 377 | |||
| 378 | \(defun org-ascii-format-inlinetask-default | ||
| 379 | \(todo type priority name tags contents\) | ||
| 380 | \"Format an inline task element for ASCII export.\" | ||
| 381 | \(let* \(\(utf8p \(eq \(plist-get info :ascii-charset\) 'utf-8\)\) | ||
| 382 | \(width org-ascii-inlinetask-width\) | ||
| 383 | \(org-ascii--indent-string | ||
| 384 | \(concat | ||
| 385 | ;; Top line, with an additional blank line if not in UTF-8. | ||
| 386 | \(make-string width \(if utf8p ?━ ?_\)\) \"\\n\" | ||
| 387 | \(unless utf8p \(concat \(make-string width ? \) \"\\n\"\)\) | ||
| 388 | ;; Add title. Fill it if wider than inlinetask. | ||
| 389 | \(let \(\(title \(org-ascii--build-title inlinetask info width\)\)\) | ||
| 390 | \(if \(<= \(length title\) width\) title | ||
| 391 | \(org-ascii--fill-string title width info\)\)\) | ||
| 392 | \"\\n\" | ||
| 393 | ;; If CONTENTS is not empty, insert it along with | ||
| 394 | ;; a separator. | ||
| 395 | \(when \(org-string-nw-p contents\) | ||
| 396 | \(concat \(make-string width \(if utf8p ?─ ?-\)\) \"\\n\" contents\)\) | ||
| 397 | ;; Bottom line. | ||
| 398 | \(make-string width \(if utf8p ?━ ?_\)\)\) | ||
| 399 | ;; Flush the inlinetask to the right. | ||
| 400 | \(- \(plist-get info :ascii-width\) | ||
| 401 | \(plist-get info :ascii-margin\) | ||
| 402 | \(plist-get info :ascii-inner-margin\) | ||
| 403 | \(org-ascii--current-text-width inlinetask info\)\)" | ||
| 404 | :group 'org-export-ascii | 374 | :group 'org-export-ascii |
| 405 | :version "24.4" | 375 | :version "24.4" |
| 406 | :package-version '(Org . "8.0") | 376 | :package-version '(Org . "8.3") |
| 407 | :type 'function) | 377 | :type 'function) |
| 408 | 378 | ||
| 409 | 379 | ||
| @@ -1071,11 +1041,7 @@ CONTENTS holds the contents of the block. INFO is a plist | |||
| 1071 | holding contextual information." | 1041 | holding contextual information." |
| 1072 | (let ((name (org-element-property :drawer-name drawer)) | 1042 | (let ((name (org-element-property :drawer-name drawer)) |
| 1073 | (width (org-ascii--current-text-width drawer info))) | 1043 | (width (org-ascii--current-text-width drawer info))) |
| 1074 | (if (functionp org-ascii-format-drawer-function) | 1044 | (funcall org-ascii-format-drawer-function name contents width))) |
| 1075 | (funcall org-ascii-format-drawer-function name contents width) | ||
| 1076 | ;; If there's no user defined function: simply | ||
| 1077 | ;; display contents of the drawer. | ||
| 1078 | contents))) | ||
| 1079 | 1045 | ||
| 1080 | 1046 | ||
| 1081 | ;;;; Dynamic Block | 1047 | ;;;; Dynamic Block |
| @@ -1228,55 +1194,58 @@ contextual information." | |||
| 1228 | 1194 | ||
| 1229 | ;;;; Inlinetask | 1195 | ;;;; Inlinetask |
| 1230 | 1196 | ||
| 1197 | (defun org-ascii-format-inlinetask-default | ||
| 1198 | (todo type priority name tags contents width inlinetask info) | ||
| 1199 | "Format an inline task element for ASCII export. | ||
| 1200 | See `org-ascii-format-inlinetask-function' for a description | ||
| 1201 | of the paramaters." | ||
| 1202 | (let* ((utf8p (eq (plist-get info :ascii-charset) 'utf-8)) | ||
| 1203 | (width (or width org-ascii-inlinetask-width))) | ||
| 1204 | (org-ascii--indent-string | ||
| 1205 | (concat | ||
| 1206 | ;; Top line, with an additional blank line if not in UTF-8. | ||
| 1207 | (make-string width (if utf8p ?━ ?_)) "\n" | ||
| 1208 | (unless utf8p (concat (make-string width ? ) "\n")) | ||
| 1209 | ;; Add title. Fill it if wider than inlinetask. | ||
| 1210 | (let ((title (org-ascii--build-title inlinetask info width))) | ||
| 1211 | (if (<= (length title) width) title | ||
| 1212 | (org-ascii--fill-string title width info))) | ||
| 1213 | "\n" | ||
| 1214 | ;; If CONTENTS is not empty, insert it along with | ||
| 1215 | ;; a separator. | ||
| 1216 | (when (org-string-nw-p contents) | ||
| 1217 | (concat (make-string width (if utf8p ?─ ?-)) "\n" contents)) | ||
| 1218 | ;; Bottom line. | ||
| 1219 | (make-string width (if utf8p ?━ ?_))) | ||
| 1220 | ;; Flush the inlinetask to the right. | ||
| 1221 | (- org-ascii-text-width org-ascii-global-margin | ||
| 1222 | (if (not (org-export-get-parent-headline inlinetask)) 0 | ||
| 1223 | org-ascii-inner-margin) | ||
| 1224 | (org-ascii--current-text-width inlinetask info))))) | ||
| 1225 | |||
| 1231 | (defun org-ascii-inlinetask (inlinetask contents info) | 1226 | (defun org-ascii-inlinetask (inlinetask contents info) |
| 1232 | "Transcode an INLINETASK element from Org to ASCII. | 1227 | "Transcode an INLINETASK element from Org to ASCII. |
| 1233 | CONTENTS holds the contents of the block. INFO is a plist | 1228 | CONTENTS holds the contents of the block. INFO is a plist |
| 1234 | holding contextual information." | 1229 | holding contextual information." |
| 1235 | (let ((width (org-ascii--current-text-width inlinetask info))) | 1230 | (let ((width (org-ascii--current-text-width inlinetask info))) |
| 1236 | ;; If `org-ascii-format-inlinetask-function' is provided, call it | 1231 | (funcall org-ascii-format-inlinetask-function |
| 1237 | ;; with appropriate arguments. | 1232 | ;; todo. |
| 1238 | (if (functionp org-ascii-format-inlinetask-function) | 1233 | (and (plist-get info :with-todo-keywords) |
| 1239 | (funcall org-ascii-format-inlinetask-function | 1234 | (let ((todo (org-element-property |
| 1240 | ;; todo. | 1235 | :todo-keyword inlinetask))) |
| 1241 | (and (plist-get info :with-todo-keywords) | 1236 | (and todo (org-export-data todo info)))) |
| 1242 | (let ((todo (org-element-property | 1237 | ;; todo-type |
| 1243 | :todo-keyword inlinetask))) | 1238 | (org-element-property :todo-type inlinetask) |
| 1244 | (and todo (org-export-data todo info)))) | 1239 | ;; priority |
| 1245 | ;; todo-type | 1240 | (and (plist-get info :with-priority) |
| 1246 | (org-element-property :todo-type inlinetask) | 1241 | (org-element-property :priority inlinetask)) |
| 1247 | ;; priority | 1242 | ;; title |
| 1248 | (and (plist-get info :with-priority) | 1243 | (org-export-data (org-element-property :title inlinetask) info) |
| 1249 | (org-element-property :priority inlinetask)) | 1244 | ;; tags |
| 1250 | ;; title | 1245 | (and (plist-get info :with-tags) |
| 1251 | (org-export-data (org-element-property :title inlinetask) info) | 1246 | (org-element-property :tags inlinetask)) |
| 1252 | ;; tags | 1247 | ;; contents and width |
| 1253 | (and (plist-get info :with-tags) | 1248 | contents width inlinetask info))) |
| 1254 | (org-element-property :tags inlinetask)) | ||
| 1255 | ;; contents and width | ||
| 1256 | contents width) | ||
| 1257 | ;; Otherwise, use a default template. | ||
| 1258 | (let* ((utf8p (eq (plist-get info :ascii-charset) 'utf-8))) | ||
| 1259 | (org-ascii--indent-string | ||
| 1260 | (concat | ||
| 1261 | ;; Top line, with an additional blank line if not in UTF-8. | ||
| 1262 | (make-string width (if utf8p ?━ ?_)) "\n" | ||
| 1263 | (unless utf8p (concat (make-string width ? ) "\n")) | ||
| 1264 | ;; Add title. Fill it if wider than inlinetask. | ||
| 1265 | (let ((title (org-ascii--build-title inlinetask info width))) | ||
| 1266 | (if (<= (length title) width) title | ||
| 1267 | (org-ascii--fill-string title width info))) | ||
| 1268 | "\n" | ||
| 1269 | ;; If CONTENTS is not empty, insert it along with | ||
| 1270 | ;; a separator. | ||
| 1271 | (when (org-string-nw-p contents) | ||
| 1272 | (concat (make-string width (if utf8p ?─ ?-)) "\n" contents)) | ||
| 1273 | ;; Bottom line. | ||
| 1274 | (make-string width (if utf8p ?━ ?_))) | ||
| 1275 | ;; Flush the inlinetask to the right. | ||
| 1276 | (- org-ascii-text-width org-ascii-global-margin | ||
| 1277 | (if (not (org-export-get-parent-headline inlinetask)) 0 | ||
| 1278 | org-ascii-inner-margin) | ||
| 1279 | (org-ascii--current-text-width inlinetask info))))))) | ||
| 1280 | 1249 | ||
| 1281 | 1250 | ||
| 1282 | ;;;; Italic | 1251 | ;;;; Italic |
diff --git a/lisp/org/ox-html.el b/lisp/org/ox-html.el index b4094d3e44c..44962a533e5 100644 --- a/lisp/org/ox-html.el +++ b/lisp/org/ox-html.el | |||
| @@ -130,7 +130,9 @@ | |||
| 130 | (:infojs-opt "INFOJS_OPT" nil nil) | 130 | (:infojs-opt "INFOJS_OPT" nil nil) |
| 131 | ;; Redefine regular options. | 131 | ;; Redefine regular options. |
| 132 | (:creator "CREATOR" nil org-html-creator-string) | 132 | (:creator "CREATOR" nil org-html-creator-string) |
| 133 | (:with-latex nil "tex" org-html-with-latex))) | 133 | (:with-latex nil "tex" org-html-with-latex) |
| 134 | ;; Retrieve LaTeX header for fragments. | ||
| 135 | (:latex-header "LATEX_HEADER" nil nil newline))) | ||
| 134 | 136 | ||
| 135 | 137 | ||
| 136 | ;;; Internal Variables | 138 | ;;; Internal Variables |
| @@ -544,6 +546,8 @@ a formatting string to wrap fontified text with. | |||
| 544 | If no association can be found for a given markup, text will be | 546 | If no association can be found for a given markup, text will be |
| 545 | returned as-is." | 547 | returned as-is." |
| 546 | :group 'org-export-html | 548 | :group 'org-export-html |
| 549 | :version "24.4" | ||
| 550 | :package-version '(Org . "8.0") | ||
| 547 | :type '(alist :key-type (symbol :tag "Markup type") | 551 | :type '(alist :key-type (symbol :tag "Markup type") |
| 548 | :value-type (string :tag "Format string")) | 552 | :value-type (string :tag "Format string")) |
| 549 | :options '(bold code italic strike-through underline verbatim)) | 553 | :options '(bold code italic strike-through underline verbatim)) |
| @@ -565,7 +569,8 @@ Warning: non-nil may break indentation of source code blocks." | |||
| 565 | 569 | ||
| 566 | ;;;; Drawers | 570 | ;;;; Drawers |
| 567 | 571 | ||
| 568 | (defcustom org-html-format-drawer-function nil | 572 | (defcustom org-html-format-drawer-function |
| 573 | (lambda (name contents) contents) | ||
| 569 | "Function called to format a drawer in HTML code. | 574 | "Function called to format a drawer in HTML code. |
| 570 | 575 | ||
| 571 | The function must accept two parameters: | 576 | The function must accept two parameters: |
| @@ -577,10 +582,10 @@ The function should return the string to be exported. | |||
| 577 | For example, the variable could be set to the following function | 582 | For example, the variable could be set to the following function |
| 578 | in order to mimic default behaviour: | 583 | in order to mimic default behaviour: |
| 579 | 584 | ||
| 580 | \(defun org-html-format-drawer-default \(name contents\) | 585 | The default value simply returns the value of CONTENTS." |
| 581 | \"Format a drawer element for HTML export.\" | ||
| 582 | contents\)" | ||
| 583 | :group 'org-export-html | 586 | :group 'org-export-html |
| 587 | :version "24.4" | ||
| 588 | :package-version '(Org . "8.0") | ||
| 584 | :type 'function) | 589 | :type 'function) |
| 585 | 590 | ||
| 586 | ;;;; Footnotes | 591 | ;;;; Footnotes |
| @@ -622,7 +627,7 @@ document title." | |||
| 622 | :group 'org-export-html | 627 | :group 'org-export-html |
| 623 | :type 'integer) | 628 | :type 'integer) |
| 624 | 629 | ||
| 625 | (defcustom org-html-format-headline-function nil | 630 | (defcustom org-html-format-headline-function 'ignore |
| 626 | "Function to format headline text. | 631 | "Function to format headline text. |
| 627 | 632 | ||
| 628 | This function will be called with 5 arguments: | 633 | This function will be called with 5 arguments: |
| @@ -634,6 +639,8 @@ TAGS the tags (string or nil). | |||
| 634 | 639 | ||
| 635 | The function result will be used in the section format string." | 640 | The function result will be used in the section format string." |
| 636 | :group 'org-export-html | 641 | :group 'org-export-html |
| 642 | :version "24.4" | ||
| 643 | :package-version '(Org . "8.0") | ||
| 637 | :type 'function) | 644 | :type 'function) |
| 638 | 645 | ||
| 639 | ;;;; HTML-specific | 646 | ;;;; HTML-specific |
| @@ -649,7 +656,7 @@ attributes, when appropriate." | |||
| 649 | 656 | ||
| 650 | ;;;; Inlinetasks | 657 | ;;;; Inlinetasks |
| 651 | 658 | ||
| 652 | (defcustom org-html-format-inlinetask-function nil | 659 | (defcustom org-html-format-inlinetask-function 'ignore |
| 653 | "Function called to format an inlinetask in HTML code. | 660 | "Function called to format an inlinetask in HTML code. |
| 654 | 661 | ||
| 655 | The function must accept six parameters: | 662 | The function must accept six parameters: |
| @@ -662,6 +669,8 @@ The function must accept six parameters: | |||
| 662 | 669 | ||
| 663 | The function should return the string to be exported." | 670 | The function should return the string to be exported." |
| 664 | :group 'org-export-html | 671 | :group 'org-export-html |
| 672 | :version "24.4" | ||
| 673 | :package-version '(Org . "8.0") | ||
| 665 | :type 'function) | 674 | :type 'function) |
| 666 | 675 | ||
| 667 | ;;;; LaTeX | 676 | ;;;; LaTeX |
| @@ -1119,6 +1128,8 @@ like that: \"%%\"." | |||
| 1119 | "Information about the creator of the HTML document. | 1128 | "Information about the creator of the HTML document. |
| 1120 | This option can also be set on with the CREATOR keyword." | 1129 | This option can also be set on with the CREATOR keyword." |
| 1121 | :group 'org-export-html | 1130 | :group 'org-export-html |
| 1131 | :version "24.4" | ||
| 1132 | :package-version '(Org . "8.0") | ||
| 1122 | :type '(string :tag "Creator string")) | 1133 | :type '(string :tag "Creator string")) |
| 1123 | 1134 | ||
| 1124 | ;;;; Template :: Preamble | 1135 | ;;;; Template :: Preamble |
| @@ -1971,7 +1982,8 @@ and value is its relative level, as an integer." | |||
| 1971 | (defun org-html--format-toc-headline (headline info) | 1982 | (defun org-html--format-toc-headline (headline info) |
| 1972 | "Return an appropriate table of contents entry for HEADLINE. | 1983 | "Return an appropriate table of contents entry for HEADLINE. |
| 1973 | INFO is a plist used as a communication channel." | 1984 | INFO is a plist used as a communication channel." |
| 1974 | (let* ((todo (and (plist-get info :with-todo-keywords) | 1985 | (let* ((headline-number (org-export-get-headline-number headline info)) |
| 1986 | (todo (and (plist-get info :with-todo-keywords) | ||
| 1975 | (let ((todo (org-element-property :todo-keyword headline))) | 1987 | (let ((todo (org-element-property :todo-keyword headline))) |
| 1976 | (and todo (org-export-data todo info))))) | 1988 | (and todo (org-export-data todo info))))) |
| 1977 | (todo-type (and todo (org-element-property :todo-type headline))) | 1989 | (todo-type (and todo (org-element-property :todo-type headline))) |
| @@ -1992,19 +2004,23 @@ INFO is a plist used as a communication channel." | |||
| 1992 | (tags (and (eq (plist-get info :with-tags) t) | 2004 | (tags (and (eq (plist-get info :with-tags) t) |
| 1993 | (org-export-get-tags headline info)))) | 2005 | (org-export-get-tags headline info)))) |
| 1994 | (format "<a href=\"#%s\">%s</a>" | 2006 | (format "<a href=\"#%s\">%s</a>" |
| 2007 | ;; Label. | ||
| 1995 | (org-export-solidify-link-text | 2008 | (org-export-solidify-link-text |
| 1996 | (or (org-element-property :CUSTOM_ID headline) | 2009 | (or (org-element-property :CUSTOM_ID headline) |
| 1997 | (concat "sec-" | 2010 | (concat "sec-" |
| 1998 | (mapconcat | 2011 | (mapconcat #'number-to-string headline-number "-")))) |
| 1999 | #'number-to-string | 2012 | ;; Body. |
| 2000 | (org-export-get-headline-number headline info) | 2013 | (concat |
| 2001 | "-")))) | 2014 | (and (not (org-export-low-level-p headline info)) |
| 2002 | (apply (if (functionp org-html-format-headline-function) | 2015 | (org-export-numbered-headline-p headline info) |
| 2003 | (lambda (todo todo-type priority text tags &rest ignore) | 2016 | (concat (mapconcat #'number-to-string headline-number ".") |
| 2004 | (funcall org-html-format-headline-function | 2017 | ". ")) |
| 2005 | todo todo-type priority text tags)) | 2018 | (apply (if (not (eq org-html-format-headline-function 'ignore)) |
| 2006 | #'org-html-format-headline) | 2019 | (lambda (todo todo-type priority text tags &rest ignore) |
| 2007 | todo todo-type priority text tags :section-number nil)))) | 2020 | (funcall org-html-format-headline-function |
| 2021 | todo todo-type priority text tags)) | ||
| 2022 | #'org-html-format-headline) | ||
| 2023 | todo todo-type priority text tags :section-number nil))))) | ||
| 2008 | 2024 | ||
| 2009 | (defun org-html-list-of-listings (info) | 2025 | (defun org-html-list-of-listings (info) |
| 2010 | "Build a list of listings. | 2026 | "Build a list of listings. |
| @@ -2244,7 +2260,7 @@ holding contextual information." | |||
| 2244 | headline-number "-")))) | 2260 | headline-number "-")))) |
| 2245 | (format-function | 2261 | (format-function |
| 2246 | (cond ((functionp format-function) format-function) | 2262 | (cond ((functionp format-function) format-function) |
| 2247 | ((functionp org-html-format-headline-function) | 2263 | ((not (eq org-html-format-headline-function 'ignore)) |
| 2248 | (lambda (todo todo-type priority text tags &rest ignore) | 2264 | (lambda (todo todo-type priority text tags &rest ignore) |
| 2249 | (funcall org-html-format-headline-function | 2265 | (funcall org-html-format-headline-function |
| 2250 | todo todo-type priority text tags))) | 2266 | todo todo-type priority text tags))) |
| @@ -2371,9 +2387,9 @@ contextual information." | |||
| 2371 | CONTENTS holds the contents of the block. INFO is a plist | 2387 | CONTENTS holds the contents of the block. INFO is a plist |
| 2372 | holding contextual information." | 2388 | holding contextual information." |
| 2373 | (cond | 2389 | (cond |
| 2374 | ;; If `org-html-format-inlinetask-function' is provided, call it | 2390 | ;; If `org-html-format-inlinetask-function' is not 'ignore, call it |
| 2375 | ;; with appropriate arguments. | 2391 | ;; with appropriate arguments. |
| 2376 | ((functionp org-html-format-inlinetask-function) | 2392 | ((not (eq org-html-format-inlinetask-function 'ignore)) |
| 2377 | (let ((format-function | 2393 | (let ((format-function |
| 2378 | (function* | 2394 | (function* |
| 2379 | (lambda (todo todo-type priority text tags | 2395 | (lambda (todo todo-type priority text tags |
| @@ -2474,18 +2490,34 @@ CONTENTS is nil. INFO is a plist holding contextual information." | |||
| 2474 | 2490 | ||
| 2475 | ;;;; Latex Environment | 2491 | ;;;; Latex Environment |
| 2476 | 2492 | ||
| 2477 | (defun org-html-format-latex (latex-frag processing-type) | 2493 | (defun org-html-format-latex (latex-frag processing-type info) |
| 2478 | "Format a LaTeX fragment LATEX-FRAG into HTML." | 2494 | "Format a LaTeX fragment LATEX-FRAG into HTML. |
| 2495 | PROCESSING-TYPE designates the tool used for conversion. It is | ||
| 2496 | a symbol among `mathjax', `dvipng', `imagemagick', `verbatim' nil | ||
| 2497 | and t. See `org-html-with-latex' for more information. INFO is | ||
| 2498 | a plist containing export properties." | ||
| 2479 | (let ((cache-relpath "") (cache-dir "")) | 2499 | (let ((cache-relpath "") (cache-dir "")) |
| 2480 | (unless (eq processing-type 'mathjax) | 2500 | (unless (eq processing-type 'mathjax) |
| 2481 | (let ((bfn (or (buffer-file-name) | 2501 | (let ((bfn (or (buffer-file-name) |
| 2482 | (make-temp-name | 2502 | (make-temp-name |
| 2483 | (expand-file-name "latex" temporary-file-directory))))) | 2503 | (expand-file-name "latex" temporary-file-directory)))) |
| 2504 | (latex-header | ||
| 2505 | (let ((header (plist-get info :latex-header))) | ||
| 2506 | (and header | ||
| 2507 | (concat (mapconcat | ||
| 2508 | (lambda (line) (concat "#+LATEX_HEADER: " line)) | ||
| 2509 | (org-split-string header "\n") | ||
| 2510 | "\n") | ||
| 2511 | "\n"))))) | ||
| 2484 | (setq cache-relpath | 2512 | (setq cache-relpath |
| 2485 | (concat "ltxpng/" | 2513 | (concat "ltxpng/" |
| 2486 | (file-name-sans-extension | 2514 | (file-name-sans-extension |
| 2487 | (file-name-nondirectory bfn))) | 2515 | (file-name-nondirectory bfn))) |
| 2488 | cache-dir (file-name-directory bfn)))) | 2516 | cache-dir (file-name-directory bfn)) |
| 2517 | ;; Re-create LaTeX environment from original buffer in | ||
| 2518 | ;; temporary buffer so that dvipng/imagemagick can properly | ||
| 2519 | ;; turn the fragment into an image. | ||
| 2520 | (setq latex-frag (concat latex-header latex-frag)))) | ||
| 2489 | (with-temp-buffer | 2521 | (with-temp-buffer |
| 2490 | (insert latex-frag) | 2522 | (insert latex-frag) |
| 2491 | (org-format-latex cache-relpath cache-dir nil "Creating LaTeX Image..." | 2523 | (org-format-latex cache-relpath cache-dir nil "Creating LaTeX Image..." |
| @@ -2501,9 +2533,10 @@ CONTENTS is nil. INFO is a plist holding contextual information." | |||
| 2501 | (attributes (org-export-read-attribute :attr_html latex-environment))) | 2533 | (attributes (org-export-read-attribute :attr_html latex-environment))) |
| 2502 | (case processing-type | 2534 | (case processing-type |
| 2503 | ((t mathjax) | 2535 | ((t mathjax) |
| 2504 | (org-html-format-latex latex-frag 'mathjax)) | 2536 | (org-html-format-latex latex-frag 'mathjax info)) |
| 2505 | ((dvipng imagemagick) | 2537 | ((dvipng imagemagick) |
| 2506 | (let ((formula-link (org-html-format-latex latex-frag processing-type))) | 2538 | (let ((formula-link |
| 2539 | (org-html-format-latex latex-frag processing-type info))) | ||
| 2507 | (when (and formula-link (string-match "file:\\([^]]*\\)" formula-link)) | 2540 | (when (and formula-link (string-match "file:\\([^]]*\\)" formula-link)) |
| 2508 | ;; Do not provide a caption or a name to be consistent with | 2541 | ;; Do not provide a caption or a name to be consistent with |
| 2509 | ;; `mathjax' handling. | 2542 | ;; `mathjax' handling. |
| @@ -2521,9 +2554,10 @@ CONTENTS is nil. INFO is a plist holding contextual information." | |||
| 2521 | (processing-type (plist-get info :with-latex))) | 2554 | (processing-type (plist-get info :with-latex))) |
| 2522 | (case processing-type | 2555 | (case processing-type |
| 2523 | ((t mathjax) | 2556 | ((t mathjax) |
| 2524 | (org-html-format-latex latex-frag 'mathjax)) | 2557 | (org-html-format-latex latex-frag 'mathjax info)) |
| 2525 | ((dvipng imagemagick) | 2558 | ((dvipng imagemagick) |
| 2526 | (let ((formula-link (org-html-format-latex latex-frag processing-type))) | 2559 | (let ((formula-link |
| 2560 | (org-html-format-latex latex-frag processing-type info))) | ||
| 2527 | (when (and formula-link (string-match "file:\\([^]]*\\)" formula-link)) | 2561 | (when (and formula-link (string-match "file:\\([^]]*\\)" formula-link)) |
| 2528 | (org-html--format-image (match-string 1 formula-link) nil info)))) | 2562 | (org-html--format-image (match-string 1 formula-link) nil info)))) |
| 2529 | (t latex-frag)))) | 2563 | (t latex-frag)))) |
diff --git a/lisp/org/ox-latex.el b/lisp/org/ox-latex.el index 6766b8583f1..3609881b690 100644 --- a/lisp/org/ox-latex.el +++ b/lisp/org/ox-latex.el | |||
| @@ -556,7 +556,8 @@ returned as-is." | |||
| 556 | 556 | ||
| 557 | ;;;; Drawers | 557 | ;;;; Drawers |
| 558 | 558 | ||
| 559 | (defcustom org-latex-format-drawer-function nil | 559 | (defcustom org-latex-format-drawer-function |
| 560 | (lambda (name contents) contents) | ||
| 560 | "Function called to format a drawer in LaTeX code. | 561 | "Function called to format a drawer in LaTeX code. |
| 561 | 562 | ||
| 562 | The function must accept two parameters: | 563 | The function must accept two parameters: |
| @@ -565,19 +566,16 @@ The function must accept two parameters: | |||
| 565 | 566 | ||
| 566 | The function should return the string to be exported. | 567 | The function should return the string to be exported. |
| 567 | 568 | ||
| 568 | For example, the variable could be set to the following function | 569 | The default function simply returns the value of CONTENTS." |
| 569 | in order to mimic default behaviour: | ||
| 570 | |||
| 571 | \(defun org-latex-format-drawer-default \(name contents\) | ||
| 572 | \"Format a drawer element for LaTeX export.\" | ||
| 573 | contents\)" | ||
| 574 | :group 'org-export-latex | 570 | :group 'org-export-latex |
| 571 | :version "24.4" | ||
| 572 | :package-version '(Org . "8.3") | ||
| 575 | :type 'function) | 573 | :type 'function) |
| 576 | 574 | ||
| 577 | 575 | ||
| 578 | ;;;; Inlinetasks | 576 | ;;;; Inlinetasks |
| 579 | 577 | ||
| 580 | (defcustom org-latex-format-inlinetask-function nil | 578 | (defcustom org-latex-format-inlinetask-function 'ignore |
| 581 | "Function called to format an inlinetask in LaTeX code. | 579 | "Function called to format an inlinetask in LaTeX code. |
| 582 | 580 | ||
| 583 | The function must accept six parameters: | 581 | The function must accept six parameters: |
| @@ -1212,12 +1210,8 @@ channel." | |||
| 1212 | CONTENTS holds the contents of the block. INFO is a plist | 1210 | CONTENTS holds the contents of the block. INFO is a plist |
| 1213 | holding contextual information." | 1211 | holding contextual information." |
| 1214 | (let* ((name (org-element-property :drawer-name drawer)) | 1212 | (let* ((name (org-element-property :drawer-name drawer)) |
| 1215 | (output (if (functionp org-latex-format-drawer-function) | 1213 | (output (funcall org-latex-format-drawer-function |
| 1216 | (funcall org-latex-format-drawer-function | 1214 | name contents))) |
| 1217 | name contents) | ||
| 1218 | ;; If there's no user defined function: simply | ||
| 1219 | ;; display contents of the drawer. | ||
| 1220 | contents))) | ||
| 1221 | (org-latex--wrap-label drawer output))) | 1215 | (org-latex--wrap-label drawer output))) |
| 1222 | 1216 | ||
| 1223 | 1217 | ||
| @@ -1502,7 +1496,7 @@ holding contextual information." | |||
| 1502 | (org-element-property :priority inlinetask)))) | 1496 | (org-element-property :priority inlinetask)))) |
| 1503 | ;; If `org-latex-format-inlinetask-function' is provided, call it | 1497 | ;; If `org-latex-format-inlinetask-function' is provided, call it |
| 1504 | ;; with appropriate arguments. | 1498 | ;; with appropriate arguments. |
| 1505 | (if (functionp org-latex-format-inlinetask-function) | 1499 | (if (not (eq org-latex-format-inlinetask-function 'ignore)) |
| 1506 | (funcall org-latex-format-inlinetask-function | 1500 | (funcall org-latex-format-inlinetask-function |
| 1507 | todo todo-type priority title tags contents) | 1501 | todo todo-type priority title tags contents) |
| 1508 | ;; Otherwise, use a default template. | 1502 | ;; Otherwise, use a default template. |
diff --git a/lisp/org/ox-odt.el b/lisp/org/ox-odt.el index d5d03e49b50..975dbdb9f98 100644 --- a/lisp/org/ox-odt.el +++ b/lisp/org/ox-odt.el | |||
| @@ -449,7 +449,7 @@ under `org-odt-styles-dir' is used." | |||
| 449 | :type '(choice (const nil) | 449 | :type '(choice (const nil) |
| 450 | (file)) | 450 | (file)) |
| 451 | :group 'org-export-odt | 451 | :group 'org-export-odt |
| 452 | :version "24.1") | 452 | :version "24.3") |
| 453 | 453 | ||
| 454 | (defcustom org-odt-styles-file nil | 454 | (defcustom org-odt-styles-file nil |
| 455 | "Default styles file for use with ODT export. | 455 | "Default styles file for use with ODT export. |
| @@ -498,7 +498,8 @@ a per-file basis. For example, | |||
| 498 | (defcustom org-odt-display-outline-level 2 | 498 | (defcustom org-odt-display-outline-level 2 |
| 499 | "Outline levels considered for enumerating captioned entities." | 499 | "Outline levels considered for enumerating captioned entities." |
| 500 | :group 'org-export-odt | 500 | :group 'org-export-odt |
| 501 | :version "24.2" | 501 | :version "24.4" |
| 502 | :package-version '(Org . "8.0") | ||
| 502 | :type 'integer) | 503 | :type 'integer) |
| 503 | 504 | ||
| 504 | ;;;; Document conversion | 505 | ;;;; Document conversion |
| @@ -645,7 +646,8 @@ values. See Info node `(emacs) File Variables'." | |||
| 645 | 646 | ||
| 646 | ;;;; Drawers | 647 | ;;;; Drawers |
| 647 | 648 | ||
| 648 | (defcustom org-odt-format-drawer-function nil | 649 | (defcustom org-odt-format-drawer-function |
| 650 | (lambda (name contents) contents) | ||
| 649 | "Function called to format a drawer in ODT code. | 651 | "Function called to format a drawer in ODT code. |
| 650 | 652 | ||
| 651 | The function must accept two parameters: | 653 | The function must accept two parameters: |
| @@ -654,21 +656,16 @@ The function must accept two parameters: | |||
| 654 | 656 | ||
| 655 | The function should return the string to be exported. | 657 | The function should return the string to be exported. |
| 656 | 658 | ||
| 657 | For example, the variable could be set to the following function | 659 | The default value simply returns the value of CONTENTS." |
| 658 | in order to mimic default behaviour: | ||
| 659 | |||
| 660 | \(defun org-odt-format-drawer-default \(name contents\) | ||
| 661 | \"Format a drawer element for ODT export.\" | ||
| 662 | contents\)" | ||
| 663 | :group 'org-export-odt | 660 | :group 'org-export-odt |
| 664 | :version "24.4" | 661 | :version "24.4" |
| 665 | :package-version '(Org . "8.0") | 662 | :package-version '(Org . "8.3") |
| 666 | :type 'function) | 663 | :type 'function) |
| 667 | 664 | ||
| 668 | 665 | ||
| 669 | ;;;; Headline | 666 | ;;;; Headline |
| 670 | 667 | ||
| 671 | (defcustom org-odt-format-headline-function nil | 668 | (defcustom org-odt-format-headline-function 'ignore |
| 672 | "Function to format headline text. | 669 | "Function to format headline text. |
| 673 | 670 | ||
| 674 | This function will be called with 5 arguments: | 671 | This function will be called with 5 arguments: |
| @@ -687,7 +684,7 @@ The function result will be used as headline text." | |||
| 687 | 684 | ||
| 688 | ;;;; Inlinetasks | 685 | ;;;; Inlinetasks |
| 689 | 686 | ||
| 690 | (defcustom org-odt-format-inlinetask-function nil | 687 | (defcustom org-odt-format-inlinetask-function 'ignore |
| 691 | "Function called to format an inlinetask in ODT code. | 688 | "Function called to format an inlinetask in ODT code. |
| 692 | 689 | ||
| 693 | The function must accept six parameters: | 690 | The function must accept six parameters: |
| @@ -746,6 +743,8 @@ A rule consists in an association whose key is the type of link | |||
| 746 | to consider, and value is a regexp that will be matched against | 743 | to consider, and value is a regexp that will be matched against |
| 747 | link's path." | 744 | link's path." |
| 748 | :group 'org-export-odt | 745 | :group 'org-export-odt |
| 746 | :version "24.4" | ||
| 747 | :package-version '(Org . "8.0") | ||
| 749 | :type '(alist :key-type (string :tag "Type") | 748 | :type '(alist :key-type (string :tag "Type") |
| 750 | :value-type (regexp :tag "Path"))) | 749 | :value-type (regexp :tag "Path"))) |
| 751 | 750 | ||
| @@ -757,6 +756,8 @@ A rule consists in an association whose key is the type of link | |||
| 757 | to consider, and value is a regexp that will be matched against | 756 | to consider, and value is a regexp that will be matched against |
| 758 | link's path." | 757 | link's path." |
| 759 | :group 'org-export-odt | 758 | :group 'org-export-odt |
| 759 | :version "24.4" | ||
| 760 | :package-version '(Org . "8.0") | ||
| 760 | :type '(alist :key-type (string :tag "Type") | 761 | :type '(alist :key-type (string :tag "Type") |
| 761 | :value-type (regexp :tag "Path"))) | 762 | :value-type (regexp :tag "Path"))) |
| 762 | 763 | ||
| @@ -929,6 +930,8 @@ the application UI or through a custom styles file. | |||
| 929 | 930 | ||
| 930 | See `org-odt--build-date-styles' for implementation details." | 931 | See `org-odt--build-date-styles' for implementation details." |
| 931 | :group 'org-export-odt | 932 | :group 'org-export-odt |
| 933 | :version "24.4" | ||
| 934 | :package-version '(Org . "8.0") | ||
| 932 | :type 'boolean) | 935 | :type 'boolean) |
| 933 | 936 | ||
| 934 | 937 | ||
| @@ -1619,12 +1622,8 @@ channel." | |||
| 1619 | CONTENTS holds the contents of the block. INFO is a plist | 1622 | CONTENTS holds the contents of the block. INFO is a plist |
| 1620 | holding contextual information." | 1623 | holding contextual information." |
| 1621 | (let* ((name (org-element-property :drawer-name drawer)) | 1624 | (let* ((name (org-element-property :drawer-name drawer)) |
| 1622 | (output (if (functionp org-odt-format-drawer-function) | 1625 | (output (funcall org-odt-format-drawer-function |
| 1623 | (funcall org-odt-format-drawer-function | 1626 | name contents))) |
| 1624 | name contents) | ||
| 1625 | ;; If there's no user defined function: simply | ||
| 1626 | ;; display contents of the drawer. | ||
| 1627 | contents))) | ||
| 1628 | output)) | 1627 | output)) |
| 1629 | 1628 | ||
| 1630 | 1629 | ||
| @@ -1805,10 +1804,10 @@ INFO is a plist holding contextual information." | |||
| 1805 | headline-number "-"))) | 1804 | headline-number "-"))) |
| 1806 | (format-function (cond | 1805 | (format-function (cond |
| 1807 | ((functionp format-function) format-function) | 1806 | ((functionp format-function) format-function) |
| 1808 | ((functionp org-odt-format-headline-function) | 1807 | ((not (eq org-odt-format-headline-function 'ignore)) |
| 1809 | (function* | 1808 | (function* |
| 1810 | (lambda (todo todo-type priority text tags | 1809 | (lambda (todo todo-type priority text tags |
| 1811 | &allow-other-keys) | 1810 | &allow-other-keys) |
| 1812 | (funcall org-odt-format-headline-function | 1811 | (funcall org-odt-format-headline-function |
| 1813 | todo todo-type priority text tags)))) | 1812 | todo todo-type priority text tags)))) |
| 1814 | (t 'org-odt-format-headline)))) | 1813 | (t 'org-odt-format-headline)))) |
| @@ -1931,9 +1930,9 @@ contextual information." | |||
| 1931 | CONTENTS holds the contents of the block. INFO is a plist | 1930 | CONTENTS holds the contents of the block. INFO is a plist |
| 1932 | holding contextual information." | 1931 | holding contextual information." |
| 1933 | (cond | 1932 | (cond |
| 1934 | ;; If `org-odt-format-inlinetask-function' is provided, call it | 1933 | ;; If `org-odt-format-inlinetask-function' is not 'ignore, call it |
| 1935 | ;; with appropriate arguments. | 1934 | ;; with appropriate arguments. |
| 1936 | ((functionp org-odt-format-inlinetask-function) | 1935 | ((not (eq org-odt-format-inlinetask-function 'ignore)) |
| 1937 | (let ((format-function | 1936 | (let ((format-function |
| 1938 | (function* | 1937 | (function* |
| 1939 | (lambda (todo todo-type priority text tags | 1938 | (lambda (todo todo-type priority text tags |
diff --git a/lisp/org/ox-publish.el b/lisp/org/ox-publish.el index 67a57fa38ff..d87326d56a7 100644 --- a/lisp/org/ox-publish.el +++ b/lisp/org/ox-publish.el | |||
| @@ -1225,8 +1225,9 @@ Returns value on success, else nil." | |||
| 1225 | (let ((attr (file-attributes | 1225 | (let ((attr (file-attributes |
| 1226 | (expand-file-name (or (file-symlink-p file) file) | 1226 | (expand-file-name (or (file-symlink-p file) file) |
| 1227 | (file-name-directory file))))) | 1227 | (file-name-directory file))))) |
| 1228 | (+ (lsh (car (nth 5 attr)) 16) | 1228 | (if (not attr) (error "No such file: \"%s\"" file) |
| 1229 | (cadr (nth 5 attr))))) | 1229 | (+ (lsh (car (nth 5 attr)) 16) |
| 1230 | (cadr (nth 5 attr)))))) | ||
| 1230 | 1231 | ||
| 1231 | 1232 | ||
| 1232 | (provide 'ox-publish) | 1233 | (provide 'ox-publish) |
diff --git a/lisp/org/ox-texinfo.el b/lisp/org/ox-texinfo.el index 0126170ec82..43c1de2158a 100644 --- a/lisp/org/ox-texinfo.el +++ b/lisp/org/ox-texinfo.el | |||
| @@ -143,7 +143,7 @@ | |||
| 143 | 143 | ||
| 144 | ;;; Preamble | 144 | ;;; Preamble |
| 145 | 145 | ||
| 146 | (defcustom org-texinfo-filename nil | 146 | (defcustom org-texinfo-filename "" |
| 147 | "Default filename for Texinfo output." | 147 | "Default filename for Texinfo output." |
| 148 | :group 'org-export-texinfo | 148 | :group 'org-export-texinfo |
| 149 | :type '(string :tag "Export Filename")) | 149 | :type '(string :tag "Export Filename")) |
| @@ -202,7 +202,7 @@ a format string in which the section title will be added." | |||
| 202 | 202 | ||
| 203 | ;;; Headline | 203 | ;;; Headline |
| 204 | 204 | ||
| 205 | (defcustom org-texinfo-format-headline-function nil | 205 | (defcustom org-texinfo-format-headline-function 'ignore |
| 206 | "Function to format headline text. | 206 | "Function to format headline text. |
| 207 | 207 | ||
| 208 | This function will be called with 5 arguments: | 208 | This function will be called with 5 arguments: |
| @@ -316,7 +316,8 @@ returned as-is." | |||
| 316 | 316 | ||
| 317 | ;;; Drawers | 317 | ;;; Drawers |
| 318 | 318 | ||
| 319 | (defcustom org-texinfo-format-drawer-function nil | 319 | (defcustom org-texinfo-format-drawer-function |
| 320 | (lambda (name contents) contents) | ||
| 320 | "Function called to format a drawer in Texinfo code. | 321 | "Function called to format a drawer in Texinfo code. |
| 321 | 322 | ||
| 322 | The function must accept two parameters: | 323 | The function must accept two parameters: |
| @@ -325,18 +326,15 @@ The function must accept two parameters: | |||
| 325 | 326 | ||
| 326 | The function should return the string to be exported. | 327 | The function should return the string to be exported. |
| 327 | 328 | ||
| 328 | For example, the variable could be set to the following function | 329 | The default function simply returns the value of CONTENTS." |
| 329 | in order to mimic default behaviour: | ||
| 330 | |||
| 331 | \(defun org-texinfo-format-drawer-default \(name contents\) | ||
| 332 | \"Format a drawer element for Texinfo export.\" | ||
| 333 | contents\)" | ||
| 334 | :group 'org-export-texinfo | 330 | :group 'org-export-texinfo |
| 331 | :version "24.4" | ||
| 332 | :package-version '(Org . "8.3") | ||
| 335 | :type 'function) | 333 | :type 'function) |
| 336 | 334 | ||
| 337 | ;;; Inlinetasks | 335 | ;;; Inlinetasks |
| 338 | 336 | ||
| 339 | (defcustom org-texinfo-format-inlinetask-function nil | 337 | (defcustom org-texinfo-format-inlinetask-function 'ignore |
| 340 | "Function called to format an inlinetask in Texinfo code. | 338 | "Function called to format an inlinetask in Texinfo code. |
| 341 | 339 | ||
| 342 | The function must accept six parameters: | 340 | The function must accept six parameters: |
| @@ -882,12 +880,8 @@ contextual information." | |||
| 882 | CONTENTS holds the contents of the block. INFO is a plist | 880 | CONTENTS holds the contents of the block. INFO is a plist |
| 883 | holding contextual information." | 881 | holding contextual information." |
| 884 | (let* ((name (org-element-property :drawer-name drawer)) | 882 | (let* ((name (org-element-property :drawer-name drawer)) |
| 885 | (output (if (functionp org-texinfo-format-drawer-function) | 883 | (output (funcall org-texinfo-format-drawer-function |
| 886 | (funcall org-texinfo-format-drawer-function | 884 | name contents))) |
| 887 | name contents) | ||
| 888 | ;; If there's no user defined function: simply | ||
| 889 | ;; display contents of the drawer. | ||
| 890 | contents))) | ||
| 891 | output)) | 885 | output)) |
| 892 | 886 | ||
| 893 | ;;; Dynamic Block | 887 | ;;; Dynamic Block |
| @@ -1036,7 +1030,7 @@ holding contextual information." | |||
| 1036 | ;; Create the headline text along with a no-tag version. The | 1030 | ;; Create the headline text along with a no-tag version. The |
| 1037 | ;; latter is required to remove tags from table of contents. | 1031 | ;; latter is required to remove tags from table of contents. |
| 1038 | (full-text (org-texinfo--sanitize-content | 1032 | (full-text (org-texinfo--sanitize-content |
| 1039 | (if (functionp org-texinfo-format-headline-function) | 1033 | (if (not (eq org-texinfo-format-headline-function 'ignore)) |
| 1040 | ;; User-defined formatting function. | 1034 | ;; User-defined formatting function. |
| 1041 | (funcall org-texinfo-format-headline-function | 1035 | (funcall org-texinfo-format-headline-function |
| 1042 | todo todo-type priority text tags) | 1036 | todo todo-type priority text tags) |
| @@ -1051,7 +1045,7 @@ holding contextual information." | |||
| 1051 | (mapconcat 'identity tags ":"))))))) | 1045 | (mapconcat 'identity tags ":"))))))) |
| 1052 | (full-text-no-tag | 1046 | (full-text-no-tag |
| 1053 | (org-texinfo--sanitize-content | 1047 | (org-texinfo--sanitize-content |
| 1054 | (if (functionp org-texinfo-format-headline-function) | 1048 | (if (not (eq org-texinfo-format-headline-function 'ignore)) |
| 1055 | ;; User-defined formatting function. | 1049 | ;; User-defined formatting function. |
| 1056 | (funcall org-texinfo-format-headline-function | 1050 | (funcall org-texinfo-format-headline-function |
| 1057 | todo todo-type priority text nil) | 1051 | todo todo-type priority text nil) |
| @@ -1153,7 +1147,7 @@ holding contextual information." | |||
| 1153 | (org-element-property :priority inlinetask)))) | 1147 | (org-element-property :priority inlinetask)))) |
| 1154 | ;; If `org-texinfo-format-inlinetask-function' is provided, call it | 1148 | ;; If `org-texinfo-format-inlinetask-function' is provided, call it |
| 1155 | ;; with appropriate arguments. | 1149 | ;; with appropriate arguments. |
| 1156 | (if (functionp org-texinfo-format-inlinetask-function) | 1150 | (if (not (eq org-texinfo-format-inlinetask-function 'ignore)) |
| 1157 | (funcall org-texinfo-format-inlinetask-function | 1151 | (funcall org-texinfo-format-inlinetask-function |
| 1158 | todo todo-type priority title tags contents) | 1152 | todo todo-type priority title tags contents) |
| 1159 | ;; Otherwise, use a default template. | 1153 | ;; Otherwise, use a default template. |
diff --git a/lisp/org/ox.el b/lisp/org/ox.el index 6b88f1a908b..8316ef26e53 100644 --- a/lisp/org/ox.el +++ b/lisp/org/ox.el | |||
| @@ -626,11 +626,20 @@ e.g. \"stat:nil\"" | |||
| 626 | (defcustom org-export-with-sub-superscripts t | 626 | (defcustom org-export-with-sub-superscripts t |
| 627 | "Non-nil means interpret \"_\" and \"^\" for export. | 627 | "Non-nil means interpret \"_\" and \"^\" for export. |
| 628 | 628 | ||
| 629 | If you want to control how Org displays those characters, see | ||
| 630 | `org-use-sub-superscripts'. `org-export-with-sub-superscripts' | ||
| 631 | used to be an alias for `org-use-sub-superscripts' in Org <8.0, | ||
| 632 | it is not anymore. | ||
| 633 | |||
| 629 | When this option is turned on, you can use TeX-like syntax for | 634 | When this option is turned on, you can use TeX-like syntax for |
| 630 | sub- and superscripts. Several characters after \"_\" or \"^\" | 635 | sub- and superscripts and see them exported correctly. |
| 631 | will be considered as a single item - so grouping with {} is | 636 | |
| 632 | normally not needed. For example, the following things will be | 637 | You can also set the option with #+OPTIONS: ^:t |
| 633 | parsed as single sub- or superscripts. | 638 | |
| 639 | Several characters after \"_\" or \"^\" will be considered as a | ||
| 640 | single item - so grouping with {} is normally not needed. For | ||
| 641 | example, the following things will be parsed as single sub- or | ||
| 642 | superscripts: | ||
| 634 | 643 | ||
| 635 | 10^24 or 10^tau several digits will be considered 1 item. | 644 | 10^24 or 10^tau several digits will be considered 1 item. |
| 636 | 10^-12 or 10^-tau a leading sign with digits or a word | 645 | 10^-12 or 10^-tau a leading sign with digits or a word |
| @@ -638,15 +647,14 @@ parsed as single sub- or superscripts. | |||
| 638 | terminated by almost any nonword/nondigit char. | 647 | terminated by almost any nonword/nondigit char. |
| 639 | x_{i^2} or x^(2-i) braces or parenthesis do grouping. | 648 | x_{i^2} or x^(2-i) braces or parenthesis do grouping. |
| 640 | 649 | ||
| 641 | Still, ambiguity is possible - so when in doubt use {} to enclose | 650 | Still, ambiguity is possible. So when in doubt, use {} to enclose |
| 642 | the sub/superscript. If you set this variable to the symbol | 651 | the sub/superscript. If you set this variable to the symbol `{}', |
| 643 | `{}', the braces are *required* in order to trigger | 652 | the braces are *required* in order to trigger interpretations as |
| 644 | interpretations as sub/superscript. This can be helpful in | 653 | sub/superscript. This can be helpful in documents that need \"_\" |
| 645 | documents that need \"_\" frequently in plain text. | 654 | frequently in plain text." |
| 646 | |||
| 647 | This option can also be set with the OPTIONS keyword, | ||
| 648 | e.g. \"^:nil\"." | ||
| 649 | :group 'org-export-general | 655 | :group 'org-export-general |
| 656 | :version "24.4" | ||
| 657 | :package-version '(Org . "8.0") | ||
| 650 | :type '(choice | 658 | :type '(choice |
| 651 | (const :tag "Interpret them" t) | 659 | (const :tag "Interpret them" t) |
| 652 | (const :tag "Curly brackets only" {}) | 660 | (const :tag "Curly brackets only" {}) |