Commit Graph

22539 Commits

Author SHA1 Message Date
Gustav Wikström f93020d5e6 Expand attachment links with point in correct place
* lisp/ox-texinfo.el (org-texinfo-link)
* lisp/ox-odt.el (org-odt-link)
* lisp/ox-md.el (org-md-link)
* lisp/ox-man.el (org-man-link)
* lisp/ox-latex.el (org-latex--inline-image, org-latex-link)
* lisp/ox-html.el (org-html-link)
* lisp/ox-ascii.el (org-ascii-link): Move point to the link for
  org-attach-expand to know from which headline to expand the link.
2020-01-15 20:40:24 +01:00
Gustav Wikström 0ac6a9e1fc Further fix of exporting attachment links in export backends
* lisp/ox-html.el (org-html-link, org-html-inline-image-rules)
* lisp/ox-odt.el (org-odt-inline-image-rules)
* lisp/ox-texinfo.el (org-texinfo-link)
  (org-texinfo-inline-image-rules): Make attachment links consistently
  expand as relative to file and add attachment link type to
  image rules for consistency among export backends.
2020-01-14 21:45:31 +01:00
Gustav Wikström d70db54dbc Improve attachment link export functionality
Make attachment links export just as file links.

* lisp/ox-ascii.el
* lisp/ox-html.el
* lisp/ox-latex.el
* lisp/ox-man.el
* lisp/ox-md.el
* lisp/ox-texinfo.el
* lisp/org-attach.el: Move export functionality for attachment links
  into the respective export backend, for feature parity with file
  links.
2020-01-14 04:15:38 +01:00
Gustav Wikström 32aa7139fd Markdown exporter: restructure org-md-link
* lisp/ox-md.el (org-md-link): Restructure slightly to match the code
  structure of other exporters.  For easier later refactor.
