* etc/ORG-NEWS: Announce `org-speed-commands'.
* doc/org-manual.org (Speed Keys): Document `org-speed-commands'
instead of `org-speed-commands-user'.
* lisp/org-compat.el (org-speed-commands-user): Make an obsolete
variable.
* lisp/org-keys.el (org-speed-commands-user): Remove.
(org-speed-commands): Rename from `org-speed-commands-default' and
make a defcustom. Add the docstring of `org-speed-commands-user'.
(org-speed-command-help): Throw a message about obsolete option
`org-speed-commands-user' when set in the user configuration.
(org-speed-command-activate): Update docstring.
Link: https://orgmode.org/list/87eeep3c1u.fsf@bzg.fr/
* etc/ORG-NEWS: New entry announcing clocktable calculation and
display of per-file time percentages, when ':formula %' is used.
TINYCHANGE
Signed-off-by: Alan D. Salewski <ads@salewski.email>
* doc/org-manual.org (Installation): Do not document installation
through Org ELPA or an archive as these installation methods will
become obsolete after Org 9.5.
* lisp/ox-html.el (org-html-template): Added the support for a CSS
class name to the content tag which wraps the entire content. The CSS
class name can be set via in buffer HTML_CONTENT_CLASS property or
:html-content-class for org publish.
TINYCHANGE
Put the entry for "respecting electric-indent-mode" and the new value
of org-adapt-indentation near each other given that honoring
electric-indent-mode is likely to make many users aware of the
behavior that org-adapt-indentation controls (even if they weren't
aware that the option existed).
Also move these entries up in hopes of making them easier to discover.
Suggested-by: Tim Cross <theophilusx@gmail.com>
Ref: https://orgmode.org/list/87pmzhi7wp.fsf@gmail.com
* lisp/ox-html.el (org-html-inline-image-rules): Add webp as an inline
image format
Webp is an image format introduced in 2010, which now has widespread
support in browsers. ox-html can inline webp images identically to how
it does already for other image formats.
[km: updated package-version keyword and added NEWS entry]
Signed-off-by: Jay Kamat <jaygkamat@gmail.com>
* lisp/org-agenda.el (org-agenda-bulk-custom-functions): Add
documentation about argument collection for custom bulk functions.
(org-agenda-bulk-action): Support function to collect arguments for
custom bulk functions.
* etc/ORG-NEWS (Option ~org-agenda-bulk-custom-functions~ now supports
collecting bulk arguments): Add entry to NEWS.
* lisp/org.el (org-fast-tag-selection): Merge buffer local tags with
global alist of tags. And it obeys the option
org-complete-tags-always-offer-all-agenda-tags.
* doc/org-manual.org: Update the TAB key doc in tags selection UI.
* etc/ORG-NEWS: Mention the change in org-set-tags-command.
* etc/ORG-NEWS (=org-goto-first-child= now works before first
heading): Document that all the headline components inherit the
headline face instead of default face. Provide example how to restore
the old behaviour.
* org-table.el (org-table-eval-formula): Add the `u` mode flag to
enable Calc's units simplification mode.
* test-org-table.el (test-org-table/mode-string-u): Add Unit test for
the new mode flag.
* org-manual.org: Document new mode flag.
* lisp/org.el: Allow users to include 'subtitle in
`org-hidden-keywords' to hide #+SUBTITLE: keyword.
This way #+SUBTITLE is treated like similar keywords for title, date,
e-mail, and author.
* doc/org-manual.org (Type): Document empty vector argument for
file-desc.
* etc/ORG-NEWS (New argument for ~file-desc~ babel header): Add entry
to NEWS.
* lisp/ob-core.el (org-babel--file-desc): Add new function to evaluate
file description value.
(org-babel-execute-src-block): Correctly evaluate file description
when executing src block.
(org-babel-insert-result): Correctly evaluate file description value
when inserting the result of src block execution into the buffer.
* testing/lisp/test-ob.el (test-ob/file-desc-header-argument): Add
test case for new behavior.
* lisp/org-id.el (org-id-new): Use `org-id-ts-format' as ID format for
`ts' ID generation method.
(org-id-ts-format): New custom variable for `ts' ID format. The
default value is the same as old hard-coded ID format string.
* etc/ORG-NEWS (New option ~org-id-ts-format~): Announce the new
custom variable.
* lisp/ob-plantuml (org-babel-variable-assignments:plantuml): Support
using plantuml executable instead of jar.
Some systems come with an executable for plantuml instead of a specific
JAR file. This adds support for two different modes:
- jar :: using java together with a JAR (previous behavior)
- plantuml :: using a PlantUML executable
The PlantUML executable can be configured via
`org-plantuml-executable-path` and also the arguments that will be given
via `org-plantuml-executable-args`.
* lisp/ob-python.el: Require python.el at top-level.
(org-babel-python-eoe-indicator): Remove unused variable.
(org-babel-python-initiate-session-by-key): Rename
python-buffer to avoid obsolete warning.
(org-babel-python-evaluate-external-process): Remove unnecessary
require.
(org-babel-python--exec-tmpfile): Simplify this template.
(org-babel-python--eval-ast): Add printing of results to this
template, requiring additional string escapes.
(org-babel-python-evaluate-session): Simplify to use adjusted
templates, and call out to functionality in python.el or
python-mode.el.
(org-babel-python-evaluate-session): Simplified to use adjusted templates.
This commit refactors and cleans up code related to session
evaluation. python.el is now required at the top-level. Python
templates for wrapping code are simplified. Instead of directly
pasting code to the REPL, functionality from python.el and
python-mode.el are used; this fixes issues with code being echoed to
the REPL, and should be generally more robust. Finally, in the
:results value case, special handling of exceptions is removed, and we
no longer print None when the last statement isn't an expression.
* ob-core.el (org-babel-execute-src-block): Source code block header
argument `:file-mode' can set file permissions if `:file' argument is
provided.
(org-babel-common-header-args-w-values): Add `:file-mode' to common
header arguments.
TINYCHANGE
Cf. <https://orgmode.org/list/87pn8huuq2.fsf@iki.fi/t/#m4f86f6baf790e88ab905007757487a1f481cc579>.
Reported-by: Jarmo Hurri <jarmo.hurri@iki.fi>
* etc/ORG-NEWS (=RET= and =C-j= now obey ~electric-indent-mode~):
Recommend disabling electric-indent-local-mode rather than
electric-indent-mode, as the latter impacts all buffers rather than
just the newly-created Org buffer.
* lisp/ob-screen.el (org-babel-default-header-args:screen): Add
default header argument `:screenrc' and value "/dev/null".
(org-babel-prep-session:screen): Use header argument in variable
`screenrc' and not hard-coded value.
* lisp/ob-screen.el (org-babel-prep-session:screen): Remove concat of
"org-babel-session-" string onto session name when creating session.
(org-babel-screen-session-socketname): Remove concat of
"org-babel-session-" string onto session name searching for existing
screen session.
* lisp/org.el (org-startup-numerated): Fix "numeroted" typo in
variable name.
(org-startup-options):
(org-mode):
* doc/org-manual.org (Dynamic Headline Numbering):
(Summary of In-Buffer Settings): Update for rename.
Also fix a few related typos in ORG-NEWS and the manual.
No compatibility alias has been added, as this variable hasn't yet
made it into a release.
* org-capture.el (org-capture-place-template): Allow
`org-capture-current-plist' access during `org-capture-mode-hook'
Ensure consistency between org-capture's hooks.
`org-capture-after-finalize-hook' is now the only hook that cannot
access `org-capture-current-plist' because the capture buffer is
killed when it is run.
* lisp/org-src.el (org-src--contents-area): Handle `latex-fragment'.
(org-edit-latex-fragment): New function.
* lisp/org.el (org-edit-special): Use new function.
* lisp/ob-haskell (org-babel-haskell-compiler):
(org-babel-header-args:haskell): New variables.
(org-babel-haskell-execute):
(org-babel-haskell-interpret): New functions.
(org-babel-execute:haskell): Use new functions.
* lisp/org-compat.el (org-return-indent): Deprecate this command.
* lisp/org-keys.el (org-mode-map): Rebind C-j to a command emulating
`electric-newline-and-maybe-indent'.
* lisp/org.el (org-cdlatex-environment-indent): Stop using the now
obsolete function.
(org--newline): New helper function.
(org-return): Use it to transparently handle `electric-indent-mode'.
(org-return-and-maybe-indent): New command to emulate
`electric-newline-and-maybe-indent' while taking care of Org special
cases (tables, links, timestamps).
* testing/lisp/test-org.el (test-org/with-electric-indent,
test-org/without-electric-indent): New tests.
* testing/org-test.el (org-test-with-minor-mode): New helper to set a
minor mode to a specific state, and reset it afterward.
* 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.
* lisp/org-table.el (org-table-delete-column): Stay in the column at
delete. Exceptionally allow column delete when point is at eol
immediately to the right of a cell seperator.
A hint by Eric S Fraga led to this commit.
https://lists.gnu.org/archive/html/emacs-orgmode/2020-04/msg00283.html
* lisp/org-table.el (org-table-insert-column): Adjust the function to
insert the column at point (and not to the right.)
Org-manual, ORG-NEWS and testing are changed accordingly.
* 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.
* doc/org-manual.org (The clock table): Mention new semimonth :step
value.
* testing/lisp/test-org-clock.el (test-org-clock/clocktable/step):
Test :step semimonth.
Add a NEWS entry as well.
* lisp/ol.el (org-link-parameters): Remove reference to the function.
* lisp/ox.el (org-export-link-as-file): Remove function.
* testing/lisp/test-ox.el (test-org-export/link-as-file): Remove test.
The current implementation is not satisfactory, and not useful in the
code base. Using a pre-export hook turning custom link type into
"file" is enough for now. See "attachement" links for an example.
* 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.
* lisp/ob-shell.el (org-babel-sh-evaluate): Return the output
by default. Return exit status as the "value" when :result is
explicitely set to "value".
* lisp/ob-shell.el
(org-babel-shell-return-value-is-exit-status): Delete option.
* doc/org-manual.org (Collection): Be more accurate.
See the whole thread here:
https://lists.gnu.org/archive/html/emacs-orgmode/2020-02/msg00715.html
Thanks to everyone in this discussion.
* 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.
* lisp/ob-shell.el
(org-babel-shell-return-value-is-exit-status): Rename from
`ob-shell-return-value-is-exit-status'.
(org-babel-execute:shell, org-babel-sh-evaluate): Use new name.
(org-babel--variable-assignments:bash_assoc): Fix indentation.
* lisp/ol.el (org-link-parameters): Extend :follow parameter to handle
a second argument.
(org-link-open): Call custom-link functions after internal ones.
(org-link-open-as-file): New function.
(org-link-parameters): Reference new function.
(org-link-open): Use new function.
* 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.
* lisp/org-agenda.el (org-agenda-filter-hook): New hook.
(org-agenda-finalize): Enhance docstring.
(org-agenda-filter): Use the new hook.
(org-agenda-filter-expand-tags, org-agenda-filter-apply): ):
Fix docstrings.
* etc/ORG-NEWS: Document the new hook.
* lisp/org-colview.el (org-columns-header-line-remap): New
variable.
(org-columns--display-here): Don't rigidly inherit the :height
from the default face, allow text-scale-* to also rescale the
temporary column view header-line.
(org-columns-remove-overlays): If
`org-columns-header-line-remap' is non-nil, remove the
header-line face relative remapping.
* etc/ORG-NEWS (Allow text rescaling in column view): Document
the ability to scale text in column view.
Thanks to Marco Wahl for this suggestion.
* org-clock.el (org-clock-resolve): add `t' option. This works like
`k', but asks the user to specify a time instead of a number of
minutes.
TINYCHANGE
Often when you are interrupted at a task and get back to it, you know
what time the interruption happened. This option makes it easy to tell
org-resolve-clocks about that. For example, say you clocked into task A
at, say, 9:37:
* original task A
:LOGBOOK:
CLOCK: [2020-01-21 Mon 09:37]
:END:
While working on task A, you get a phone call. When the call is done,
you'd like to update your time logging to reflect the phone call. Your
phone says the call was at 11:09.
With C-c C-x C-z, you can use the `K' option, but you need to figure out
the number of minutes to keep. It's easier to look at the phone, or to
mentally note the time when an interruption starts. With the new option,
you can select `T', and just specify a time of 11:09. The state is now:
* original task A
:LOGBOOK:
CLOCK: [2020-01-21 Mon 09:37]--[2020-01-21 Mon 11:09] => 1:32
:END:
You add the phone call to your org buffer and do C-c C-x C-i to clock
in. Org asks you to start the time from when the previous task ended,
you say yes, and the state is now:
* original task A
:LOGBOOK:
CLOCK: [2020-01-21 Mon 09:37]--[2020-01-21 Mon 11:09] => 1:32
:END:
* task B, phone call
:LOGBOOK:
CLOCK: [2020-01-21 Mon 11:09]
:END:
At this point, you can clock back into task A, or any other task.
The key feature here is to be able to just type in a time -- in any
format accepted by org-read-date -- instead of specifying a number of
minutes.
* 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".
* 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.
* 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.
* 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.
* doc/org-manual.org (Execute commands in the active region):
New section, documenting both
`org-loop-over-headlines-in-active-region' and
`org-agenda-loop-over-headlines-in-active-region' options.
* etc/ORG-NEWS (Looping agenda commands over headlines): Add
an entry about "Looping agenda commands over headlines".
* lisp/org-agenda.el (org-agenda-do-in-region): New function.
(org-agenda-maybe-loop): New macro.
(org-agenda-kill, org-agenda-archive-default)
(org-agenda-archive-default-with-confirmation)
(org-agenda-archive, org-agenda-archive-to-archive-sibling)
(org-agenda-archive-with, org-agenda-todo)
(org-agenda-set-property, org-agenda-set-effort)
(org-agenda-toggle-archive-tag, org-agenda-date-prompt)
(org-agenda-schedule, org-agenda-deadline)
(org-agenda-add-entry-to-org-agenda-diary-file): Use
`org-agenda-maybe-loop' to DTRT when the region is active.
(org-agenda-loop-over-headlines-in-active-region): New option.
* lisp/org-faces.el (org-table-header): New face.
* lisp/org-table.el (org-table-header-set-header): Rename from
`org-table-header-set-line'. Use the new face.
* lisp/ob-python.el (org-babel-python-evaluate-session): Fix a few
related issues with :session :results value blocks, including broken
if-else statements, indented blocks with blank lines, and returning
the wrong value when underscore has been used.
(org-babel-python--eval-ast): New constant variable, a string
consisting of Python code to execute a source block using ast.
Previously, python blocks with parameters ":session :results value"
were entered line-by-line into the Python session, which could cause
issues around indentation and new lines. Now, such python blocks are
written to temp files, then the built-in ast python module is used to
parse and execute them, and to extract the last line separately to
return as a result. Introduces a change in behavior, requiring that
the last line must be a top-level expression statement if its result
is to be saved (otherwise, the result is None).
* 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'.
* lisp/org-table.el (org-table-header-line-p)
(org-table-header-line-mode): Replace
"org-table-electric-header" by "org-table-header-line".
* doc/org-manual.org (Miscellaneous): Ditto.
Thanks to Samuel Wales for suggesting this name.
* lisp/org-agenda.el (org-agenda-archive-with): Bind
`org-archive-from-agenda' to `t' when archiving from agenda.
* lisp/org-archive.el (org-archive-subtree-save-file-p): New option.
(org-archive-subtree): Use the new option.
* doc/org-manual.org (Moving a tree to an archive file):
Mention the new option.
Thanks to Russ Allbery for suggesting a similar idea.
* lisp/org-table.el (org-table-electric-header-p): New option.
(org-table-temp-header-line, org-table-electric-header-mode): New
variables.
(org-table-set-header-line-format)
(org-table-electric-header-mode): New minor mode to display the
table's current first row as the header line when this first row
is not visible anymore.
* doc/org-manual.org (Miscellaneous): Document
`org-table-electric-header-mode'.
* lisp/org-agenda.el (org-agenda-ctrl-c-ctrl-c): New function.
This is to unify and thereby harmonize the behavior of C-c C-c with
regard to Org files and columns.
* doc/org-manual.org (Attachment options)
* etc/ORG-NEWS (New option in ~org-attach-store-link-p~)
* lisp/org-attach.el (org-attach-store-link-p)
(org-attach-attach): Add option to store a link to the attached file
with a file link.
* lisp/org-duration.el (org-duration-format): Add `compact' symbol.
(org-duration-set-regexps): Make white space between duration parts
optional
(org-duration-from-minutes): Handle `compact' symbol.
* testing/lisp/test-org-duration.el (test-org-duration/from-minutes):
(test-org-duration/p): Add tests.
* 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
* 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.