Commit Graph

23165 Commits

Author SHA1 Message Date
Nicolas Goaziou 48b223d45d Fix test
* testing/lisp/test-org.el (test-org/return): Use `call-interactively'
so that `interactive' arguments are also checked.
2020-05-15 00:48:26 +02:00
Nicolas Goaziou 817acdcdfb manual: Small rewording
* doc/org-manual.org (Attachments): Avoid using "cloud" term.
(Attachment defaults and dispatcher): Use present tense.
(Attachment options): Use Org attach instead of symbol org-attach.
2020-05-14 23:56:52 +02:00
Nicolas Goaziou 99bb514f7f Follow links with RET even in read-only buffers
* lisp/org.el (org-return): Fix `interactive' arguments.
* testing/lisp/test-org.el (test-org/return): Add test.

Reported-by: Gregor Zattler <telegraph@gmx.net>
<http://lists.gnu.org/r/emacs-orgmode/2020-05/msg00247.html>
2020-05-14 23:28:10 +02:00
Nicolas Goaziou 37a5020bbe id: Faster `org-id-update-id-locations'
* lisp/org-id.el (org-id-update-id-locations): Do not copy contents of
files in order to parse them.
2020-05-14 22:56:29 +02:00
Nicolas Goaziou 4a727d2cfc manual: Some typographical fixes
* doc/org-manual.org (Global and local cycling):
(Initial visibility): Use complete sentences.  Use @var{...} for
meta-syntactical variables.  Do not capitalize CONTENTS.
2020-05-14 15:21:11 +02:00
stardiviner 1abf4f600a pcomplete: improve header arguments completion
* lisp/org-pcomplete.el (pcomplete/org-mode/block-option/src): Make it
complete all available header arguments.

* testing/lisp/test-org-pcomplete.el (test-org-pcomplete/src-block):
New test.
2020-05-14 14:52:30 +02:00
Kyle Meyer cd2b108d22 manual: Update for change in org-startup-folded default
* doc/org-manual.org (Initial visibility):
(Summary of In-Buffer Settings): Update description of
org-startup-folded default, which changed in 88f5ed91c.

Reported-by: Charles Millar <millarc@verizon.net>
<708b3f3d-147b-a798-52cf-a13809c7470f@verizon.net>
2020-05-14 00:00:27 -04:00
Kyle Meyer 8d3f9e4de2 CONTRIBUTE: Fix "maintenance" typos
Reported-by: Jonas Bernoulli <jonas@bernoul.li>
<20200513202909.23448-1-jonas@bernoul.li>
2020-05-13 23:35:40 -04:00
Jonas Bernoulli 71604cbc2d Fix typos 2020-05-13 23:27:49 -04:00
Nicolas Goaziou 3dc582c8d5 list: Tiny fix to a docstring
* lisp/org-list.el (org-sort-list): Remove escaped parenthesis.
2020-05-13 19:10:35 +02:00
Nicolas Goaziou c76bacc483 ob: Ignore RESULTS keyword case
* lisp/ob-core.el (org-babel-current-result-hash):
(org-babel-hide-hash):
(org-babel-hide-all-hashes):
(org-babel-result-hide-all):
(org-babel-hide-result-toggle-maybe):
(org-babel-hide-result-toggle):
(org-babel--clear-results-maybe):
(org-babel-remove-result): Bind `case-fold-search' to t before looking
for `org-babel-result-regexp'.
2020-05-13 18:13:18 +02:00
Nicolas Goaziou 89c759f3ad ob: Replace angle brackets with parenthesis in Babel hashes
* lisp/ob-core.el (org-babel-hash-show-time): Remove
unnecessary :version keyword.
(org-babel-result-regexp):
(org-babel--insert-results-keyword): Remove angle brackets from time
stamp in hash.
* testing/lisp/test-ob.el (test-ob/where-is-src-block-result): Update
test.

Reported-by: stardiviner <numbchild@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2020-05/msg00198.html>
2020-05-13 15:35:56 +02:00
Kyle Meyer 4349402f3f Merge branch 'maint' 2020-05-12 22:47:05 -04:00
Kyle Meyer 7684b59c78 colview: Display active time stamps as inactive
* lisp/org-colview.el (org-columns--displayed-value): Convert active
time stamp values to inactive time stamps to avoid duplicate entries
in the agenda.
* testing/lisp/test-org-colview.el (test-org-colview/dblock): Add
tests.
2020-05-12 22:44:57 -04:00
Stacey Marshall 1228b73313 org-capture: Allow for no file extension on open-source protocol
* lisp/org-capture.el (org-protocol-open-source): Remove requirement
to have :online-suffix and :working-suffix.

The problem here was that two assignments expected suffix's to be
provided in org-protocol-project-alist.  When they were missing an
error occurred.  With the changes source URLs that include the file
name as-is, such as those presented by openGrok, may be opened.

