Commit Graph

22915 Commits

Author SHA1 Message Date
Stefan Kangas 2129ece3b5 org-agenda.el: Fix typo
* lisp/org-agenda.el (org-agenda-add-entry-text-descriptive-links):
Fix typo.
2020-02-18 10:31:37 +01:00
Bastien cb2774d1a8 org-capture.el: Fix possibly missing final newline
* lisp/org-capture.el (org-capture-finalize): When capturing
an entry, fix missing final newline when the user has deleted
it.

This continues the fix done in d8c51531c.
2020-02-18 01:25:59 +01:00
Bastien fc3f1e6b28 Revert "ob-python: Session returns empty string if no return value"
This reverts commit 5fc4576548.
2020-02-17 23:46:49 +01:00
Bastien b8a2ad9288 org-agenda.el: New hook `org-agenda-filter-hook'
* 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.
2020-02-17 18:40:11 +01:00
Jack Kamm 5fc4576548 ob-python: Session returns empty string if no return value
* lisp/ob-python.el (org-babel-python--eval-ast): Change sessions to
return an empty string, instead of None, if there is no return value.
2020-02-17 18:30:47 +01:00
Bastien a85f1603ec Merge branch 'maint' 2020-02-17 16:36:12 +01:00
Bastien 6accd0ef62 Fix fb188adda 2020-02-17 16:36:01 +01:00
Bastien cdf7d6414d Merge branch 'maint' 2020-02-17 16:29:38 +01:00
Bastien 016aa96f99 Revert "org-compat.el: Require 'org-agenda in a timely fashion"
This reverts commit 2f30ecffdf.
2020-02-17 16:29:21 +01:00
Bastien 19cdef520e Merge branch 'maint' 2020-02-17 14:51:47 +01:00
Bastien 2f30ecffdf org-compat.el: Require 'org-agenda in a timely fashion
* lisp/org-compat.el ("calendar"): Require 'org-agenda before
adding `org--setup-calendar-bindings' to `calendar-mode-hook'.

This fixes Emacs bug#38592.
2020-02-17 14:49:15 +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 055742562c org-colview.el: Allow text rescaling
* 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.
2020-02-17 13:59:19 +01:00
Bastien 5dd7721242 Use `org-switch-to-buffer-other-window' in a few places
* lisp/org-src.el (org-src-switch-to-buffer):
* lisp/org-attach.el (org-attach):
* lisp/ob-lilypond.el (org-babel-lilypond-execute-tangled-ly)
(org-babel-lilypond-mark-error-line): Use
`org-switch-to-buffer-other-window' instead of
`switch-to-buffer-other-window'.
2020-02-17 09:04:19 +01:00
Bastien 915a8eade4 org-agenda.el/org-capture.el: Use `user-error' in two places
* lisp/org-capture.el (org-capture-set-target-location):
* lisp/org-agenda.el (org-agenda-clock-out): Use `user-error'.
2020-02-17 08:55:19 +01:00
Bastien e8402f3cad org-agenda.el: Let `org-agenda-filter' consider group tags
* lisp/org-agenda.el (org-agenda-filter): Expand group tags.
(org-agenda-get-represented-tags): Consider group tags
represented when one tag of the group is represented.
2020-02-17 08:20:55 +01:00
Kyle Meyer 1a7e4627fa org-link-open: Fix typo in recent docstring change
* lisp/ol.el (org-link-open): Fix docstring typo.
2020-02-16 20:51:24 -05:00
Bastien 10cd894b23 ob-clojure.el: More minor refinements
* lisp/ob-clojure.el (org-babel-expand-body:clojure): Inline
namespace setting.
(org-babel-clojure-cider-current-ns): Delete.
(ob-clojure-inf-clojure-filter-out): New variable.
(ob-clojure-inf-clojure-output): Use it.
(ob-clojure-eval-with-inf-clojure): Update the filter variable
depending on the current namespace.
2020-02-17 02:38:02 +01:00
Nicolas Goaziou 2d21d2080c org-list: Add tests for `org-at-radio-list-p'
* testing/lisp/test-org-list.el (test-org-list/at-radio-list-p): New
test.
2020-02-17 00:50:10 +01:00
Bastien 41c5fe0be8 org-agenda.el: Fix call to `org-agenda-finalize-hook'
* lisp/org-agenda.el (org-agenda-finalize): Run functions in
`org-agenda-finalize-hook' at the very end.
2020-02-17 00:45:28 +01:00
Bastien dfa7a3397b org-agenda.el: Fix call to `org-agenda-finalize-hook'
* lisp/org-agenda.el (org-agenda-finalize): Run functions in
`org-agenda-finalize-hook' at the very end.
2020-02-17 00:45:13 +01:00
Nicolas Goaziou 8f540c4db4 org-list: Optimize `org-at-radio-list-p'
* lisp/org-list.el (org-at-radio-list-p): Call only one "heavy"
function.  Do not require "ox.el" function.  Use defun instead of
defsubst since this is a non-trivial function.  For consistency with
other parameters, :radio accepts any value except nil.
2020-02-17 00:31:39 +01:00
Bastien 1d8d83d875 etc/ORG-NEWS: Add more details on ob-clojure.el enhancements 2020-02-17 00:12:48 +01:00
Bastien 409bd498d1 ob-clojure.el: Enhancements and refactoring, removed session code
* lisp/ob-clojure.el (ob-clojure-inf-clojure-output): Filter
out spurious strings.
(ob-clojure-with-temp-expanded): New macro.
(ob-clojure-string-or-list, ob-clojure-eval-with-inf-clojure)
(ob-clojure-eval-with-cider, ob-clojure-eval-with-slime): New
functions.
(org-babel-execute:clojure): Use new functions.
(org-babel-execute:clojurescript): Fix docstring.
(org-babel-edit-prep:clojure)
(org-babel-clojure-initiate-session)
(org-babel-prep-session:clojure)
(org-babel-clojure-var-to-clojure)
(org-babel-variable-assignments:clojure): Delete function.
2020-02-16 23:46:49 +01:00
Nicolas Goaziou 427f1a2d03 Merge branch 'maint' 2020-02-16 23:33:48 +01:00
Nicolas Goaziou 8f6ce817d8 ox-html: Fix author meta-data
* lisp/ox-html.el (org-html--build-meta-info): Prevent duplicates in
author meta-data.
2020-02-16 23:33:13 +01:00
Bastien e561bac519 etc/ORG-NEWS: Document ob-clojure.el changes and reorder 2020-02-16 11:39:19 +01:00
Bastien e2203692b7 ob-clojure.el: Support using inf-clojure.el
* lisp/ob-clojure.el (org-babel-clojure-backend): Allow to use
inf-clojure.el and set to nil by default.
(ob-clojure-inf-clojure-output): New function.
(org-babel-execute:clojure): Support using inf-clojure.el.
Remove the :show-process parameter.
(org-babel-execute:clojurescript)
(org-babel-edit-prep:clojure): Fix docstrings.
(org-babel-clojure-initiate-session): Make the session
parameter mandatory.  Initiate a cider session if needed.
2020-02-16 11:16:00 +01:00
Bastien 4eaddab3dd org-list.el: Fix `org-at-radio-list-p'
* lisp/org-list.el (org-at-radio-list-p): Don't choke the list
is at the beginning of the buffer.
2020-02-16 11:12:28 +01:00
Nicolas Goaziou 833753abcf ol: Tiny refactoring
* lisp/ol.el (org-link-open): Improve docstring.  Tiny refactoring.
2020-02-15 18:34:16 +01:00
Kyle Meyer e361c64043 ob-clojure: Drop recently added if-let* for compatibility
* lisp/ob-clojure.el (org-babel-edit-prep:clojure): Rewrite without
if-let*, which isn't available until Emacs 26.
2020-02-14 21:09:12 -05:00
Bastien 684ab0f2a4 etc/ORG-NEWS: Add a section about the 7yo bug, rephrasing 2020-02-14 14:46:31 +01:00
Bastien 0fa69d2f1a Merge branch 'maint' 2020-02-14 10:32:44 +01:00
Bastien 27e4d7ce48 Prevent infinite loop when showing new time in agenda
* lisp/org-agenda.el (org-agenda-dim-blocked-tasks): Don't use
an overlay to make the task invisible, use text properties.
(org-agenda--mark-blocked-entry): Add text property
'org-filter-type to later use `org-agenda-filter-hide-line' if
necessary.
(org-agenda-filter-hide-line): Fix docstring.

