Commit Graph

5010 Commits

Author SHA1 Message Date
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
Nicolas Goaziou e6cd5a50d1 Drawer visibility tooling mimics blocks'
* lisp/org.el (org-hide-drawer-toggle): New function.
(org-flag-drawer): Assume either a parser drawer or buffer positions
are provided.  Remove unnecessary checks, since this is a low-level function.
* testing/lisp/test-org.el (test-org/hide-drawer-toggle): New test.
(test-org/flag-drawer):
(test-org/show-set-visibility): Update tests.
2020-04-18 18:34:55 +02:00
Kyle Meyer 9994e8ee89 org.el: Silence some byte-compiler warnings
The remaining ones are related to the org-refile.el movement in
f636cf91b (New org-refile.el file with refile definitions,
2020-02-05).
2020-04-15 22:00:51 -04:00
Kyle Meyer 65f5bb6e96 Merge branch 'maint' 2020-04-12 18:27:16 -04:00
Kyle Meyer c77edde765 org-time-stamp-inactive: Remove inaccurate statements
* lisp/org.el (org-time-stamp-inactive): Drop incorrect statements in
docstring about differences between inactive and active timestamps.

S-cursor commands work on inactive time stamp, and clicking on an
inactive time stamp visits the day in the agenda, just as it does for
an active time stamp.

Reported-by: Jorge P. de Morais Neto <jorge@disroot.org>
  <87a73gstpz.fsf@disroot.org>
2020-04-12 18:26:31 -04:00
Gustav Wikström 8e3b73d4dc Allow storing and following ID links before first heading
* lisp/org.el (org-find-property): Make org-find-property work
  correctly also before first heading.

* lisp/org-id.el (org-id-store-link): Make it possible to store ID
  links also before first heading.
