Commit Graph

463 Commits

Author SHA1 Message Date
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
Jens Lechtenboerger aa8500505f Mention option html-wrap-src-lines in ORG-NEWS
* etc/ORG-NEWS: Mention new option html-wrap-src-lines.
2019-10-16 19:06:23 +02:00
Nicolas Goaziou f2f646b6c9 ox-icalendar: Allow ignoring done scheduled or deadlines tasks
* lisp/ox-icalendar.el (org-icalendar-use-deadline):
(org-icalendar-use-scheduled): Add a value to ignore done tasks.
2019-09-05 21:54:50 +02:00
Nicolas Goaziou 4f3d1eefbd Remove `org-enable-fixed-width-editor'
* lisp/org.el (org-enable-fixed-width-editor): Remove variable.
2019-08-19 12:22:22 +02:00
Eric S Fraga 9218b028f0 Add NEWS item for split-window-right option for editing src blocks
* ORG-NEWS: added news item for new split-window-right option
2019-08-17 15:26:42 +02:00
Gustav Wikström b082de626d org-id: Additional id method; ISO8601 timestamp
* New choice in org-id-method

Timestamps can be chosen as org-id-method.  This id-method has the
benefit of being human-readable and has synergies with org-attach if
one likes to organize attachment directories by timestamp instead of
by random names.
2019-08-02 17:02:01 +02:00
Gustav Wikström 9104c0c52d org-id: New customization, org-id-locations-file-relative
* org-id-locations-file-relative

New customization that allows the user to specify that filenames
should be saved relative to the file specified in
org-id-locations-file, instead of being absolute paths.

* org-id-locations-save

Respects new custom variable, org-id-locations-file-relative, and
can save locations with relative filenames.

* org-id-locations-load

Updated to be able to deal with relative filenames if they exist.
2019-08-02 17:00:01 +02:00
Marco Wahl dc2198971b org-agenda: Respect narrowing for agenda restricted to buffer
* lisp/org-agenda.el (org-agenda): Add a condition to check if
  narrowing is in effect and in case set the agenda restriction markers.
* etc/ORG-NEWS (Respect narrowing when agenda command is restricted to buffer):
* doc/org-manual.org (The Agenda Dispatcher): Mention the behavior.
2019-07-15 00:22:51 +02:00
Marco Wahl 63b9c2634e Merge branch 'master' into compact-folding-refinement 2019-07-13 23:21:12 +02:00
Marco Wahl a1499af673 ORG-NEWS: Announce changes in org-ctrl-c-tab, org-kill-note-or-show-branches 2019-07-13 23:19:33 +02:00
Nicolas Goaziou 2c8e8b4a18 contrib: Remove Org Drill
* contrib/README:
* lisp/org.el (org-modules): Remove reference to Org Drill.
contrib/lisp/org-drill.el: Remove file.

Org Drill is now developed externally, and available through an
ELPA (MELPA at this point).
2019-07-11 22:55:02 +02:00
Gustav Wikström ae9cd4370b org-attach*, org, org-manual, org-news, ox-html, testing/*
* lisp/org-attach.el

Changed the way attachments deal with property-inheritance.  It now
adheres to the =org-use-property-inheritance= setting by default but
it can be customized if needed (I recommend to enable it!).
The property ATTACH_DIR is deprecated in favour of the shorter and simpler
property DIR.

Added an explicit option to =org-attach= for unsetting
attachment-directories (i.e. remove DIR property and deal with the
attachments by interaction).

Added attachment link type with the prefix "attachment:".

Added customizations:
- org-attach-dir-relative
- org-attach-preferred-new-method
- org-attach-use-inheritance
- org-attach-id-to-path-function

Hooks added:
- org-attach-after-change-hook
- org-attach-open-hook

A new linktype "attachment" is added in order to reduce
link-duplication when wanting to link to files in attached folders of
nodes.  This works for both ID and DIR properties.  The goal is to
make the functionality for attachment links mirror the functionality
for file links.

* lisp/org-attach-git.el

New file, existing functionality.  Code here has been factored out
from org-attach.el and if GIT-functionality is to be used this module
needs to be required sepatately.  It extends org-attach by use of its
hooks.

Activating git functionality in org-attach is done by loading
org-attach-git from now on, instead of customizing a variable.

Naming of both functions and tests has been modified to match the move
of functionality into its own module.

* lisp/org.el

Inline images are shown also using attachment-links, exactly the same
as it works for file-links today.

Make org-open-at-point respect ARG when opening attachment-dir.

* lisp/org-compat.el

org-attach-directory has been deprecated in favour for
org-attach-id-dir.  The new name matches its purpose better.

* lisp/ox-html.el

Export attachment links to images as inline images, in the same way as
file links work today.

* etc/ORG-NEWS

Mention the changes in this patch.

* doc/org-manual.org

The chapter "Refile, Copy, Archive" has been split into two separate
chapters.
- "Refile, Copy and Archiving" for information related to moving
  existing data around.

- "Capture, Attachments, RSS Feeds and Protocols" for information
  related to working with external data.

The attachment-part has been rewritten and extended to match the
changes in this patch.

The new attachment link type is mentioned both inside the attachments
chapter and in the chapter dealing with links.

Documentation related to external links has been improved.

* testing/lisp/test-org-attach-annex.el

Require org-attach-git instead of org-attach, since this file tests
the GIT-functionality.

* testing/lisp/test-org-attach.el

Add tests for org-attach.

* testing/org-test.el

Define a symbol for a file to test attachments with.

* testing/examples/*

A bunch of new example files and folders are created and are used in
testing of org-attach to verify its functionality.
2019-07-07 19:55:49 +02:00
Nicolas Goaziou 0201d1c0cc Fix inserting capture templates at point
* lisp/org-capture.el (org-capture):
(org-capture-set-target-location):
(org-capture-place-entry):
(org-capture-place-item):
(org-capture-place-table-line): Fix inserting capture templates at
point.  Insert a new internal property for capture
template: :insert-here.
(org-capture-insert-template-here): Remove function.

* testing/lisp/test-org-capture.el (test-org-caputre/entry):
(test-org-capture/item):
(test-org-capture/table-line): Add tests.

Reported-by: Dominic Surano <sk8ingdom@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-07/msg00002.html>
2019-07-06 16:02:37 +02:00
Nicolas Goaziou 9ddfe45314 org-table: Improve `org-table-copy-down'
* lisp/org-table.el (org-table--increment-field): New function.
(org-table-copy-down): Use new function.
* testing/lisp/test-org-table.el (test-org-table/copy-down): New test.
* doc/org-manual.org (Calculations): Update documentation.
2019-06-28 00:07:25 +02:00
Nicolas Goaziou 0ff65e9f4c org-list: Change `org-list-to-subtree' signature
* lisp/org-list.el (org-list-to-subtree): Add optional argument to
  specify level of the subtree.
(org-list-make-subtree):
* lisp/org.el (org-toggle-heading): Adapt to signature change.

Reported-by: Felix Wiemuth <felixwiemuth@hotmail.de>
<http://lists.gnu.org/r/emacs-orgmode/2019-06/msg00010.html>
2019-06-10 00:19:32 +02:00
Sacha Chua a41e9950ae Add :target option for the TOC keyword
* doc/org-manual.org, etc/ORG_NEWS: Document :target option
  for the TOC keyword.

* lisp/ox.el (org-export-resolve-link): New function.

* lisp/ox-ascii.el (org-ascii-keyword): Added :target to the TOC
  keyword.
  (org-ascii--build-toc): Changed LOCAL argument to SCOPE.

* lisp/ox-html.el (org-html-keyword): Added :target to the TOC keyword.

* lisp/ox-md.el (org-md-keyword): Added :target to the TOC keyword.
  (org-md--build-toc): Changed LOCAL argument to SCOPE.

* lisp/ox-odt.el (org-odt-keyword): Added :target to the TOC keyword.

* testing/lisp/test-ox.el (test-org-export/collect-headlines): Added
  tests for specifying scope by CUSTOM_ID or by fuzzy matching.
  (test-org-export/resolve-link): New test.
2019-05-30 15:25:46 +02:00
Eric Danan fb866077db ORG-NEWS: Mention new variable org-attach-commands 2019-05-03 00:00:59 +02:00
Emmanuel Charpentier ffccea7d73 Document the LATEX_ATTR :scale parameter in ORG-NEWS
* etc/ORG-NEWS: document the new builtin LaTeX exporters' LATEX_ATTR
  :scale parameter
2019-04-23 10:23:42 +02:00
Stefano Rodighiero f3e7dcd174 ORG-NEWS: Mention parameter :dbconnection for org-babel-execute:sql 2019-04-17 14:24:18 +02:00