Commit Graph

15951 Commits

Author SHA1 Message Date
Nicolas Goaziou 7d35d46494 Fix :package-version values
* lisp/ol.el (org-link-email-description-format):
* lisp/org-src.el (org-src-tab-acts-natively):
* lisp/org-table.el (org-table-header-line-p):
* lisp/org.el (org-loop-over-headlines-in-active-region):
(org-fontify-done-headline): Use correct (PACKAGE . VERSION-STRING)
value.  Remove :version keyword since :package-version overrides it.
2020-05-06 02:12:23 +02:00
Kyle Meyer 89b0d485b1 Merge branch 'maint' 2020-05-05 00:16:53 -04:00
Eric Timmons 0f783cbca8 ox-odt: Do not ignore org-odt-styles-file
* lisp/ox-odt.el (odt): Delete a repeated entry for :odt-styles-file
and absorb its org-odt-styles-file, which had no effect due to the
repeated entries, into the first definition.

TINYCHANGE
2020-05-05 00:15:57 -04:00
Roland Coeurjoly 6fd05fcaca ob-haskell: Print all results with :results output
* lisp/ob-haskell.el (org-babel-execute:haskell): Print all results,
including the last one.
2020-05-04 16:57:49 +02:00
Nicolas Goaziou e5eda0beeb table: Tiny clean-up
* lisp/org-table.el (org-table-export): Remove unnecessary calls to
`buffer-substring-no-properties'.
2020-05-02 11:32:17 +02:00
akater d23bd91874 org-agenda.el: Complete multiple todo keywords
* lisp/org-agenda.el (org-todo-list): Use completing-read-multiple
  instead of completing-read when selecting todo keywords to filter by
  in Agenda.  Fix a typo in the prompt.

TINYCHANGE
2020-05-01 23:32:29 -04:00
Marco Wahl 90185c98f4 table: Remove the last row (LR) feature
The feature was undocumented and broken according to Carsten.

* lisp/org-table.el (org-table-insert-column):
(org-table-delete-column):
(org-table-move-column):
(org-table-get-formula):
(org-table-fix-formulas):
(org-table-analyze): Remove the parts refering to LR.
2020-05-02 00:04:30 +02:00
Nicolas Goaziou 609e4f004b list: Refactor `mapc' + `lambda' into `dolist'
* lisp/org-list.el (org-list-get-subtree):
(org-list-struct-fix-box):
(org-list-struct-fix-item-end):
(org-apply-on-list):
(org-list-set-item-visibility):
(org-toggle-checkbox):
(org-list-indent-item-generic): Use `dolist', or `pcase-dolist'
instead of `mapc' + `lambda'.
2020-05-01 15:51:43 +02:00
Nicolas Goaziou ce10179cc2 table: `org-table-to-lisp' does not check if point is at a table
* lisp/org-table.el (org-table-to-lisp): Do not check if point is at
a table.  Leave it to the caller.

See <http://lists.gnu.org/r/emacs-orgmode/2020-05/msg00000.html>.
2020-05-01 15:00:47 +02:00
Nicolas Goaziou e955976983 table: Small fix
* lisp/org-table.el (org-table-to-lisp): Make sure to stop at the end
of the table.
2020-05-01 12:29:11 +02:00
tbanelwebmin 20f2cd8416 table: Rewrite `org-table-to-lisp'
* lisp/org-table.el (org-table-to-lisp): Rewrite function.

