Commit Graph

22755 Commits

Author SHA1 Message Date
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
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 0a82c8370d org-attach: Tiny refactoring
* lisp/org-attach.el (org-attach): Use `org-with-point-at'.
2019-12-15 19:08:07 +01:00
Nicolas Goaziou 1d38233b83 Silence byte-compiler
* lisp/org-compat.el (org-file-properties): Fix typo.
2019-12-15 19:07:51 +01:00
Nicolas Goaziou c539ecb51f Merge branch 'maint' 2019-12-15 14:21:54 +01:00
Nicolas Goaziou 52fea37b02 org-list: Remove unused defvar 2019-12-15 14:21:34 +01:00
Nicolas Goaziou ee2a8eb241 org-element: Forbid affiliated keywords for comments
* lisp/org-element.el (org-element--current-element): Forbid
affiliated keywords for comments.
* testing/lisp/test-org-element.el (test-org-element/comment-parser):
Tiny refactoring.

The motivation is to avoid distinguishing between top-level comments,
which cannot have affiliated keywords, and other comments, which
could.  Therefore, we keep a single type of comment.
2019-12-15 14:06:20 +01:00
Nicolas Goaziou af99544286 org-element: Fix top-level property-drawer parsing
* lisp/org-element.el (org-element-comment-parser): Top level comments
do not have affiliated keywords.
(org-element--current-element): Properly parse top-level comments and
top-level properties drawer.
(org-element--next-mode): Change signature.
(org-element--parse-elements): Apply signature change.
(org-element--parse-to): Apply signature change.  Look for top-level
comments or properties drawer.
* testing/lisp/test-org-element.el (test-org-element/property-drawer-parser):
Add comment.

Initially, `org-element--current-element' would defer to
`org-get-property-block' to validate a property-drawer, which is the
wrong way to look at the low-level Org Element library. Also, it would
allow affiliated keywords, which is not possible.
2019-12-15 13:34:30 +01:00
Nicolas Goaziou 4f398cf84e Merge branch 'maint' 2019-12-15 10:02:57 +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
Gustav Wikström 26ace90042 Make org-attach store links using attachment-links
* lisp/org-attach.el (org-attach-attach): Storing links using the new
  attachment link type instead of file links.

* lisp/org-compat.el (org-attach-store-link, org-attach-expand-link):
  Remove not needed functions and mark them as obsolete for easier
  future reference.
2019-12-13 23:01:10 +01:00
Nicolas Goaziou 31d2f48f69 Merge branch 'maint' 2019-12-12 22:35:10 +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
Kyle Meyer 955e531d24 Merge branch 'maint' 2019-12-11 21:24:45 -05: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 e3046e22d4 Merge branch 'maint' 2019-12-11 23:11:20 +01: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 6504e6d35f Merge branch 'maint' 2019-12-11 22:08:04 +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 ea302ea5b5 Merge branch 'maint' 2019-12-11 21:52:14 +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 8d5803ced9 Merge branch 'maint' 2019-12-11 21:39:57 +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 37a2eff212 Merge branch 'maint' 2019-12-11 21:28:42 +01:00