Commit Graph

526 Commits

Author SHA1 Message Date
Bastien 684ab0f2a4 etc/ORG-NEWS: Add a section about the 7yo bug, rephrasing 2020-02-14 14:46:31 +01:00
Bastien bfe404c933 etc/ORG-NEWS: Fix typo and formatting 2020-02-13 17:04:04 +01:00
Bastien 32cffa9ce4 etc/ORG-NEWS: Add a new entry about ob-clojure.el updates 2020-02-13 17:03:41 +01:00
Dan Drake 554a3fc643 org-clock.el: Add `t' option to `org-clock-resolve'
* 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.
2020-02-13 07:48:04 +01:00
Bastien 8e9f78f612 Revert "etc/ORG-NEWS: Add a note about new way to resolve clock"
This reverts commit 550db5f014.
2020-02-13 07:37:49 +01:00
Bastien 550db5f014 etc/ORG-NEWS: Add a note about new way to resolve clock 2020-02-13 01:27:48 +01:00
Bastien 1a05da36b8 etc/ORG-NEWS: Add incompatible change 2020-02-12 19:10:45 +01:00
Bastien eaa220f6a7 Small code enhancement
* doc/org-manual.org (Checkboxes): Minor update.

* lisp/org-list.el (org-at-radio-list-p): Respect the
attributes #+ATTR_* syntax.
2020-02-12 08:40:46 +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 85363d4867 etc/ORG-NEWS: Allowed empty HTML extension 2020-02-11 09:34:17 +01:00
Bastien d0cc865623 Rearrange etc/ORG-NEWS 2020-02-11 09:02:19 +01:00
Bastien 23fa7b9796 etc/ORG-NEWS: Delete an obsolete change
* etc/ORG-NEWS: Delete an obsolete change.
2020-02-10 23:25:54 +01:00
Bastien d9b586ce34 etc/ORG-NEWS: Document a change
* etc/ORG-NEWS: Document the ability to scroll up and down in the
agenda commands dispatch window.
2020-02-10 23:21:34 +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 0e75ebc523 Implement and document looping over headlines in agenda
* 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.
2020-02-08 12:17:40 +01:00
Bastien b988796a45 etc/ORG-NEWS: Mention the new org-refile.el file
* etc/ORG-NEWS (New =org-refile.el= file): Mention the new
org-refile.el file.
2020-02-05 15:49:13 +01:00
Bastien c452dc38dc org-table.el: Enhancements to table header mode
* 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.
2020-02-05 01:20:54 +01:00
Jack Kamm cc89d5523f ob-python: Fix several issues with :session :results value
* 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).
2020-02-03 21:17:38 -08: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 110b034151 Replace "org-table-electric-header" by "org-table-header-line"
* 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.
2020-02-01 09:52:57 +01:00
Bastien 3d0282ef87 New option `org-archive-subtree-save-file-p'
* 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.
2020-01-31 10:42:40 +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 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 e1dfda96fd etc/ORG-NEWS: Various rephrasing 2020-01-30 00:38:32 +01:00
Bastien b476ffd266 Implement the `org-table-electric-header-mode' minor mode
* 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'.
2020-01-29 15:17:32 +01:00
Marco Wahl 45a0fe531c agenda: C-c C-c deactivates columns
* 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.
2020-01-28 00:00:05 +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 f9c34a7d51 org-clock.el: New option `org-show-notification-timeout'
* lisp/org-clock.el (org-show-notification-timeout): New option.
(org-show-notification): Use `w32-notification-notify' and the new
option.
2020-01-26 17:35:18 +01:00
Jack Kamm 7d5e931f79 org-src: Add option `plain' to org-src-window-setup
* lisp/org-src.el (org-src-window-setup): Add option `plain' for
org-src-window-setup, that uses vanilla display-buffer to show the
source window.
2020-01-24 23:06:40 -05:00
Gustav Wikström edefb2835d Additional option for org-attach-store-link-p
* 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.
2020-01-19 10:50:14 +01:00
Jack Kamm d833920def org-src: restore windows for some values of org-src-window-setup 2020-01-16 16:09:42 +01:00
Nicolas Goaziou 2fde90aa2e org-duration: Read and write duration in compact form
* 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.
2020-01-04 18:39:05 +01:00
Kyle Meyer 93c11da002 Merge branch 'maint' 2020-01-01 13:39:26 -05:00
Kyle Meyer ff5fc050d3 Update copyright year to 2020 2020-01-01 13:38:46 -05:00
Jarmo Hurri ac939125a4 ob-java: Add header argument to pass command line args
* lisp/ob-java.el (org-babel-execute:java): Handle new header argument `:cmdargs` and pass its value as the last element in call to java.
2019-12-27 09:56:11 +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 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
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 2c0f936e88 ORG-NEWS: Fix the location of the entries from last commit 2019-12-09 21:09:52 +01:00
Jason Dunsmore a410413be8 org-capture: Add support for month trees
* doc/org-manual.org: Add `:tree-type month' option for capture
  templates.
* lisp/org-capture.el (org-capture-set-target-location): Add
  `:tree-type month' option to capture templates to group entries by
  month.
* lisp/org-datetree.el (org-datetree-find-month-create): Add
  `org-datetree-find-month-create' function to add datetree entries
  grouped by month.
* testing/lisp/test-org-datetree.el
  (test-org-datetree/find-month-create): Add test for new function.
2019-12-09 20:08:28 +01:00
Marco Wahl b8f43ecbf4 org,colview: Quit column-view with C-c C-c. manual,news: Update
* lisp/org-colview.el (org-columns-toggle-or-columns-quit): New
  function.  Takes the place of removed function
  org-columns-set-tags-or-toggle.
2019-12-04 23:36:33 +01:00
Bastien 36753ee650 etc/ORG-NEWS: Rename "Version Next" to "Version 9.4 (not yet released)" 2019-12-04 10:41:06 +01:00
Bastien 7d3d14daa3 Merge branch 'next' of code.orgmode.org:bzg/org-mode 2019-12-03 16:36:50 +01:00
Bastien efe4c85fa2 etc/ORG-NEWS: Use blank lines between paragraphs consistently 2019-12-03 16:25:32 +01:00
Kyle Meyer a4fa04bbd4 Merge branch 'master' into next 2019-11-16 17:19:11 -05:00