The new implementation can be more than 100 times faster.  This enhances
responsiveness of Babel or Gnuplot blocks handling very large tables.
2020-05-01 00:26:46 +02:00
Nicolas Goaziou 1e1328b41c Move some functions in "org-macs.el"
* lisp/org.el (org--line-empty-p):
(org-previous-line-empty-p):
(org-next-line-empty-p): Move these functions...
* lisp/org-macs.el: ... here.
2020-04-30 11:23:11 +02:00
Nicolas Goaziou e68ae40bdb babel: Remove unneeded declare function 2020-04-28 09:51:20 +02:00
Nicolas Goaziou c672651fef Small speed-up for `org-collect-keywords'
* lisp/org.el (org--collect-keywords-1): Do not really activate Org
mode in setup files.
2020-04-28 09:50:46 +02:00
Nicolas Goaziou 80865bab64 Improve SETUPFILE error handling
* lisp/org.el (org-file-contents): Return nil when NOERROR is non-nil
and an error is raised.
(org--collect-keywords-1): Do not raise an error when an invalid
SETUPFILE keyword is met.
2020-04-27 23:31:05 +02:00
Nicolas Goaziou 912c696cd9 ox: Fix b4e91b7e94
* lisp/ox.el (org-export--get-inbuffer-options): Add missing PLIST.
2020-04-27 10:39:05 +02:00
Nicolas Goaziou 31068373dc export: Remove `org-export-special-keywords'
* lisp/ox.el (org-export-special-keywords):
(org-export--get-inbuffer-options): Do not use `org-export-special-keywords'.
2020-04-26 22:59:24 +02:00
Nicolas Goaziou 3e44ddbe78 macro: Small refactoring.
* lisp/org-macro.el (org-macro--collect-macros): Use
`org-collect-keywords'.
2020-04-26 22:57:47 +02:00
Nicolas Goaziou 0826461bc1 ox: Small refactoring
* lisp/ox.el (org-export--list-bound-variables): Use
`org-collect-keywords'.
2020-04-26 22:42:26 +02:00
Nicolas Goaziou b223a28063 Fix last commit
* lisp/org.el (org--collect-keywords-1): Fix thinko.
2020-04-26 18:51:16 +02:00
Nicolas Goaziou 053676d284 Better handling of filenames in `org-collect-keywords'
* lisp/org.el (org-collect-keywords):
(org--collect-keywords-1): Add a new argument to take into
consideration current directory.
2020-04-26 18:40:24 +02:00
Nicolas Goaziou b4e91b7e94 New function: org-collect-keywords
* lisp/org.el (org-set-regexps-and-options): Use new function.
(org-collect-keywords):
(org--collect-keywords-1): New functions.
* lisp/ox.el (org-export--get-inbuffer-options): Use new function.
2020-04-26 18:06:15 +02:00
Nicolas Goaziou 3c4cb7b296 Merge branch 'maint' 2020-04-26 10:37:28 +02:00
Nicolas Goaziou f3c137a697 ol: Fix info links with backquotes and backslashes
* lisp/ol.el (org-store-link): Remove spurious backslash appearing in
some Info buffers.

Reported-by: Achilles Yuce <ayuce@posteo.mx>
<http://lists.gnu.org/r/emacs-orgmode/2020-04/msg00405.html>
2020-04-26 10:36:39 +02:00
Kyle Meyer 3c31941139 Fix loading issues related to org-refile.el move
* lisp/org-refile.el (org-directory):
(org-default-notes-file):
(org-reverse-note-order):
(org-outline-path-cache):
(org--get-outline-path-1):
(org-get-outline-path):
(org-format-outline-path):
(org-display-outline-path): Move back to org.el.
* lisp/org-id.el: Require org-refile.
* lisp/org-refile.el: Require org.

