Skip to content

Commit 5cab660

Browse files
committed
add support for "here" target
Added in Org 9.7
1 parent 69bfe30 commit 5cab660

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

README.org

+3
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ becomes:
5353

5454
** Releases
5555

56+
*** 3.2.0
57+
- add [[#doct-add-to][doct-add-to]] function
58+
Add support for "here" target (Org 9.7)
5659
*** 3.1.0
5760
- add [[#doct-add-to][doct-add-to]] function
5861
*** 3.0.0

doct.el

+7-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
;; Created: December 10, 2019
88
;; Keywords: org, convenience
99
;; Package-Requires: ((emacs "25.1"))
10-
;; Version: 3.1.10
10+
;; Version: 3.2.0
1111

1212
;; This file is not part of GNU Emacs.
1313

@@ -147,7 +147,7 @@ Its value is not stored between invocations to doct.")
147147
(defvar doct-file-extension-keywords '(:datetree :function :headline :olp :regexp)
148148
"Keywords that define the insertion location in the target file.")
149149

150-
(defvar doct-exclusive-target-keywords '(:clock :file :function :id)
150+
(defvar doct-exclusive-target-keywords '(:clock :file :function :id :here)
151151
"Keywords that exclusively set the target location.")
152152

153153
(defvar doct-hook-keywords '(:after-finalize :before-finalize :hook :prepare-finalize)
@@ -173,6 +173,7 @@ Its value is not stored between invocations to doct.")
173173
:disabled
174174
:doct
175175
:doct-name
176+
:here
176177
:inherited-keys
177178
:keys
178179
:type
@@ -378,6 +379,7 @@ If GROUP is non-nil, make sure there is no :keys value."
378379
('nil
379380
(signal 'doct-no-target `(,doct-exclusive-target-keywords nil ,doct--current)))
380381
(`(:clock ,_) '(clock))
382+
(`(:here ,_) '(here))
381383
(`(:id ,id) `(id ,(doct--type-check :id id '(stringp))))
382384
(`(:function ,fn)
383385
(if-let ((file (doct--get :file)))
@@ -924,6 +926,9 @@ The :file keyword is not necessary for these.
924926
- :clock t
925927
File to the currently clocked entry
926928
929+
- :here t
930+
The position of point when `org-capture' is called
931+
927932
- :function (lambda () ;visit file and move point to desired location...)
928933
This keyword is exclusive when used without the :file keyword.
929934
It is responsible for finding the proper file and location to insert the

0 commit comments

Comments
 (0)