Commit Graph

481 Commits

Author SHA1 Message Date
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
Jonas Bernoulli 5117d8a159 Fix typos 2019-11-16 17:17:36 -05:00
Gustav Wikström cffe44ba94 Merge branch 'master' into next 2019-10-21 14:58:39 +02:00
Gustav Wikström 42b8db0d34 Improve handling of org attach id to path functions
* doc/org-manual.org (Attachment options)
* etc/ORG-NEWS (Org-Attach has been refactored and extended)
(New ID method based on timestamp)
* lisp/org-attach.el (org-attach-id-uuid-folder-format)
(org-attach-id-ts-folder-format)
(org-attach-id-to-path-function-list, org-attach-dir)
(org-attach-dir-from-id): Better handling of id to path
functionality. At the same time adding an id-to-path function
for timestamp-based ID that easily can be promoted to the
primary function by customization of the user.
2019-10-20 02:49:48 +02:00
Gustav Wikström 1bdff9f73d Org document property-drawers
Add functionality to define property-blocks on document level, in
addition to at headline level.

* doc/org-manual.org:
* etc/ORG-NEWS: Document new functionality.

* lisp/org.el (org-keyword-regexp): Define constant instead of
  hardcoding.
(org-file-properties): Renamed, see next line.
(org-keyword-properties): Renamed from above.  Due to the fact that
  properties can be defined for the whole document using property
  drawers this local variable needs a rename to make its name less
  ambigous.
(org-refresh-properties, org-refresh-property, org-entry-properties)
(org-refresh-category-properties, org-get-property-block)
(org-entry-get-with-inheritance, org-entry-put)
(org-insert-property-drawer, org-end-of-subtree): Made to work before
  first headline.
(org-at-property-block-p): New function to validate if point is at the
start of a property block.
(org-property-global-value): Renamed, see next line.
(org-property-global-or-keyword-value): Renamed from above to match
  its functionality better.
(org-back-to-heading-or-point-min): New function to make a document
  work as a level 0 node in the outline.
(org-at-keyword-p): Predicate function to answer to if we're currently
at a keyword line or not.
(org-up-heading-or-point-min): New function to make a document work as
a level 0 node in the outline.

* lisp/org-element.el (org-element--current-element): Can now detect
  property-blocks before first headline according to it's positional
  rules.

* lisp/org-attach.el (org-attach): Make it possible to call the
  attachment dispatcher also before the first headline, since document
  property drawers make attachments possible for the whole document
  now.

* lisp/org-capture.el: Modified only due to rename of function in
  org.el.

* lisp/org-compat.el (org-file-properties)
(org-property-global-value): Renamed functions declared obsolete.

* testing/lisp/test-org.el (org/insert-property-drawer)
(org/set-property, org/delete-property, org/delete-property-globally):
  Additions of tests to check if they work before first headline.
(org/at-property-p, org/at-property-block-p, org/get-property-block)
(org/entry-get, org/refresh-properties): New tests

* testing/examples/property-inheritance.org: Switch from
  property-keywords to a property-drawer in the testfile.
  Functionality should be the same, but now using a document drawer
  instead of property-keywords.

  Reason for switching is that I'd like us to slowly depricate
  property-keywords.

* testing/lisp/test-org-element.el:

* contrib/lisp/ox-taskjuggler.el: A comment is modified only due to
  rename of function in org.el.
2019-10-19 14:07:58 +02:00