TINYCHANGE
2020-05-12 16:40:26 +02:00
Nicolas Goaziou 88f5ed91c5 `org-startup-folded' defaults to `showeverything'
* lisp/org.el (org-startup-folded): New default value.

See <http://lists.gnu.org/r/emacs-orgmode/2020-04/msg00452.html>.
2020-05-12 12:33:21 +02:00
Nicolas Goaziou 20c1322194 Small fix in `org-cycle-hide-property-drawers'
* lisp/org.el (org-cycle-hide-property-drawers): Ignore case when
looking for the end of a property drawer.
2020-05-10 23:55:12 +02:00
Kyle Meyer 75902a4732 manual: Fix special property descriptions for DEADLINE/SCHEDULED
* doc/org-manual.org (Special Properties): Remove claim that angular
brackets are stripped from DEADLINE and SCHEDULED time stamps, which
has not been true since v8.3, specifically 8d8ad9838.

It doesn't seem like 8d8ad9838 (Rewrite `org-entry-properties',
2014-09-30) intended to change this behavior, but let's stick with it
because some spots in Org's code base depend on it and it's likely
that third-party code does too.

Also, replace "time string" with "timestamp" in DEADLINE's description
for consistency with the other descriptions.
2020-05-10 17:22:32 -04:00
Nicolas Goaziou 7801e92369 Merge branch 'maint' 2020-05-10 14:54:36 +02:00
Yuri D. Lensky 3bbaca1660 ob-latex: Stop ignoring headers argument
lisp/ob-latex.el: During default "png" export, the "headers" argument
is no longer explicitly ignored.
2020-05-10 14:53:11 +02:00
Nicolas Goaziou 20f0299bc3 ox-latex: Do not center images in image links
* lisp/ox-latex.el (org-latex--inline-image): Do not center image when
it is the description of a link.

Reported-by: Arne Babenhauserheide <arne_bab@web.de>
<http://lists.gnu.org/r/emacs-orgmode/2020-05/msg00157.html>
2020-05-10 14:43:40 +02:00
Nicolas Goaziou 6076f40cae Better checks to avoid re-hiding folded drawers
* lisp/org.el (org-hide-drawer-all): Hide regular drawers even in
folded headlines.  They do not use the same invisibility spec.
However, when the heading is folded, still ignore property drawers.
(org-cycle-hide-property-drawers): Only skip property drawers folded
with or inside `outline' overlays.
2020-05-10 11:14:40 +02:00
Nicolas Goaziou eabc9712b7 Fix code typo.
* lisp/org.el (org-cycle-hide-property-drawers): Fix code typo.
2020-05-10 10:46:21 +02:00
Kyle Meyer af3def5d06 Silence recent 'make single' compiler warnings
And remove the org-return-indent declaration in org-keys.el, which is
not needed as of d3e6b5800 (Make RET and C-j obey
`electric-indent-mode', 2020-05-05).
2020-05-09 22:36:00 -04:00
Nicolas Goaziou 1bf2b33e27 Refactor `org-global-cycle'
* lisp/org.el (org-global-cycle): Small refactoring. Always assume
`org-mode' as major mode.  Show all is not necessary.
2020-05-10 02:22:19 +02:00
Nicolas Goaziou a9ba5dc2dc Fix `org-content'
* lisp/org.el (org-content): Use Org function instead of Outline's for
a small speed-up. Properly handle numeric argument.
2020-05-10 02:20:52 +02:00
Nicolas Goaziou f1c0f34772 Small speed-up to `org-overview'
* lisp/org.el (org-overview): Use direct Org function instead of
Outline's for a slight speed-up.
2020-05-10 02:19:43 +02:00
Nicolas Goaziou c744d3cf4c Do not fold drawers hidden inside folded blocks
* lisp/org.el (org-hide-drawer-all):
(org-cycle-hide-property-drawers): Do not fold invisible drawers,
ignoring the type of invisibility spec.
2020-05-09 23:41:39 +02:00
Kyle Meyer b0fb4599c7 Merge branch 'maint' 2020-05-09 15:54:44 -04:00
Matt Lundin 6e50b22ff0 Fix bug that placed cursor incorrectly when setting tags
* lisp/org.el (org-set-tags-command): Only fix cursor position in very
specific circumstances (i.e., when cursor is on an empty headline).
* testing/lisp/test-org.el (test-org/set-tags-command): Add tests
related to point position.

Modified-by: Kyle Meyer <kyle@kyleam.com>
  Adjusted for review comments and added tests.