2020-04-10 10:04:12 +02:00
Kyle Meyer 9e385d1bab Merge branch 'maint' 2020-04-09 22:29:48 -04:00
Kyle Meyer 6f1b837492 Silence byte-compiler
These both show up when compiling files separately (e.g., 'make
single').

ob-core already assumes ob-tangle is loaded based on declared
functions, presumably because ob.el is given responsibility for
collectively loading these pieces.  org.el loads org-attach within the
body of a function before calling org-attach-dir.
2020-04-09 22:27:06 -04:00
Nicolas Goaziou 44ec473c19 Small fix
* lisp/org.el (org-set-tags-command): Also avoid using `looking-back',
in particular without a LIMIT argument.  This silences the
byte-compiler.

(cherry picked from commit 83518daf11)
2020-04-09 22:25:30 -04:00
Kyle Meyer 06c7a54f0b org-shift*: Honor org-support-shift-select for table cell movement
* lisp/org.el (org-support-shift-select): Mention table context.
(org-shiftup):
(org-shiftdown):
(org-shiftright):
(org-shiftleft): Don't move table cells when org-support-shift-select
is `always'.

Reported-by: Vladimir Panteleev <thecybershadow@gmail.com>
<CAHhfkvw8O4cSxe5CJXQ8L+ce+9wOhuM==Xv9rB2NVhsCgYANdA@mail.gmail.com>
2020-04-09 22:24:55 -04:00
Kyle Meyer 4fde1ce64a Merge branch 'maint' 2020-04-08 22:57:05 -04:00
Leo Vivier acd1635966 org: Fix docstring typo
* lisp/org.el (org-time-stamp-inactive): Change ‘active’ to ‘inactive’
in the docstring.

TINYCHANGE
2020-04-08 22:55:00 -04:00
Nicolas Goaziou fb593f7556 Handle ".+" repeater with hours step
* doc/org-manual.org (Repeated tasks): Document new feature.
* lisp/org.el (org-auto-repeat-maybe): Repeat from now when ".+" is
used in conjunction of hours increment.
* testing/lisp/test-org.el (test-org/auto-repeat-maybe): Add tests.
2020-04-06 15:18:48 +02:00
Nicholas Vollmer 097b4e6ca0 Use defvaralias for priority variable aliases
* lisp/org.el (org-highest-priority):
(org-lowest-priority):
(org-default-priority): Define as a variable alias, not a function
alias.

When these variables were renamed in e11f50648 (2020-01-30), variable
aliases were defined for the old names, but these were incorrectly
switched to function aliases in e062ca719 (org.el: Use `defalias' for
priority aliases, 2020-02-24).

<https://lists.gnu.org/archive/html/emacs-orgmode/2020-03/msg00083.html>

TINYCHANGE
2020-03-23 23:48:39 -04:00
Mattias Engdegård 0c046aecf0 Backport commit 0c6c8aa00 from Emacs
See discussion at
https://lists.gnu.org/archive/html/emacs-devel/2020-01/msg00749.html .

* lisp/org-element.el (org-element--cache-sync-requests):
* lisp/org.el (org-sparse-tree):
Remove redundant backslashes.

Remove (or double) redundant backslashes in string literals
0c6c8aa002d321db61afdd14c70744f7bc27f268
Mattias Engdegård
Fri Jan 24 23:04:34 2020 +0100
2020-03-15 22:51:31 -04:00
Kyle Meyer fed3c07390 Update customize-package-emacs-version-alist
* lisp/org.el (customize-package-emacs-version-alist): Map Org 9.4 to
Emacs 28.1.

Emacs 27 is nearing release.  A sync of 9.4 would be with the current
version for Emacs's master branch.
2020-03-15 22:51:24 -04:00
Bastien 30d0b6e1f6 org.el: Tiny enhancements `org-format-latex-as-html'
* lisp/org.el (org-create-math-formula): Use `warn'.
(org-format-latex-as-html): Don't set a free variable, return
the string directly.
2020-02-24 11:43:45 +01:00
Bastien e062ca7199 org.el: Use `defalias' for priority aliases.
* lisp/org.el (org-highest-priority, org-lowest-priority)
(org-default-priority): Use `defalias'.
2020-02-24 11:41:33 +01:00
Bastien 3a543a981b Enhancements to `org-latex-to-html-convert-command'
* lisp/org.el (org-latex-to-html-convert-command): Fix option.

* etc/ORG-NEWS: Document `org-latex-to-html-convert-command'
as a new option.
2020-02-24 11:21:40 +01:00
Matt Huszagh 860cfe7f13 Add an option to convert LaTeX fragments to HTML
* lisp/org.el (org-latex-to-html-convert-command): New option to
convert a LaTeX fragment directly into HTML.
(org-format-latex): Use the new option.
(org-format-latex-as-html): Do the conversion and return HTML.
* lisp/ox-html.el (org-html-with-latex): Document the 'html symbol.
(org-html-format-latex): This custom HTML conversion, like MathJax,
doesn't require preprocessing.
(org-html-latex-fragment): Use the new option.

This allows you to set a custom command
`org-latex-to-html-convert-command' that will take as input a LaTeX
fragment and use it to generate HTML for export.  This is very
open-ended in the sense that you can use any shell-command you
want.  This has been added in order to use latexml, but you could
use any other tool that generates HTML output text.
2020-02-24 11:16:01 +01:00
Nicolas Goaziou fe5962ce9b Fix some time stamps regexps
* lisp/org.el (org-ts--internal-regexp): New variable.
(org-ts-regexp):
(org-ts-regexp-inactive):
(org-ts-regexp-both): Use new variable.
(org-maybe-keyword-time-regexp): Remove variable.
(org-logbook-drawer-re): Simplify regexp.

Also move "Timestamp" section higher in the library (topological
order). This change should pacify "Relint" checks.
2020-02-23 12:41:33 +01:00
Nicolas Goaziou 83518daf11 Small fix
* lisp/org.el (org-set-tags-command): Also avoid using `looking-back',
in particular without a LIMIT argument.  This silences the
byte-compiler.
2020-02-23 10:30:22 +01:00
Bastien e360cd8f3a Change the default values for several options
* doc/org-manual.org (Execute commands in the active region):
Update the manual given the new defaults.

* etc/ORG-NEWS (New default settings for some options): New
section.

* lisp/org.el (org-loop-over-headlines-in-active-region):
Change the default value to `t'.
(org-fontify-done-headline): Ditto.

* lisp/org-agenda.el
(org-agenda-loop-over-headlines-in-active-region): Ditto.

* lisp/org-src.el (org-src-tab-acts-natively): Ditto.
2020-02-21 16:35:56 +01:00
Bastien 450452de4b org.el: Two minor fixes
* lisp/org.el (org-set-tags-command): Fix point position after
setting tag at the beginning of a blank heading.
(org-kill-line): Prevent from throwing an error when killing
the headline while point is right after the * chars.
2020-02-21 16:12:28 +01:00
Bastien 05f294ec5b org.el: Two minor fixes
* lisp/org.el (org-set-tags-command): Fix point position after
setting tag at the beginning of a blank heading.
(org-kill-line): Prevent from throwing an error when killing
the headline while point is right after the * chars.
2020-02-21 16:12:11 +01:00
Bastien 6f943b1da5 org.el (org-use-sub-superscripts): Remove old comment in docstring
* lisp/org.el (org-use-sub-superscripts): Remove old comment
in docstring.
2020-02-19 22:26:47 +01:00
Bastien bc75b75d9f org.el (org-special-ctrl-k): Enhance docstring
* lisp/org.el (org-special-ctrl-k): Enhance docstring.

Thanks to Marco Wahl for suggesting this change.
2020-02-19 21:43:31 +01:00
Bastien 39f1c1f1e1 Merge branch 'maint' 2020-02-19 14:35:05 +01:00
Bastien 10607d45ae org.el: Fix typo in docstring
* lisp/org.el (org-special-ctrl-k): Fix typo in docstring.
2020-02-19 14:34:58 +01:00
Bastien fae16ed8f5 Add `generated-autoload-file' buffer local variable
* lisp/org.el:
* lisp/org-num.el:
* lisp/org-macs.el:
* lisp/org-list.el:
* lisp/org-lint.el:
* lisp/org-keys.el:
* lisp/org-goto.el:
* lisp/org-duration.el:
* lisp/org-compat.el:
* lisp/org-colview.el:
* lisp/org-capture.el:
* lisp/org-agenda.el:
* lisp/ol.el: Add `generated-autoload-file' buffer local variable.

This is needed when compiling Org files within GNU Emacs.
2020-02-18 23:37:24 +01:00
Bastien 6a1f6ee1f8 Tiny formatting fixes
* lisp/ox.el (org-export-table-dimensions):
* lisp/ox-texinfo.el (org-texinfo-template):
* lisp/ox-md.el (org-md-link):
* lisp/ox-icalendar.el (org-icalendar-use-UTC-date-time-p):
* lisp/ox-ascii.el (org-ascii-fixed-width):
* lisp/org.el (org-context):
* lisp/org-table.el (org-table-eval-formula)
(org-table-export):
* lisp/org-refile.el:
* lisp/org-plot.el (org-plot/gnuplot-to-grid-data):
* lisp/org-num.el (org-num):
* lisp/org-mouse.el (org-mouse-popup-global-menu)
(org-mouse-context-menu):
* lisp/org-macro.el (org-macro):
* lisp/org-lint.el (org-lint):
* lisp/org-keys.el (org-keys):
* lisp/org-duration.el:
* lisp/org-clock.el (org-clock-get-last-clock-out-time)
(org-clock-update-mode-line, org-find-open-clocks):
* lisp/org-agenda.el (org-diary)
(org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item)
(org-agenda-highlight-todo, org-cmp-alpha)
(org-agenda-filter-by-category):
* lisp/ol.el (org-link-expand-abbrev, ol):
* lisp/ol-docview.el (ol-docview):
* lisp/ol-bibtex.el (org-execute-file-search-in-bibtex)
(org-bibtex, org-bibtex-read):
* lisp/ol-bbdb.el (org-bbdb-anniversary-description):
* lisp/ob-tangle.el (org-babel-tangle-jump-to-org):
* lisp/ob-table.el (org-babel-table-truncate-at-newline):
* lisp/ob-stan.el:
* lisp/ob-sqlite.el (org-babel-sqlite-table-or-scalar):
* lisp/ob-sql.el:
* lisp/ob-shen.el:
* lisp/ob-shell.el (org-babel-prep-session:shell)
(org-babel-prep-session:shell):
* lisp/ob-sed.el (org-babel-execute:sed)
(org-babel-execute:sed):
* lisp/ob-screen.el:
* lisp/ob-sass.el:
* lisp/ob-ruby.el (org-babel-prep-session:ruby)
(org-babel-prep-session:ruby):
* lisp/ob-ref.el (org-babel-ref-resolve, ob-ref):
* lisp/ob-python.el (org-babel-prep-session:python)
(org-babel-prep-session:python):
* lisp/ob-plantuml.el:
* lisp/ob-picolisp.el:
* lisp/ob-perl.el:
* lisp/ob-org.el:
* lisp/ob-octave.el (org-babel-prep-session:octave)
(org-babel-prep-session:octave)
(org-babel-octave-evaluate-session):
* lisp/ob-ocaml.el:
* lisp/ob-mscgen.el (org-babel-execute:mscgen)
(org-babel-execute:mscgen):
* lisp/ob-maxima.el:
(ob-maxima):
* lisp/ob-matlab.el:
* lisp/ob-makefile.el:
* lisp/ob-lua.el (org-babel-prep-session:lua)
(org-babel-prep-session:lua):
* lisp/ob-lisp.el:
* lisp/ob-ledger.el:
* lisp/ob-latex.el (org-babel-expand-body:latex)
(org-babel-expand-body:latex, ob-latex):
* lisp/ob-js.el:
* lisp/ob-java.el:
* lisp/ob-io.el (org-babel-prep-session:io)
(org-babel-prep-session:io):
* lisp/ob-hledger.el:
* lisp/ob-haskell.el:
* lisp/ob-groovy.el (org-babel-groovy-wrapper-method)
(org-babel-groovy-evaluate):
* lisp/ob-gnuplot.el:
* lisp/ob-fortran.el (org-babel-expand-body:fortran)
(org-babel-expand-body:fortran):
* lisp/ob-forth.el (org-babel-forth-session-execute):
* lisp/ob-exp.el (ob-exp):
* lisp/ob-eval.el:
* lisp/ob-emacs-lisp.el:
* lisp/ob-ebnf.el:
* lisp/ob-dot.el:
* lisp/ob-ditaa.el:
* lisp/ob-css.el:
* lisp/ob-core.el (org-babel-put-rownames):
* lisp/ob-coq.el:
* lisp/ob-comint.el:
* lisp/ob-calc.el:
* lisp/ob-awk.el:
* lisp/ob-asymptote.el:
* lisp/ob-abc.el:
* lisp/ob-R.el (org-babel-prep-session:R): Formatting fixes.
2020-02-18 22:57:37 +01:00
Bastien 325962c003 org.el: New option `org-startup-numeroted' and #+startup: num
* lisp/org.el (org-startup-numeroted): New option.
(org-startup-options): New "num" and "nonum" startup keywords.
(org-mode): Startup according `org-startup-numeroted' or the
local #+startup setup.

* doc/org-manual.org (Dynamic Headline Numbering)
(Summary of In-Buffer Settings): Document
`org-startup-numeroted' and #startup: num.

* etc/ORG-NEWS: Document the new startup option.

Thanks to Guillaume MULLER for this idea.
2020-02-18 13:27:33 +01:00
Bastien f25b40621b Merge branch 'maint' 2020-02-17 14:23:00 +01:00
Bastien fb188adda0 org.el: Move `org-agenda-diary-file' to org-agenda.el
* lisp/org-agenda.el (org-agenda-diary-file): Move from org.el.
* lisp/org-colview.el (org-agenda-diary-file): Move to org-agenda.el.
2020-02-17 14:22:30 +01:00
Bastien fb3ec41dac Merge branch 'maint' 2020-02-14 08:38:03 +01:00
Bastien 29f44df758 Fix fa24cd541 again 2020-02-14 08:36:54 +01:00
Bastien 66810d2121 Bump version to 9.3.6 2020-02-13 08:47:28 +01:00
Kyle Meyer ea94a0da43 Merge branch 'maint' 2020-02-13 00:04:16 -05:00
Mattias Engdegård 7c63da6fb9 Backport commit 32763dac4 from Emacs
Since 'add-to-list', being a plain function, cannot access lexical
variables, such use must be rewritten for correctness.
(Some instances actually do work thanks to a compiler macro,
but it's not something code should rely on.)

* lisp/org.el (org-reload): Replace add-to-list with push.

Replace add-to-list to lexical variable with push (bug#39373)
32763dac46e61cc34e8fe4d19df4905d09c1a27f
Mattias Engdegård
Sat Feb 1 22:27:23 2020 +0100
2020-02-13 00:02:47 -05:00
Bastien 9712d1cdff Only fontify emphasis markers when they are visible
* lisp/org.el (org-do-emphasis-faces): Only fontify emphasis
markers when they are visible.

Thanks to d.williams for provided a bug report and this fix.
2020-02-13 00:10:33 +01:00
Bastien be93859c78 org.el (org-babel-load-file): Load emacs-lisp and elisp src blocks
* lisp/org.el (org-babel-load-file): Load both "emacs-lisp"
and "elisp" source blocks.

* lisp/ob-tangle.el (org-babel-tangle-file)
(org-babel-tangle, org-babel-tangle-collect-blocks): Use a
regular expression to match the language(s) to tangle.

Thanks to Troy Hinckley for reporting this.
2020-02-12 22:40:45 +01:00
Bastien 73445c0fab Merge branch 'maint' 2020-02-12 17:56:43 +01:00
Bastien fa24cd541d org.el (org-babel-load-file): Don't get fooled by symlinks
* lisp/org.el (org-babel-load-file): Don't get fooled by symlinks.
2020-02-12 17:43:02 +01:00
Bastien ea47d9ebb4 Merge branch 'maint' 2020-02-12 11:27:55 +01:00
Bastien a03e57cdaf Bump version for 9.3.5 2020-02-12 11:27:01 +01:00
Bastien 4028cc731b Use "#+attr_org: :radio" before lists to enable radio buttons
* doc/org-manual.org (Checkboxes): Document the use of
"#+attr_org".

* lisp/org.el (org-ctrl-c-ctrl-c): When the list at point is
preceded by "#+attr_org: :radio" use `org-toggle-radio-button'
instead of `org-toggle-checkbox'.

* lisp/org-list.el (org-at-radio-list-p): New defsubst.
(org-toggle-checkbox): Use it.

* etc/ORG-NEWS: Document the use of "#+attr_org".
2020-02-12 01:51:46 +01:00
Bastien 561feb128d Add `org-toggle-radio-button' and related minor mode
* doc/org-manual.org (Checkboxes): Document the new minor mode
and command.

* lisp/org-keys.el (org-mode-map): Bind C-c C-x C-r to
`org-toggle-radio-button'.

* lisp/org-list.el (org-list-checkbox-radio-mode): New minor
mode to let C-c C-c call `org-toggle-radio-button' instead of
`org-toggle-checkbox'.
(org-toggle-radio-button): New command.

* lisp/org.el (org-ctrl-c-ctrl-c): Use `org-toggle-radio-button'.

* etc/ORG-NEWS: Document the new minor mode and command.

Thanks to Phil Sainty for sharing this idea and links to similar
implementations.
2020-02-11 23:55:53 +01:00
Bastien 0330efc865 Merge branch 'maint' 2020-02-11 10:08:14 +01:00
Bastien 95ff24dfc4 org.el: Fix bug occurring when setting effort value
* lisp/org.el (org-refresh-property)
(org-refresh-category-properties): Tiny docstring or comment
fixes.
(org-set-effort): Fail early when the effort value is wrong.

Thanks to Firmin Martin for reporting this.
2020-02-11 10:06:13 +01:00
Bastien e83b2b50df Merge branch 'maint' 2020-02-11 07:54:47 +01:00
Bastien f7175e4878 org.el: Fix bug about cycling
* lisp/org.el (org-cycle-internal-local): Handle
`org-cycle-include-plain-lists'.

Thanks to Bruce Tulloch for reporting this.
This fixes a bug introduced in commit c2aebcee.
2020-02-11 07:54:36 +01:00
Marco Wahl 1c6336652b org: Tiny refactoring
* lisp/org.el (org-redisplay-inline-images): Save one line
of code.  Also make the docstring more precise.
2020-02-10 13:10:08 +01:00
Bastien 63ca986bea Fix e3b79ad2b 2020-02-10 08:48:55 +01:00
Bastien e4be72d14b org.el: Fix typo in docstring
* lisp/org.el (org-startup-truncated): Fix typo in docstring.
2020-02-10 00:33:54 +01:00
Bastien 2096c9c76f org.el: Tiny code cleanup
* lisp/org.el (org-fixup-indentation): Remove redundant
`save-excursion'.
2020-02-09 18:25:35 +01:00
Bastien 97269bc6fa Merge branch 'maint' 2020-02-09 17:48:41 +01:00
Bastien a0f3bbd3c2 Revert "org.el: Fix `org-indent-region' bug in source block"
This reverts commit 321b119c44.
2020-02-09 17:48:19 +01:00
Bastien e3b79ad2bf Allow a new value for `org-adapt-indentation'
* doc/org-manual.org (Hard indentation): Add a footnote
mentioning the new value for `org-adapt-indentation'

* etc/ORG-NEWS: Mention the new value for
`org-adapt-indentation'.

* lisp/org.el (org-logbook-drawer-re): New constant.
(org-adapt-indentation): Allow 'headline-data as a new value
to only adapt indentation for headline data.
(org-fixup-indentation, org--get-expected-indentation): Handle
`org-adapt-indentation' set to 'headline-data.

* lisp/org-indent.el (org-indent-mode)
(org-indent-add-properties): Handle `org-adapt-indentation'
set to 'headline-data.

* lisp/org-clock.el (org-clock-in): Call `org-indent-line'
after clock timestamp insertion.
2020-02-09 17:30:42 +01:00
Bastien 88794cab06 New option `org-clock-auto-clockout-timer'
* etc/ORG-NEWS (New option ~org-clock-auto-clockout-timer~):
Mention the new option `org-clock-auto-clockout-timer'.

* doc/org-manual.org (Clocking out automatically after some
idle time): Document `org-clock-auto-clockout-timer'.

* lisp/org.el (org-clock-auto-clockout-insinuate): New
function to add a hook for auto-clocking out the current tasks
after `org-clock-auto-clockout-timer' seconds.

* lisp/org-clock.el (org-clock-auto-clockout-timer): New option.
(org-clock-auto-clockout): New function, use the new option.
2020-02-09 11:05:12 +01:00
Bastien 3de19f7c91 org.el: Minor refactoring
* lisp/org.el (org-indent-line): Minor refactoring.
2020-02-09 00:15:30 +01:00
Bastien 08815085fe org-agenda.el: Enhance docstrings
* lisp/org.el (org-loop-over-headlines-in-active-region):
Mention `org-agenda-loop-over-headlines-in-active-region'.

* lisp/org-agenda.el (org-agenda-do-in-region): Use the
`region' face for the selected headline.
(org-agenda-loop-over-headlines-in-active-region): Mention
`org-loop-over-headlines-in-active-region'.
2020-02-08 17:05:50 +01:00
Bastien b694c2fd7a Fix org menu initialization
* lisp/org-mobile.el: Add mobile commands to org menu.

* lisp/org-refile.el: Add refile commands to org menu.

* lisp/org.el (org-mode): Remove `org-menu-define'.
(org-org-menu): Delete.
2020-02-07 16:26:31 +01:00
Bastien f636cf91b6 New org-refile.el file with refile definitions
* lisp/org-refile.el: New file.

* lisp/org.el (org-refile, org-directory)
(org-default-notes-file, org-reverse-note-order)
(org-log-refile, org-refile-targets)
(org-refile-target-verify-function, org-refile-use-cache)
(org-refile-use-outline-path)
(org-outline-path-complete-in-steps)
(org-refile-allow-creating-parent-nodes)
(org-refile-active-region-within-subtree)
(org-refile-target-table, org-refile-cache)
(org-refile-markers, org-refile-marker)
(org-refile-cache-clear, org-refile-cache-check-set)
(org-refile-cache-put, org-refile-cache-get)
(org-outline-path-cache, org-refile-get-targets)
(org--get-outline-path-1, org-get-outline-path)
(org-format-outline-path, org-display-outline-path)
(org-refile-history, org-after-refile-insert-hook)
(org-capture-last-stored-marker, org-refile-keep, org-copy)
(org-refile, org-refile-goto-last-stored)
(org-refile--get-location, org-refile-get-location)
(org-refile-check-position, org-refile-new-child)
(org-olpath-completing-read): Move to org-refile.el.
(org-menu-define): Display Org refile comands only when
'org-refile is featured.

* lisp/org-keys.el (org-refile-copy, org-mode-map): Declare
functions.

* lisp/org-capture.el: Require 'org-refile.

* lisp/org-agenda.el: Require 'org-refile.
2020-02-05 15:34:06 +01:00
Bastien c524b7f51a Bump version 2020-02-05 09:36:55 +01:00
Bastien 04cb76571d org-table.el: Various fixes and enhancements
* lisp/org.el (org-mode): Obey `org-table-header-line-p'.

* lisp/org-table.el (org-table-row-get-visible-string): Fix
handling of shrunk cells.
(org-table-header-set-line): Minor enhancements.  Rename from
`org-table-set-header-line-format'.
(org-table-header-line-mode): Use `org-table-header-set-line'.
2020-02-04 18:14:29 +01:00
Bastien c3d5547642 Merge branch 'maint' 2020-02-04 17:05:34 +01:00
Bastien 321b119c44 org.el: Fix `org-indent-region' bug in source block
* lisp/org.el (org-indent-region): Use `save-window-excursion'
to restore point after indenting region in source blocks.

Thanks to Gustavo Barros for reporting this bug.
2020-02-04 17:04:15 +01:00
Bastien 39ead741b3 org.el: Don't hide emphasis markers in comments
* lisp/org.el (org-do-emphasis-faces): Don't hide emphasis
markers in comments.

Thanks to Sebastian Miele for suggesting this.
2020-02-04 09:51:02 +01:00
Bastien 328c9a1af3 org.el: Enhance menus
* lisp/org.el (org-menu-define): New function.
(org-mode): Use it to set up Org menus.
2020-02-04 09:39:13 +01:00
Bastien c46ee2be86 Merge branch 'maint' 2020-02-04 09:24:22 +01:00
Bastien 2cfcdeab96 org.el: Fix `org-[scheduled|deadline]-time-hour-regexp'
* lisp/org.el (org-deadline-time-hour-regexp)
(org-scheduled-time-hour-regexp): Also match habits.

Thanks to Damian for reporting this.
2020-02-04 08:58:15 +01:00
Bastien 1a29c0eee8 org.el (org-submit-bug-report): Enhance the message
* lisp/org.el (org-submit-bug-report): Enhance the message.
2020-02-03 20:18:57 +01:00
Kisaragi Hiu 4d5731bb33 org.el: Correct docstring
* lisp/org.el (org-effort-property): Correct docstring, as the
previous description of the format was inaccurate.

TINYCHANGE
2020-02-01 17:44:17 +01:00
Jack Kamm dcdb470177 Add inline remote image display
* lisp/org.el (org-display-inline-images): Add inline remote image
display. Remote image display is controlled by the new option
`org-display-remote-inline-images'.
2020-02-01 11:50:08 +01:00
Bastien 6e944086fb org.el: Tiny formatting fix 2020-01-31 21:17:15 +01:00
Bastien 5e9c3c0794 org.el: Enhance docstrings
* lisp/org.el (org-get-priority)
(org-priority-get-priority-function): Enhance docstring.
2020-01-31 17:12:46 +01:00
Bastien 4f98694bf7 Allow numeric values for priorities
* lisp/org.el (org-priority-highest, org-priority-default):
Allow integer.
(org-priority-get-priority-function): Tiny docstring change.
(org-priority-to-value): New defsubst.
(org--setup-collect-keywords, org-priority-regexp)
(org-priority, org-get-priority): Allow numeric values.

* doc/org-manual.org (Priorities): Illustrate the use of
numeric values for priorities.
2020-01-30 23:01:29 +01:00
Bastien 11734ba22a Merge branch 'maint' 2020-01-30 15:41:22 +01:00
Bastien 1d97b730d2 Delete unused variable 2020-01-30 15:40:22 +01:00
Bastien e11f506484 Continue previous commit and document it in etc/ORG-NEWS
* lisp/org.el (org-priority-enable-commands)
(org-priority-highest, org-priority-get-priority-function):
Define aliases.

(org-priority): Use `org-priority-show'.

* lisp/org-agenda.el (org-agenda-priority, org-agenda-menu):
Ditto.
2020-01-30 15:16:44 +01:00
Bastien 1de5e80adf Rename `org-x-priority' functions and variables to `org-priority-x'
* lisp/org.el (org-priority-enable-commands)
(org-priority-start-cycle-with-default)
(org-set-regexps-and-options, org-sort-entries, org-priority)
(org-get-priority, org-entry-properties)
(org-property-get-allowed-values, org-shiftup, org-shiftdown):
Rename `org-[x]-priority' functions and variables to
`org-priority-[x]'.

* lisp/org-pcomplete.el (org-priority-default)
(org-priority-highest)
(pcomplete/org-mode/file-option/priorities): Ditto.

* lisp/org-mouse.el (org-mouse-get-priority)
(org-mouse-priority-list): Ditto.

* lisp/org-agenda.el (org-agenda-fontify-priorities)
(org-agenda-format-item, org-agenda-priority): Ditto.

* lisp/ox-icalendar.el (org-icalendar--vtodo): Ditto.

* doc/org-manual.org (Priorities, Summary of In-Buffer Settings): Ditto.

* testing/lisp/test-org.el (test-org/set-regexps-and-options)
(test-org/entry-properties): Ditto.
2020-01-30 14:56:38 +01:00
Bastien 7b1077def7 Tiny enhancements to priority handling
* lisp/org.el (org-font-lock-add-priority-faces): Use
`org-priority-regexp'.
(org-priority-regexp): Match multiple characters.

* lisp/org-agenda.el (org-agenda-fontify-priorities): Use
`org-priority-regexp'.

This commit paves the way for more flexibility in priority handling.
For example, `org-priority-[up/down]' could deal with priorities as
numbers (e.g. [#1]) instead of letters.
2020-01-30 12:05:07 +01:00
Bastien db3758da92 Merge branch 'maint' 2020-01-29 21:44:05 +01:00
Bastien c2aebcee27 org.el: Fix bug about visibility cycling
* lisp/org.el (org-cycle-internal-local): When cycling visibility
on a subtree, don't take a list has a child.

These two subtrees should cycle the same way:

* A subtree

A Paragraph.

* A subtree

- A list.

Before the fix, the second subtree would cycle through three steps
instead of two.

Thanks to Samuel Wales for reporting this.
2020-01-29 21:39:52 +01:00
Bastien 241750b3c2 Use `number-to-string' instead of `int-to-string'
* lisp/org.el (org-end-of-subtree): Use `number-to-string' instead
of `int-to-string'.

* lisp/org-table.el (org-table-edit-field)
(org-table-fix-formulas, org-table-analyze, orgtbl-make-binding)
(org-table-field-info): Ditto.

* lisp/org-macs.el (org-shorten-string): Ditto.

* lisp/org-agenda.el (org-get-time-of-day): Ditto.
2020-01-28 20:19:24 +01:00
Bastien e9526b5a79 Enhance C-c C-c in agenda buffers
* lisp/org-agenda.el (org-agenda-ctrl-c-ctrl-c): Don't try to
deactivate columns as `org-columns-toggle-or-columns-quit' is
already bound to `C-c C-c' when the column view is active.

* lisp/org.el (org-ctrl-c-ctrl-c): Update docstring.
2020-01-28 12:44:27 +01:00
Bastien 32eba0f0a6 Merge branch 'maint' 2020-01-27 23:41:56 +01:00
Marco Wahl 42ad656436 org: Extend documentation some
* lisp/org.el (org-ctrl-c-ctrl-c): Document more cases.
2020-01-27 23:35:47 +01:00
Bastien 1930f10b6f Silence compiler warning
* lisp/org.el (org-open-at-point): Delete unused let binding.
2020-01-27 16:12:19 +01:00
Bastien 6f02fa596a Merge branch 'maint' 2020-01-27 14:55:50 +01:00
Bastien e982108445 Fix "Maintainer: " entry in the header
* lisp/org.el:
* lisp/org-table.el:
* lisp/org-list.el:
* lisp/org-attach.el:
* lisp/org-agenda.el: Fix "Maintainer: " entry in the header.
2020-01-27 14:55:15 +01:00
Bastien 8a12b125a8 org.el: New default value for `org-file-apps'
* lisp/org.el (org-file-apps): Add emacs as the application for
opening directories.
2020-01-26 19:33:53 +01:00
Bastien 081d571a3d org.el: Use `user-error' in `org-back-to-heading'
* lisp/org.el (org-back-to-heading): Use `user-error'.
2020-01-26 17:50:27 +01:00
Bastien da18a958f1 org.el: Adding maintainer
(Testing post-receive hook to trigger a release on the server.)
2020-01-26 12:05:02 +01:00
Bastien bd1d449e7f Add maintainer information
(Testing the new post-receive hook.)
2020-01-26 12:01:29 +01:00
Bastien 91aef7219b Merge branch 'maint' 2020-01-26 11:06:11 +01:00
Bastien 1d426e4a59 Bump version number to 9.3.2 2020-01-26 11:05:20 +01:00
Nicolas Goaziou 4141355492 Merge branch 'maint' 2020-01-26 09:45:28 +01:00
Bastien ac2c0f9a75 org.el: Don't forceably try ot open attachments
* lisp/org.el (org-open-at-point): Don't forceably try ot open
attachments.

This commit fixes a bug: when trying to open links in a subtree with
no attachments, `org-open-at-point' would create an ID property with
no apparent reason.
2020-01-26 08:44:16 +01:00
Bastien c8975ec150 org.el: Fix ID property retrieval
* org.el (org-clone-subtree-with-time-shift): Fix ID property
retrieval.
2020-01-25 20:41:48 +01:00