The related bug was first reported in 2013 by Matt Lundin here:
https://lists.gnu.org/archive/html/emacs-orgmode/2013-08/msg00072.html

Then Andrew Hyatt reported it again, and provided a minimal recipe on
how to reproduce it consistently.

Thanks a lot to both of them.
2020-02-14 10:32:35 +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 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
stardiviner 003a7fc0b4 * lisp/ob-clojure.el: Add more ClojureScript src block support.
* lisp/ob-clojure.el: Add ClojureScript src block tangle extension and
header arguments support.

* lisp/ob-clojure.el (org-babel-edit-prep:clojure): Auto inject src
block :ns header argument into editing temporary src block buffer local.

TINYCHANGE
2020-02-13 16:56:02 +01:00
Robert Hambrock d37fc58150 * lisp/ob-clojure.el: Support for clojurescript src block execution.
* lisp/ob-clojure.el (org-babel-execute:clojurescript): New function to
Execute ClojureScript src block.

TINYCHANGE
2020-02-13 16:55:57 +01:00
Bastien 937ac9b777 lisp/org-refile.el (org-refile-get-location): Small refactoring
* lisp/org-refile.el (org-refile-get-location): Small refactoring.
2020-02-13 11:44:10 +01:00
Bastien 855f5fda76 Merge branch 'maint' 2020-02-13 08:49:21 +01:00
Bastien 66810d2121 Bump version to 9.3.6 2020-02-13 08:47:28 +01:00
Bastien da97799a1d org-refile.el: Fix commit 63fd0c09ca
* lisp/org-refile.el (org-refile-get-location): Set
`org-refile-history' correctly.
2020-02-13 08:45:01 +01:00
Bastien 430b644f79 Merge branch 'maint' 2020-02-13 08:19:34 +01:00
Bastien 79ed6d208e org-manual.org: Fix repository link
* doc/org-manual.org (Using Org's git repository): Fix
repository link.

Thanks to Gustavo Barros for reporting this.
2020-02-13 08:19:24 +01:00
Bastien e22bfc2866 org-clock.el: Small enhancements
* lisp/org-clock.el (org-clock-resolve): Small message
enhancement, inline a function and use `org-time-subtract'
instead of `time-subtract'.
2020-02-13 08:06:54 +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 32a5fa0b6c Revert "org-clock.el: Allow to tell time you got back when resolving"
This reverts commit 57841b5264.
2020-02-13 07:37:49 +01:00