2020-05-09 15:50:37 -04:00
Nicolas Goaziou e73732f14a compat: Silence byte-compiler
* lisp/org-compat.el (org-cycle-hide-drawers): Ignore optional
argument.
2020-05-09 19:10:47 +02:00
Nicolas Goaziou 92bc33287e Do not fold property drawers in already folded areas
* lisp/org.el (org-cycle-hide-property-drawers): Do not re-fold
drawer.
2020-05-09 19:09:39 +02:00
Nicolas Goaziou 76f5cbd5a5 Properly hide new property drawers
* lisp/org.el (org-insert-property-drawer): Fix typo.
2020-05-09 18:56:34 +02:00
Nicolas Goaziou 3435b05922 Do not move point when cycling subtree visibility
* lisp/org.el (org-cycle-hide-property-drawers): Fix a bug introduced
in 1027e02569.
2020-05-09 18:35:11 +02:00
Kyle Meyer 86ec470bfc Correct :package-version typo from 1027e0256
* lisp/org.el (org-cycle-hook): Fix recent typo in package-version
value.
2020-05-09 11:14:46 -04:00
Nicolas Goaziou 074ea1629c Deprecate `org-cycle-hide-drawers'
* lisp/org.el (org-hide-drawer-all): New function.
(org-cycle-hide-drawers): move...
* lisp/org-compat.el (org-cycle-hide-drawers): ... here.
* lisp/org-agenda.el (org-agenda-show-1): Remove use of
`org-cycle-hide-drawers'.
2020-05-09 15:30:02 +02:00
Nicolas Goaziou 1027e02569 Implement `org-cycle-hide-property-drawers'
* lisp/org.el (org-cycle-hide-property-drawers): New function.
(org-set-startup-visibility):
(org-clean-visibility-after-subtree-move):
(org-sort-entries):
(org-cycle-hook):
(org-show-entry):
* lisp/org-agenda.el (org-agenda-show-and-scroll-up): Use new function.
2020-05-09 15:20:39 +02:00
Nicolas Goaziou 8b05c06d42 Use `outline' invisibility spec for property drawers
* lisp/org.el (org--hide-wrapper-toggle): Use `outline' invisibility
spec when hiding a property drawer.
(org-cycle): Fix typo.
2020-05-09 13:30:27 +02:00
Nicolas Goaziou ed0e75d241 Fix typo
* lisp/org.el (org-at-property-drawer-p): Fix typo.
* testing/lisp/test-org.el (test-org/at-property-drawer-p): Update
name and function calls.  Add a test.
2020-05-09 12:58:09 +02:00
Nicolas Goaziou 8580ef6ec1 Rename `org-at-property-block-p'
* lisp/org.el (org-at-property-drawer-p): New name.
* lisp/org-compat.el (org-at-property-block-p): Obsolete alias.
2020-05-09 12:50:34 +02:00
Nicolas Goaziou 7e7f5c6f03 Rewrite `org-at-property-block-p'
* lisp/org.el (org-comment-regexp): New variable.
(org-at-property-block-p): Rewrite function to check syntax locally.
(org-at-comment-p): Use new variable.
2020-05-09 12:47:37 +02:00
Nicolas Goaziou e39365e32f table: Avoid unnecessary consing
* lisp/org-table.el (org-table-align): Avoid unnecessary consing.
2020-05-09 10:44:43 +02:00
Nicolas Goaziou ba7bf12b44 table: Small refactoring of `org-table-align'
* lisp/org-table.el (org-table-align): Remove dead code.  Slightly
simplify code.
2020-05-08 23:40:57 +02:00
Nicolas Goaziou 984c7af21f table: `org-table-to-lisp' preserves text properties.
* lisp/org-table.el (org-table-to-lisp): Preserve text properties.
Otherwise, it breaks `org-table-align', which needs to know about
invisible characters.
2020-05-08 16:14:50 +02:00
Nicolas Goaziou 13195a4a5f table: Speed-up for `org-table-align'
* lisp/org-table.el (org-table-align): Use `org-table-to-lisp'.

Suggested-by: Thierry Banel <tbanelwebmin@free.fr>
2020-05-08 15:42:43 +02:00
Kyle Meyer cd61eedddb Merge branch 'maint' 2020-05-07 22:47:35 -04:00
Kyle Meyer ff56f580da capture: Correct docstring typo
* lisp/org-capture.el (org-capture--position-cursor): Correct
docstring typo.
2020-05-07 22:47:20 -04:00
Nicolas Goaziou a3d23b3a97 Add test for `org-find-property'
* testing/lisp/test-org.el (test-org/find-property): Add test.
2020-05-08 00:50:16 +02:00
Nicolas Goaziou 0edd9aee38 Merge branch 'maint' 2020-05-07 22:37:02 +02:00
Nicolas Goaziou 09086b7e75 Fix capturing plain text with :unnarrowed property and no "%?" marker
* lisp/org-capture.el (org-capture-narrow): Remove undocumented point
move.
(org-capture--position-cursor): New function.
(org-capture-place-entry):
(org-capture-place-item):
(org-capture-place-table-line):
(org-capture-place-plain-text): Use new function.
* testing/lisp/test-org-capture.el (test-org-capture/plain): Add test.

Reported-by: No Wayman <iarchivedmywholelife@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2020-05/msg00095.html>
2020-05-07 22:35:13 +02:00