Commit Graph

22449 Commits

Author SHA1 Message Date
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 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 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 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
Bastien 747c6a8b55 Bump version number to 9.3.1 2019-12-26 19:16:10 +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
Nicolas Goaziou 49c9cf2b6e org-manual: Tiny fix
* doc/org-manual.org (Internal Links): Tiny fix.
2019-12-23 10:39:59 +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 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
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
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 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 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
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 06d9583be0 server.mk: Add orgguide to ELPA package
* mk/server.mk (ORGELPA): Include orgguide.

Reported-by: David Masterson <dsmasterson@outlook.com>
2019-12-15 22:38:25 -05:00
Nicolas Goaziou 52fea37b02 org-list: Remove unused defvar 2019-12-15 14:21:34 +01:00
Matt Huszagh bc9a92ee7b org: Remove leading/trailing whitespace from latex fragment
* lisp/org.el (org-create-formula-image): Ensure user input ends
with a % character to remove trailing whitespace. Also, add %
characters between macros and newlines purely visual.

TINYCHANGE
2019-12-15 10:02:38 +01:00
Nicolas Goaziou b64a3308aa org-capture: Get capture templates from anonymous functions
* lisp/org-capture.el (org-capture-get-template): Allow specifying
template from an anonymous function.
* doc/org-manual.org (Template elements): Document it.
2019-12-12 22:33:22 +01:00
Paul Eggert f9a55cba31 Backport commit b0f20651e from Emacs
; Spelling fixes
b0f20651e3cbb8a66f11ffae4c18634019c20cd4
Paul Eggert
Tue Dec 10 20:05:49 2019 -0800
2019-12-11 21:22:50 -05:00
Paul Eggert ac90e86c32 Backport commit d1a791f8e from Emacs
Spelling fixes
d1a791f8edc1b8f2189b6f1b3be7b946fef1edbc
Paul Eggert
Mon Dec 9 18:45:18 2019 -0800
2019-12-11 21:19:55 -05:00
Marco Wahl 9b85eaa65a org-manual: Unify to two spaces after a dot 2019-12-11 23:10:42 +01:00
Marco Wahl 67e48de639 org-manual: Fix typo 2019-12-11 22:58:30 +01:00
Nicolas Goaziou 74c9b11e80 org-manual: Fix typo
* doc/org-manual.org (Column Width and Alignment): Fix typo.
2019-12-11 22:07:42 +01:00
Nicolas Goaziou 2e6853e798 org-manual: Improve an example
* doc/org-manual.org (Computed tag filtering): Do not suggest using
one-armed `if' constructs.  Remove misleading "org" prefix, and source
block indentation.
2019-12-11 21:51:20 +01:00
Nicolas Goaziou a8da497261 org-manual: Suggest kbd macro for bindings
* doc/org-manual.org (Capture templates): Suggest kbd macro for
bindings.
2019-12-11 21:39:09 +01:00
Nicolas Goaziou 3e3819392e org-manual: Use proper markup
* doc/org-manual.org (Computed tag filtering): Use proper
markup. E.g., use verbatim for anything meant to appear in an Org
document.  Use fixed-width for single line examples. Fix spacing after
"e.g.". Use active voice and present tense.
2019-12-11 21:35:05 +01:00
Nicolas Goaziou fffb57aa39 org-manual: Fix typo
* doc/org-manual.org (Computed tag filtering): Fix spacing after
"i.e.".
2019-12-11 21:27:52 +01:00
Marco Wahl 5a7fadf59a manual: Fix in section [Computed tag filtering] 2019-12-11 15:50:56 +01:00
Thibault Marin 91def2a211 ox-html: Add equation numbers only for numbered environments
* lisp/ox-html.el (org-html-latex-environment): Add caption to
numbered environments only
(org-html--latex-environment-numbered-p): New function.
2019-12-09 21:29:56 +01:00
Takaaki ISHIKAWA c7ad3f8845 ox.el: Replace error with user-error to exit org-export-dispatch
* 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>
2019-12-09 05:33:00 -05:00
Nicolas Goaziou eab7c4e581 ox-latex: Fix output for Tikz or PGF images
* lisp/ox-latex.el (org-latex--inline-image): Fix output for Tikz or
PGF images.
2019-12-07 12:30:19 +01:00
Kyle Meyer 2ab4540b98 Update customize-package-emacs-version-alist
* lisp/org.el (customize-package-emacs-version-alist): Map Org 9.3 to
Emacs 27.1.
2019-12-05 22:59:53 -05:00
Paul Eggert a3101370bd Backport commit 4c9330771 from Emacs
* lisp/org-agenda.el (org-agenda-filter): Fix unescaped literal ‘+’ in
regexp.  Reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2019-12/msg00215.html
* lisp/org.el (org-clone-subtree-with-time-shift): Fix a regexp typo
that mishandled strings like ‘\1d’, reported by the same email.

2019-12-05 regexp lint fixes
4c933077157ba409d645f4649c8a3a8e534d53d5
Paul Eggert
Thu Dec 5 19:32:12 2019 -0800
2019-12-05 22:59:06 -05:00
Paul Eggert 9c5174e235 Backport commit ab612302b from Emacs
* lisp/org-table.el (org-table-wrap-region): Avoid
repetition-of-repetition in regexp.

Fix regex repetition of repetitions
ab612302b4917fec5846922f3d8ffafa673c0d36
Paul Eggert
Wed Dec 4 16:54:24 2019 -0800
2019-12-04 21:19:51 -05:00
Nicolas Goaziou 18ddc64362 ob-plantuml: Fix typo
* lisp/ob-plantuml.el (org-babel-plantuml-make-body): Fix typo.
2019-12-04 18:45:18 +01:00
Bastien 46319b5f69 Backport commit 8fb773cc91 from Emacs 2019-12-04 10:37:19 +01:00
Kyle Meyer 8cd225a36c Clean up spacing to pass Emacs's pre-commit check 2019-12-03 21:46:54 -05:00
Glenn Morris f4d8622bc6 Backport commit 94c5eeb1f from Emacs
; Fix copyright years and license notices for recent org files
94c5eeb1fd33b043f68c4021fa0aed0e5590763e
Glenn Morris
Tue Dec 3 17:19:14 2019 -0800
2019-12-03 21:22:42 -05:00
Bastien efe4c85fa2 etc/ORG-NEWS: Use blank lines between paragraphs consistently 2019-12-03 16:25:32 +01:00
Marco Wahl 3342e26f32 Merge branch 'maint' 2019-12-03 11:45:42 +01:00
Marco Wahl 804e6af51c agenda: Fix filter for day/week agenda
* lisp/org-agenda.el (org-agenda-filter-apply): Use the org-hd-marker
  to identify headlines instead of org-marker.
2019-12-03 11:42:54 +01:00
Kyle Meyer ad171650bb Merge branch 'maint' 2019-12-01 21:29:35 -05:00
Stefan Monnier f2d03cb6b4 Backport commit 5bc97ebce from Emacs
* lisp/org.el (org-mode): Add pcomplete-completions-at-point to capf.

This lets the normal `completion-at-point` and `complete-symbol`
use `pcomplete` for completion.

(org-mode-map): Leave M-TAB bound to the global default since
`pcomplete` is now obsolete.

5bc97ebceb54e0eb2804bef4c1bc32a40d8a2371
Stefan Monnier
Mon Nov 18 17:47:06 2019 -0500
2019-12-01 21:28:39 -05:00
Marco Wahl be7e88ae30 agenda: Fix: Don't loop over headlines in region at agenda-todo
* lisp/org-agenda.el (org-agenda-todo): Set the respective variable to
  nil.
2019-11-26 22:33:45 +01:00
Nicolas Goaziou 3d4365ba03 org-clock: Fix locale issues in tests
* testing/lisp/test-org-clock.el (test-org-clock/clocktable/step):
(test-org-clock/clocktable/extend-today-until): Fix tests failing due
to translation mismatch.
2019-11-24 17:27:53 +01:00
Sebastian Miele 787fa238a9 Add tests about omission of commented src blocks when e.g. tangling
* testing/lisp/test-ob.el (test-ob/noweb-expansion): Add clause to
test.
* testing/lisp/test-ob-tangle.el (ob-tangle/commented-src-blocks): Add
test.
2019-11-24 10:27:35 +01:00
Sebastian Miele 0e70e2a42b ob-core: Respect COMMENTed headlines when expanding noweb references
* lisp/ob-core.el (org-babel-expand-noweb-references): Add calls to
org-in-commented-heading-p where appropriate.
2019-11-24 10:27:35 +01:00