f636cf91b (New org-refile.el file with refile definitions, 2020-02-05)
moved refile-related code into a new file, org-refile.el.  This
introduced several dependency issues, which can be seen by running
`make single'.

Many of these issues could be solved by loading org.el in
org-refile.el and loading org-refile in several libraries that depend
on moved functionality.  However, there would still be a circular
dependency because org.el depends on three variables now defined in
org-refile.el.  Also, conceptually there is the problem that the
outline path functionality, despite being used primarily for refile
internally, is now used more generally in third-party code and in a
couple of spots within this repo.

Resolve the above situation by moving the three org-refile.el
variables that org.el needs and the outline path bits back to org.el.

Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<CAFyQvY1VR5t_a=JO01+QWbUQk_9i8+2XG6W2-mg-DpFzjz9seg@mail.gmail.com>

Reported-by: Ihor Radchenko <yantar92@gmail.com>
<878sj74lfp.fsf@localhost>

Reported-by: Ryan C. Thompson <rct@thompsonclan.org>
<8861c9e9-6c19-ea8f-6a90-7a466782096f@thompsonclan.org>
2020-04-26 01:29:33 -04:00
Nicolas Goaziou 14d6f95bec element: Tiny refactoring
* lisp/org-element.el (org-element-object-restrictions): Use
`minimal-set' to express the common denominator between restrictions.
2020-04-25 15:58:33 +02:00
Nicolas Goaziou b3a59c858d org-element: Tiny speed-up for empty statistics cookies
* lisp/org-element.el (org-element--object-lex): Branch earlier for
empty statistics cookies.
2020-04-25 14:43:51 +02:00
Nicolas Goaziou 94c2ef7d09 element: Small speed-up in object parsing
* lisp/org-element.el (org-element--object-lex): Branch earlier for
footnote references.
2020-04-25 14:40:23 +02:00
Nicolas Goaziou 12515da332 Fix LaTeX fragments fontification
* lisp/org.el (org-do-latex-and-related): Limit false positive, e.g.,
in ORG-NEWS file.  Small speedup.
2020-04-24 00:52:14 +02:00
Nicolas Goaziou 4a27b67fd2 org-element: Fix property drawers parsing
* lisp/org-element.el (org-element--next-mode): Properly handle first section.
* lisp/org-lint.el (org-lint-obsolete-properties-drawer): Ignore
document-level property drawers.
* testing/lisp/test-org-lint.el (test-org-lint/obsolete-properties-drawer):
Add tests.
2020-04-22 16:06:43 +02:00
Brian Powell bc90264ac6 ox-html: Add customizable format string for equations
* lisp/ox-html.el (org-html-equation-reference-format): New variable.
* doc/org-manual.org update to reference new variable
2020-04-21 19:44:03 +02:00
Nicolas Goaziou 5afacc5fce Do not apply drawer face also on indentation
* lisp/org.el (org-fontify-drawers): Do not apply drawer face also on
indentation.

Reported-by: Norman Tovey-Walsh <ndw@nwalsh.com>
<http://lists.gnu.org/r/emacs-orgmode/2020-04/msg00330.html>
2020-04-21 18:42:43 +02:00
Claudiu ba7d20fcc3 ox: add Romanian translation
* lisp/ox.el (org-export-dictionary): Add Romanian translation.

TINYCHANGE
2020-04-21 18:36:19 +02:00
Kyle Meyer bab2995c71 Merge branch 'maint' 2020-04-20 20:47:24 -04:00
Leo Vivier 41fe010868 Fix docstring typo
* lisp/org.el (org-mode-map): Fix typo.

TINYCHANGE
2020-04-20 20:47:09 -04:00
Kyle Meyer c716b7c085 org-id: Allow file name to be overridden on ID creation
* lisp/org-id.el (org-id-overriding-file-name): New variable.
(org-id-get): Prefer org-id-overriding-file-name over the buffer's
file name if set.
(org-id-locations-load): Give a more informative error when file is
nil.
* lisp/org.el (org-clone-subtree-with-time-shift): Let-bind
org-id-overriding-file-name, enabling an ID to be created for a cloned
subtree rather than crashing with a type error.

Note that, before 9865e6bd8 (org-id: Speedup, minor functional change
and fix, 2019-08-01), this wouldn't fail with a type error.  However,
the ID would not be added correctly because org-id-add-location simply
wouldn't process the ID at all if the passed file was nil.

Reported-by: Ian Eure <ian@retrospec.tv>
<87a73caayj.fsf@phaktory>
2020-04-20 20:46:56 -04:00
Mattias Engdegård e69937ddac Backport commit 6a60701bb from Emacs
* lisp/org-table.el (org-table-finish-edit-field):
Further improvement of regexp, as suggested by Paul Eggert.

Improve regexp in org-table-finish-edit-field
6a60701bba3d87f5d9a1730e18b6da827f41a062
Mattias Engdegård
Thu Apr 16 19:53:10 2020 +0200
2020-04-20 00:42:44 -04:00
Mattias Engdegård 989a51105c Backport commit d5a7df8c0 from Emacs
* lisp/ob-core.el (org-babel-remove-temporary-directory): Use
directory-files-no-dot-files-regexp.

