Commit Graph

22631 Commits

Author SHA1 Message Date
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
Tom Gillespie 04d2828ad9 org: Fix verbatim block fontification to end blocks on headlines
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Enhance regex
for finding the end of blocks (i.e., `beg-of-endline') to detect
headlines (i.e., (rx bol (one-or-more "*") space) so that fontification
matches the behavior of org mode (i.e., that headlines are healines,
even in vertabim).

This change aligns the behavior and the visual appearance of verbatim
blocks that contain headlines. When `font-lock-mode' is enabled this
change makes situations like those in (info "(org) Literal Examples")
literally jump off the page.

Overview of new fontification

Source                | fontification before | fontification after  |
\#+BEGIN_EXAMPLE      | org-block-begin-line | org-block-begin-line |
I look verbatim!      | org-block            | org-block            |
* Org headers in      | org-block            | org-level-1          |
verbatim blocks       | org-block            | nil                  |
** highly accordingly | org-block            | org-level-2          |
\#+END_EXAMPLE        | org-block-end-line   | org-meta-line        |

This commit also makes some improvements to the reability of
org-fontify-meta-lines-and-blocks-1.

1. Use the `rx' macro for better readability. Note that the strings
below return with literal tabs when using `rx'. Expansion included for
reference here.

Begin regex.
old: "^\\([ \t]*#\\(\\(\\+[a-zA-Z]+:?\\| \\|$\\)\\(_\\([a-zA-Z]+\\)\\)?\\)[ \t]*\\(\\([^ \t\n]*\\)[ \t]*\\(.*\\)\\)\\)"
new: "^\\([[:blank:]]*#\\(\\(\\+[A-Za-z]+:?\\|[[:space:]]\\|$\\)\\(_\\([A-Za-z]+\\)\\)?\\)[[:blank:]]*\\(\\([^	\n ]*\\)[[:blank:]]*\\(.*\\)\\)\\)"

End regex. Note match-string call is stringified for documentation here.
old:                        (concat "^[ \t]*#\\+end" (match-string 4) "\\>.*")
new: "\\(?:\\(^\\(?:\\*+[[:space:]]\\|[[:blank:]]*#\\+end(match-string 4)\\>.*\\)\\)\\)"

Caption regex:
old: "\\([ \t]*#\\+caption\\(?:\\[.*\\]\\)?:\\)[ \t]*"
new: "\\([[:blank:]]*#\\+caption\\(?:\\[.*]\\)?:\\)[[:blank:]]*"

2. Refactor fontification of #+end blocks for readability and to reduce
the number of calls to point-max to one per branch.

TINYCHANGE
2019-12-19 14:07:33 +01:00
Nicolas Goaziou e64323a108 Merge branch 'maint' 2019-12-17 10:34:10 +01:00
Nicolas Goaziou fa74fbb33c org-manual: Fix typo
* doc/org-manual.org (Field coordinates in formulas): Fix typo.
2019-12-17 10:33:41 +01:00
Nicolas Goaziou 2cec49554d Merge branch 'maint' 2019-12-17 10:18:16 +01:00
Nicolas Goaziou bc0d219e97 org-manual: Improve internal links documentation
* doc/org-manual.org (Internal Links): Document starred links.  Fix
documentation for text search.
2019-12-17 10:16:58 +01:00
Kyle Meyer a95f49c1f0 Merge branch 'maint' 2019-12-16 23:01:45 -05:00
Gregor Zattler 86c7a22ce4 org-screen.el: Replace obsolete function
* contrib/lisp/org-screen.el (org-screen): Replace obsolete function
`insert-string' with `insert'.

TINYCHANGE
2019-12-16 23:01:37 -05:00
Kyle Meyer 3e63b4e095 Merge branch 'maint' 2019-12-15 22:42:39 -05:00