2020-01-14 04:07:55 +01:00
Nicolas Goaziou c1aed9f809 ob-core: Refactor `org-babel-expand-noweb-references'
* lisp/ob-core.el (org-babel-expand-noweb-references): Refactor code.
Improve cache handling.
2020-01-12 11:38:04 +01:00
Nicolas Goaziou 3999320aa4 Merge branch 'maint' 2020-01-11 20:18:47 +01:00
Nicolas Goaziou 2931bef9e7 Move `org-find-(visible|invisible)' to org-macs.el
* lisp/org.el (org-find-visible):
(org-find-invisible): Move functions...
* lisp/org-macs.el: ... here.
2020-01-11 20:15:30 +01:00
Nicolas Goaziou b1822760f4 Fix exporting visible parts of a buffer
* lisp/org-element.el (org-element--parse-elements): Only ignore parts
due to folding, not because of fontification.
* lisp/org-macs.el (org-invisible-p): Add an optional argument.
* testing/lisp/test-org-element.el (test-org-element/parse-buffer-visible):
Add tests.
2020-01-11 20:13:39 +01:00
Nicolas Goaziou b8f4773bfe Fix "find-visible" functions
* lisp/org.el (org-find-visible):
(org-find-invisible): Return appropriate position.  Add a docstring.
2020-01-11 20:04:19 +01:00
Nicolas Goaziou 1ffb390fda Merge branch 'maint' 2020-01-11 17:02:19 +01:00
Nicolas Goaziou 309cdcfab4 ol-notmuch: Silence byte-compiler 2020-01-11 17:02:00 +01:00
Nicolas Goaziou 38619504ed Merge branch 'maint' 2020-01-11 17:00:45 +01:00
Nicolas Goaziou b3e5c1cbff ol-notmuch: Fix file name in comments, remove (require 'org) 2020-01-11 16:59:51 +01:00
Nicolas Goaziou 3a6061e787 Merge branch 'maint' 2020-01-09 17:55:08 +01:00
Nicolas Goaziou e3681b0b08 org-manual: Fix typo
* doc/org-manual.org (Hard indentation): Fix typo.
2020-01-09 17:54:51 +01:00
Nicolas Goaziou ffb3f9e568 Merge branch 'maint' 2020-01-09 17:49:56 +01:00
Nicolas Goaziou 2c598d7499 org-manual: Update "ol-man.el" example
* doc/org-manual.org (Adding Hyperlink Types): Remove
unnecessary (require 'org) in example and fix function name.
2020-01-09 17:49:15 +01:00
Nicolas Goaziou 5f47639ec3 ol-man: Silence byte-compiler 2020-01-09 17:48:12 +01:00
Tom Gillespie b1cd1595df org-manual: Use ol-man.el in "Adding Hyperlink Types"
doc/org-manual.org (Adding Hyperlink Types): Update the name of the
example file from org-man.el to ol-man.el to reflect the renaming of
files related to Org links.

I found this thoroughly confusing when trying to (require 'org-man)
since it was clearly referenced as being in "contrib/", hopefully this
change will prevent anyone else from encountering the same confusion.
2020-01-09 17:44:39 +01:00
Nicolas Goaziou 894189fa72 ob-core: Optimize multiple :noweb-ref expansions in a source block
* lisp/ob-core.el (org-babel-expand-noweb-references): Optimize
multiple :noweb-ref expansions in a source block.
2020-01-08 23:08:47 +01:00
Nicolas Goaziou 2fde90aa2e org-duration: Read and write duration in compact form
* lisp/org-duration.el (org-duration-format): Add `compact' symbol.
(org-duration-set-regexps): Make white space between duration parts
optional
(org-duration-from-minutes): Handle `compact' symbol.
* testing/lisp/test-org-duration.el (test-org-duration/from-minutes):
(test-org-duration/p): Add tests.
2020-01-04 18:39:05 +01:00
Nicolas Goaziou 2fbbc23368 Fix build
* lisp/org-compat.el (org-file-properties): Prevent error at build
time about creating an alias for a local variable.
* lisp/org.el (org-keyword-properties): Slight change to docstring.
2020-01-03 11:07:28 +01:00
Kyle Meyer 93c11da002 Merge branch 'maint' 2020-01-01 13:39:26 -05:00
Kyle Meyer ff5fc050d3 Update copyright year to 2020 2020-01-01 13:38:46 -05:00
Kyle Meyer 90f0f24015 test-ob-clojure.el: Correct copyright year 2020-01-01 13:38:46 -05:00
Nicolas Goaziou 09df149991 Merge branch 'maint' 2019-12-31 16:56:45 +01:00
Nicolas Goaziou f37ae5e56a Small refactoring
* lisp/org.el (org-kill-note-or-show-branches): Prefer `org' functions
over `outline' ones.  Use `cond' instead of nested `if'.
2019-12-31 16:55:48 +01:00
Marco Wahl c637195e45 Merge branch 'maint' 2019-12-31 13:58:26 +01:00
Marco Wahl 524ccf3adb org: Fix: keep archived subtrees hidden after C-c C-k
* lisp/org.el (org-kill-note-or-show-branches): Hide archived
subtrees.

Report by Allen Li
https://lists.gnu.org/archive/html/emacs-orgmode/2019-12/msg00396.html
2019-12-31 13:55:12 +01:00
Marco Wahl bcf1187baf Merge branch 'maint' 2019-12-31 12:43:32 +01:00
Marco Wahl c0c790eb9b org: Fix use of image-map for inline images
Don't set image-map for Emacs before v26.  Variable image-map
available with emacs-version 26.

Reported by Johannes Brauer
https://lists.gnu.org/archive/html/emacs-orgmode/2019-12/msg00391.html
2019-12-31 12:38:04 +01:00
Jarmo Hurri ac939125a4 ob-java: Add header argument to pass command line args
* lisp/ob-java.el (org-babel-execute:java): Handle new header argument `:cmdargs` and pass its value as the last element in call to java.
2019-12-27 09:56:11 +01:00
Bastien 5fd3dabe91 Merge branch 'maint' 2019-12-26 19:17:51 +01:00
Bastien 747c6a8b55 Bump version number to 9.3.1 2019-12-26 19:16:10 +01:00
Nicolas Goaziou c60a7afea1 Merge branch 'maint' 2019-12-24 14:42:58 +01:00
Nicolas Goaziou cac0e46559 org-manual: Refer to link format in "Escape Character"
* doc/org-manual.org (Escape Character): Mention Link Format section
for completeness.
2019-12-24 14:41:44 +01:00
Bastien b23b6a4abd org.el: Bump version keyword to "9.4-dev" 2019-12-24 11:53:38 +01:00
Bastien 28b9435ade Remove version keywords from Org libraries 2019-12-24 11:51:58 +01:00
Nicolas Goaziou 2b1b90f936 Merge branch 'maint' 2019-12-23 10:40:28 +01:00
Nicolas Goaziou 49c9cf2b6e org-manual: Tiny fix
* doc/org-manual.org (Internal Links): Tiny fix.
2019-12-23 10:39:59 +01:00
Terje Larsen 2dddaf474b org: Add customization to fontify TODO headlines
* lisp/org.el (org-fontify-todo-headline): Add new boolean customization to
  toggle this behavior.
* lisp/org.el (org-set-font-lock-defaults): Apply face org-headline-todo to
  lines starting with keywords in org-not-done-keywords.
* lisp/org-faces (org-headline-todo): New face.

TINYCHANGE
2019-12-22 16:00:39 +01:00
Nicolas Goaziou 83627a145b Merge branch 'maint' 2019-12-22 15:14:22 +01:00
Thomas Fitzsimmons b47e0c8bfa org-agenda: Fix time regexp in org-get-entries-from-diary
* lisp/org-agenda.el (org-get-entries-from-diary): Make time regular
expression more precise.

Reported-by: Justin Abrahms <justin@abrah.ms>
2019-12-22 15:14:04 +01:00
Nicolas Goaziou 2eeafcaf34 Merge branch 'maint' 2019-12-22 14:58:14 +01:00
Nicolas Goaziou 546cbad531 Link syntax require to escape every square bracket
* lisp/ol.el (org-link-make-regexps): Update regexp to forbid any
un-escaped square bracket in the URI.
(org-link-escape):
(org-link-unescape):
* testing/lisp/test-ol.el (test-ol/escape):
(test-ol/unescape):
(test-ol/store-link):
* testing/lisp/test-org.el (test-org/custom-id):
(test-org/fuzzy-links):
* testing/lisp/test-ox.el (test-org-export/resolve-fuzzy-link): Adapt
to new syntax.
* doc/org-manual.org (Link Format): Update documentation.

The new syntax allowed un-escaped opening square brackets in the URI
part of bracket links. Unfortunately, it led to bug as described here:

  <https://lists.gnu.org/archive/html/emacs-orgmode/2019-12/msg00312.html>

Now, we require to escape every square bracket in the URI.
2019-12-22 14:52:53 +01:00
Nicolas Goaziou d2c5c5622c ob-python: Slightly refactor tests
* testing/lisp/test-ob-python.el (test-ob-python/colnames-yes-header-argument):
(test-ob-python/colnames-yes-header-argument-again):
(test-ob-python/colnames-nil-header-argument):
(test-ob-python/colnames-no-header-argument-again):
(test-ob-python/colnames-no-header-argument):
(test-ob-python/session-multiline):
(test-ob-python/insert-necessary-blank-line-when-sending-code-to-interpreter):
Slightly refactor tests.
2019-12-22 14:51:57 +01:00
Nicolas Goaziou 72708b33e3 org-clock: Fix tests
* testing/lisp/test-org-clock.el (test-org-clock/clocktable/link): Fix
tests.
2019-12-22 14:51:31 +01:00
Nicolas Goaziou 32641117a5 Merge branch 'maint' 2019-12-22 10:08:30 +01:00
nixo 6315e1e760 ox-odt: Get write permissions on styles.xml
* lisp/ox-odt.el (org-odt-template): The file `styles.xml' might be
copied from a location where it is read-only.  Since we need to modify
it (and its copied under /tmp, so we can modify it), we need to ensure
we have write persmissions on it.  Set mode to 600.

This is especially needed for projects like Guix, where all system
files are stored in a read-only location.

TINYCHANGE
2019-12-22 10:07:29 +01:00
Nicolas Goaziou 7fe3605d9c Merge branch 'maint' 2019-12-19 14:07:58 +01:00