Use directory-files-no-dot-files-regexp wherever possible
d5a7df8c02f04102d50a5cd2290262f59f2b1415
Mattias Engdegård
Thu Apr 16 12:14:38 2020 +0200
2020-04-20 00:42:44 -04:00
Mattias Engdegård 37c916d90c Backport commit 905c0a13f from Emacs
* lisp/org-table.el (org-table-finish-edit-field):
Avoid wrapped subsumption in repeated sequences.

Fix bugs, inefficiencies and bad style in regexps
905c0a13f7929298cb36151f46dbef03f7bdcbe4
Mattias Engdegård
Thu Apr 16 12:14:38 2020 +0200
2020-04-20 00:42:44 -04:00
Kyle Meyer b359de549e Merge branch 'maint' 2020-04-20 00:42:38 -04:00
Mattias Engdegård bf99b6dc11 Backport commit 4acdd7fe5 from Emacs
* lisp/ob-core.el (org-babel-remove-temporary-directory):
Use (rx (or (not ".") "...")), translated into "[^.]\\|\\.\\.\\.", to
match anything but "." and "..".

Fix edge case errors in filename-matching regexps
4acdd7fe58ae9f94102afeca67b0383141d597da
Mattias Engdegård
Tue Apr 14 12:25:16 2020 +0200

Note(km): Replaced bare "." with (any ".") for Emacs < 27
compatibility.  4acdd7fe5 was on the emacs-27 branch, but a commit on
their master (d5a7df8c0) will supersede this.
2020-04-20 00:41:39 -04:00
Nicolas Goaziou 0d1d56f86a Merge branch 'maint' 2020-04-19 00:04:27 +02:00
Nicolas Goaziou eb2d6a8cd4 Fix some fontification issues
* lisp/org.el (org-inside-LaTeX-fragment-p): properly find limit.

This commit partly reverts ad8e508e93.
2020-04-19 00:02:53 +02:00
Nicolas Goaziou 62f197103f compat: Silence byte-compiler
* lisp/org-compat.el (org-hide-block-toggle-maybe): Tiny refactoring.
2020-04-18 19:37:41 +02:00
Nicolas Goaziou 43956c693b Small refactoring to `org-cycle'
* lisp/org.el (org-cycle): Integrate new folding functions for
drawers.  Small refactoring, in particular to minimize the number of
calls to `org-element-at-point'.
2020-04-18 18:34:56 +02:00
Nicolas Goaziou 692f191f84 Refactor block and drawer visibility toggling
* lisp/org.el (org--hide-wrapper-toggle): New function.
(org-hide-block-toggle):
(org-hide-drawer-toggle): Use new function.
2020-04-18 18:34:56 +02:00
Nicolas Goaziou 4fbc36a057 Deprecate `org-hide-block-toggle-all'
* lisp/org.el (org-hide-block-toggle-all): move...
* lisp/org-compat.el (org-hide-block-toggle-all): ... here.
2020-04-18 18:34:56 +02:00
Nicolas Goaziou cd9e000d86 Deprecate `org-hide-block-toggle-maybe'
* lisp/org.el (org-hide-block-all): Use `org-hide-block-toggle'.
(org-hide-block-toggle-maybe): move...
* lisp/org-compat.el (org-hide-block-toggle-maybe): ... here.
2020-04-18 18:34:56 +02:00
Nicolas Goaziou 09f1b74f25 Change signature for `org-hide-block-toggle'
* lisp/org.el (org-hide-block-toggle): Add two optional arguments.
Small refactoring.
2020-04-18 18:34:55 +02:00
Nicolas Goaziou b4f77b1f9a Deprecate `org-flag-drawer'
* testing/lisp/test-org.el (test-org/flag-drawer): Remove tests.
* lisp/org-clock.el (org-clock-jump-to-current-clock):
* lisp/org.el (org-cycle-hide-drawers): Use `org-hide-drawer-toggle'
instead.
(org-insert-drawer)
(org-hide-drawer-toggle): Use `org-flag-region' instead.
(org-flag-drawer): move...
* lisp/org-compat.el (org-flag-drawer): ... here.
2020-04-18 18:34:55 +02:00