* lisp/ox.el (org-export--update-included-link): Account
for :post-blank property when inserting back the link.
* testing/lisp/test-ox.el (test-org-export/expand-include/links): Add
test.
Fixes bug#39173.
* lisp/ox.el (org-export--dispatch-ui): Update message in the
header line to promote the use of C-v and M-v while SPC and
DEL are still allowed for backward compatibility reasons.
* lisp/org-macs.el (org-scroll): New function.
* lisp/org-attach.el (org-attach): Use `org-scroll'.
* lisp/org-agenda.el (org-agenda-get-restriction-and-command):
Allow C-v, M-v, C-n and C-p to scroll.
This change adverize C-v, M-v, C-n and C-p as the default keys
for scrolling the window, while SPC and DEL are still available
in the export dispatch window.
In particular, don't use SPC as a way to scroll the window in
the agenda commands dispatch window, as this key might be used
for a custom agenda command.
* lisp/org-macs.el (org-scroll): New function.
* lisp/ox.el (org-export--dispatch-action):
* lisp/org-agenda.el (org-agenda-get-restriction-and-command):
Use the new function.
* lisp/ox.el (org-export--dispatch-action): Replace error with
user-error a user-error so that user can quit `org-export-dispatch'
without entering debugging mode.
Modified from a patch proposal by Takaaki Ishikawa.
<https://lists.gnu.org/archive/html/emacs-orgmode/2019-12/msg00071.html>
* lisp/ox.el (org-export-table-cell-alignment): Make
`org-export-table-cell-alignment' handle tables with rows containing
unequal numbers of cells.
Patch modeled after previous fix for `org-export-table-cell-width'.
TINYCHANGE
* doc/org-manual.org, etc/ORG_NEWS: Document :target option
for the TOC keyword.
* lisp/ox.el (org-export-resolve-link): New function.
* lisp/ox-ascii.el (org-ascii-keyword): Added :target to the TOC
keyword.
(org-ascii--build-toc): Changed LOCAL argument to SCOPE.
* lisp/ox-html.el (org-html-keyword): Added :target to the TOC keyword.
* lisp/ox-md.el (org-md-keyword): Added :target to the TOC keyword.
(org-md--build-toc): Changed LOCAL argument to SCOPE.
* lisp/ox-odt.el (org-odt-keyword): Added :target to the TOC keyword.
* testing/lisp/test-ox.el (test-org-export/collect-headlines): Added
tests for specifying scope by CUSTOM_ID or by fuzzy matching.
(test-org-export/resolve-link): New test.
* lisp/ox.el (org-export--update-included-link): New function.
(org-export--prepare-file-contents): Use new function. Also check
possible file links within link's description.
* testing/lisp/test-ox.el (test-org-export/expand-include/links): Fix
prefix. Add tests.
Reported-by: "Dietrich Foethke" <foethke@web.de>
<http://lists.gnu.org/r/emacs-orgmode/2019-02/msg00103.html>
* lisp/org-agenda.el (org-agenda-to-appt):
* lisp/org-clock.el (org-clock-resolve-clock)
(org-clock-resolve, org-resolve-clocks-if-idle):
* lisp/org-colview.el (org-columns-edit-value, org-columns)
(org-agenda-columns):
* lisp/org-element.el (org-element--cache-interrupt-p)
(org-element--cache-sync):
* lisp/org-habit.el (org-habit-get-faces)
(org-habit-insert-consistency-graphs):
* lisp/org-indent.el (org-indent-add-properties):
* lisp/org-timer.el ((org-timer-show-remaining-time):
* lisp/org.el (org-babel-load-file, org-current-time)
(org-today, org-auto-repeat-maybe)
(org-small-year-to-year, org-goto-calendar):
* lisp/ox.el (org-export-insert-default-template):
Use nil instead of (current-time) where either will do, as nil is
a bit more efficient and should have less timing error.
Prefer nil to (current-time) when either works
c75f505dea6a560b825384cf3d277690f86840bf
Paul Eggert
Fri Oct 20 19:42:23 2017 -0700
Note(km): The changes that will reverted in the next commit have been
dropped from the ChangeLog entries above.
* lisp/ox.el (org-export-expand-include-keyword): Add new parameter
`:coding' for specify the file encoding whith the `#+include:'
keyword.
This allow to use something like:
#+include: "./myfile" :coding cp850-dos
when your Org file is encoded in utf-8 for example.
* lisp/org-macro.el (org-macro-initialize-templates): Do not
initialize the special "results" macro.
(org-macro-replace-all): Do not raise an error if "results" macro has
no associated template yet.
* lisp/ox.el (org-export-as): Update code comments.
* testing/lisp/test-ox.el (test-org-export/expand-macro): Add test.
* lisp/ox.el (org-export--prepare-file-contents): Activate Org mode in
temporary buffer so all regexps are set. Also, be more strict when
updating links, i.e., do not bother if both includer and includee
belong to the same directory, or if there's no includer at all.
Eventually, only update links within lines specifications, if any.
* testing/lisp/test-ox.el (test-org/expand-include/links): Add tests.
Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-03/msg00394.html>
* lisp/org-macro.el (org-macro-initialize-templates): Initialize all
macros, including {{{title}}} and al.
(org-macro-replace-all): Change signature.
(org-macro--find-keyword-value): New function.
* lisp/ox.el (org-export-as): Remove second macro expansion
* lisp/ox.el (org-export-collect-headlines):
(org-export-excluded-from-toc-p): Allow to number headlines in the
middle of an otherwise unnumbered tree.
* testing/lisp/test-ox.el (test-org-export/collect-headlines):
(test-org-export/excluded-from-toc-p):
(test-org-export/toc-entry-backend): Update tests. Add more tests.
Reported-by: Akater <nuclearspace@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-11/msg00219.html>
* lisp/ox.el (org-export-numbered-headline-p): Use a less opinionated
definition of inheritance.
* testing/lisp/test-ox.el (test-org-export/numbered-headline-p):
Update test.
* doc/org.texi (Export settings): Insist on UNNUMBERED inheritance.
It is now possible to number a headline within an unnumbered tree.
* lisp/org.el (org--file-cache): New variable.
(org-reset-file-cache):
(org-file-url-p): New function.
(org-mode-restart): Use new function.
* lisp/org.el (org-file-contents): Allow the FILE argument to be a
URL. If the URL contents are already cached, return the cache
contents, else download the file and return contents of that. The
file is automatically cached each time it is downloaded. Add a new
optional argument NOCACHE. If this is non-nil, the URL is always
downloaded afresh. Use `org--file-cache' and `org-file-url-p'.
* lisp/org.el (org-edit-special): Do not allow editing the "file" if a
URL is specified for the "#+SETUPFILE".
* lisp/ox.el (org-export--list-bound-variables)
(org-export--prepare-file-contents):
* lisp/org-macro.el (org-macro--collect-macros) : Adapt to the
possibility that the input to `org-file-contents' can be a URL too.
* doc/org.texi (Export settings, In-buffer settings)
(The very busy C-c C-c key): Mention that #+SETUPFILE keyword can now
take a URL as a value, and that C-c C-c on the #+SETUPFILE line will
clear the org file cache.
* testing/lisp/test-org.el (test-org/org-file-contents-url)
(test-org/org-file-contents-file): Add tests for org-file-contents.
* testing/lisp/test-ox.el (test-org-export/get-inbuffer-options): Add
test for reading setupfile specified via a URL.
* lisp/ox.el (org-export--install-footnote-definitions):
Provide :raw-value property when building a virtual footnote
section, as `org-export-search-cells' expects it.
* lisp/ox.el (org-export-get-loc):
(org-export-unravel-code):
(org-export-format-code):
(org-export-format-code-default): Do not trim leading and trailing
blank lines from code during export.
* testing/lisp/test-ox.el (test-org-export/unravel-code): Update tests.
(test-org-export/format-code-default): Add tests.
Reported-by: Li DebugFan <debugfanli@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/113205>
* lisp/ox.el (org-export-as): Remove uninterpreted data from back-end
specific parsed keywords.
* testing/lisp/test-ox.el (test-org-export/uninterpreted): Add test.
This fixes 6cd42b08f9.
* lisp/ox.el (org-export--remove-uninterpreted-data): Do not modify
communication channel. Change "blob" to "datum".
(org-export--remove-uninterpreted-data-1): Remove function.
(org-export-as): Remove uninterpreted data from parsed keyword before
applying filters.
* testing/lisp/test-ox.el (test-org-export/uninterpreted): Add test.
Reported-by: Rasmus <rasmus@gmx.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/112730>
* lisp/org-element.el (org-element-link-parser):
Handle drive names in uri like file:///c:/dir/file
* lisp/ox.el (org-export-file-uri):
Handle drive names in uri like file:///c:/dir/file
* testing/lisp/test-ox.el (test-org-export/file-uri):
Generate the right uri to be tested against link exporter.
* lisp/ox.el (org-export-dictionary): Slovenian translations.
* lisp/ox.el (org-export-smart-quotes-alist): Slovenian quotes and
apostrophes for exporting documents.
TINYCHANGE
* lisp/ob-clojure.el (org-babel-clojure-sync-nrepl-timeout):
* lisp/org-agenda.el (org-agenda-show-future-repeats):
(org-agenda-prefer-last-repeat):
* lisp/org-bibtex.el (org-bibtex-headline-format-function):
* lisp/ox-publish.el (org-publish-sitemap-sort-folders):
* lisp/ox.el (org-export-global-macros): Change :version from "25.2"
to "26.1".
As mentioned in 7c710f6f5, it looks like the goal is to sync Org
9.0.* (maint) with the Emacs master branch. In that case, 26.1 won't
be correct for changes that are specific to Org's master branch, but
neither will 25.2.
* lisp/ox.el (org-export-resolve-fuzzy-link): Fix typo preventing to
report the proper path of the broken link.
Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk>
<http://permalink.gmane.org/gmane.emacs.orgmode/111357>
* lisp/ox.el (org-export--skip-p): Handle comments and comment blocks
removal.
(org-export--delete-comments): Rename to...
(org-export--delete-comment-trees): ... this. Now only take care of
commented trees and inlinetasks.
* testing/lisp/test-ox.el (test-org-export/comments): Add test.
(org-test-with-parsed-data): Apply renaming.
* lisp/ox.el (org-export-table-has-special-column-p): Tiny
refactoring.
(org-export-table-has-header-p): Fix cache use, i.e., no longer
re-compute return value when the table is already known to have no
header.
(org-export-table-row-group):
(org-export-table-row-number): Populate cache with all the rows
whenever a row is queried. This fixes previous quadratic behaviour.
Reported-by: Thierry Banel <tbanelwebmin@free.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/111131>
* lisp/org-element.el (org-element-class): Make it a defsubst.
* lisp/org-table.el (orgtbl-to-generic): Do not use cache when
building Org table. Factor out calls to Org Export functions when
they are not necessary.
(org-table--to-generic-row): Factor out calls to Org Export functions
when they are not necessary.
* lisp/ox.el (org-export-resolve-fuzzy-link):
(org-export-table-has-header-p):
(org-export-table-row-group):
(org-export-table-cell-width):
(org-export-table-cell-alignment): Small refactoring.
(org-export-table-row-number): Add caching.
* testing/lisp/test-org-element.el (test-org-element/class): Remove
test.
* lisp/ox-ascii.el (org-ascii--describe-datum): New function.
(org-ascii--describe-links): Use new function. Do not ignore fuzzy
links anymore when they contain a description.
(org-ascii-link): Use new function. Better handling of internal
links.
* lisp/ox.el (org-export-dictionary): New entries: "See figure %s",
"See listing %s", "See table %s".
Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110788>
* lisp/ox.el (org-export-data-with-backend):
(org-export-with-backend): Preserve internal references once the local
back-end has been applied.
* testing/lisp/test-ox.el (test-org-export/get-reference): Add tests.
* lisp/org-src.el (org-src-coderef-regexp): Update regexp.
* lisp/ox.el (org-export-resolve-coderef): Use function above.
Reported-by: D M German <dmg@turingmachine.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/110656>
* lisp/ob-exp.el (org-babel-exp-process-buffer): Change variable
name `org-export-babel-evaluate' to `org-export-use-babel'. Also
change the name in its `defcustom' and set the `:safe' key.
* lisp/ox-icalendar.el (org-icalendar-export-current-agenda): Change
variable name.
* lisp/ox.el (org-export-as): Change variable name.
* doc/org.texi (Exporting code blocks): Change variable name. Amplify
the explanation of what the variable does. Add variable index entry.
* testing/lisp/test-ob-exp.el: Change variable name.
* testing/lisp/test-ob-lob.el: Change variable name.
* testing/lisp/test-ox.el: Change variable name.
Users were often confused that setting this variable to `nil' will
cause header arguments to be ignored in addition to preventing code
from being evaluated. It is hoped that the documentation changes and
the name `org-export-use-babel' will better convey that everything
babel does can be switched off with this variable.
* lisp/ox.el (org-export-get-reference): Ensure different elements or
objects generating the same search cell do not get the same internal
reference.
* testing/lisp/test-ox.el (test-org-export/get-reference): Add test.
Reported-by: mstrey@strey.biz
<http://permalink.gmane.org/gmane.emacs.orgmode/110211>
* lisp/ox.el (org-export-as): Skip planning info and first property
drawer when exporting a subtree.
* testing/lisp/test-ox.el (test-org-export/export-scope): Add test.
* lisp/org-element.el (org-element-class): New function.
(org-element-map):
(org-element-interpret-data):
* lisp/org-footnote.el (org-footnote--allow-reference-p):
* lisp/org-src.el (org-src--on-datum-p):
* lisp/ox-odt.el (org-odt-footnote-reference):
(org-odt-table-cell):
* lisp/ox.el (org-export-data):
(org-export-expand): Use new function.
* testing/lisp/test-org-element.el (test-org-element/class): New test.
Using generic `org-element-class' allows to handle unknown, i.e.,
pseudo, object or element types. It also reduces code duplication in
`org-element-interpret-data' and `org-export-data', preventing, e.g.,
bugs as the one fixed in c58e1b5.
* lisp/org-element.el (org-element-interpret-data):
* lisp/ox.el (org-export-data): Correctly guess if a pseudo element or
object should be followed by spaces or blank lines.
* testing/lisp/test-ox.el (test-org-export/pseudo-objects):
(test-org-export/pseudo-elements): New tests.
* lisp/org-src.el (org-src-coderef-format): New function
(org-src-coderef-regexp): Change signature.
* lisp/ob-core.el (org-babel--normalize-body):
* lisp/ox.el (org-export-unravel-code): Use new functions.
* testing/lisp/test-org-src.el (test-org-src/coderef-format): New test.
* lisp/ob-core.el (org-babel--normalize-body): New function.
(org-babel-get-src-block-info): Use new function.
* lisp/org-src.el (org-src-coderef-regexp): New function.
* lisp/ox.el (org-export-unravel-code): Use new function.
* testing/lisp/test-ob.el (test-ob/evaluate-body-with-coderefs): New
test.
* lisp/org.el (org-link-protocols): Remove variable org-link-protocols.
The data in this variable is now retrieved with org-link-get-parameter.
* lisp/org.el: Enable file links to use the application link property to
determine the follow action. Also add a space after let*.
* lisp/org-element.el: Replace `org-link-types' variable with
`org-link-types' function.
* lisp/org.el: Replace the `org-link-types' variable with
`org-link-types' function. Create `org-link-get-parameter' and
`org-link-set-parameters' functions. Remove `org-add-link-type'. Add
`org-store-link-functions' function and remove
`org-store-link-functions' variable. Add `org--open-file-link' for use
as a :follow function for file type links.
* lisp/org.el: Set :follow functions for file links in `org-link-parameters.
Define `org-open-file-link' that opens a file link with an app.
* testing/lisp/test-ox.el: Remove usage of the `org-link-types'
variable.
* lisp/org-compat.el: Move `org-add-link-type' and mark it as obsolete.
* lisp/ox.el: Change org-add-link-type comment in ox.el.