mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2025-02-08 21:38:10 +00:00
org-capture.el: remove (currentfile) as a file specification in templates.
You can already use a function like (buffer-file-name) to get the currently visited file. So (currentfile) is not necessary.
This commit is contained in:
parent
d2fb95dd4e
commit
030960559e
@ -6359,10 +6359,6 @@ Valid values are:
|
||||
@item (file "path/to/file")
|
||||
Text will be placed at the beginning or end of that file.
|
||||
|
||||
@item (currentfile)
|
||||
Text will be placed at the beginning or end of the file
|
||||
@code{org-capture} is called from.
|
||||
|
||||
@item (id "id of existing org entry")
|
||||
Filing as child of this entry, or in the body of the entry.
|
||||
|
||||
|
@ -113,17 +113,18 @@ type The type of entry. Valid types are:
|
||||
target Specification of where the captured item should be placed.
|
||||
In Org-mode files, targets usually define a node. Entries will
|
||||
become children of this node, other types will be added to the
|
||||
table or list in the body of this node.
|
||||
table or list in the body of this node.
|
||||
|
||||
Most target specifications contain a file name. If that file
|
||||
name is the empty string, it defaults to `org-default-notes-file'.
|
||||
A file can also be given as a variable, function, or Emacs Lisp
|
||||
form.
|
||||
|
||||
Valid values are:
|
||||
|
||||
(file \"path/to/file\")
|
||||
Text will be placed at the beginning or end of that file
|
||||
|
||||
(currentfile)
|
||||
Text will be placed at the beginning or end of the file
|
||||
org-capture is called from
|
||||
|
||||
(id \"id of existing org entry\")
|
||||
File as child of this entry, or in the body of the entry
|
||||
|
||||
@ -676,14 +677,6 @@ already gone. Any prefix argument will be passed to the refile command."
|
||||
(widen)
|
||||
(setq target-entry-p nil))
|
||||
|
||||
((eq (car target) 'currentfile)
|
||||
(if (not (and (buffer-file-name) (org-mode-p)))
|
||||
(error "Cannot call this capture template outside of an Org buffer")
|
||||
(set-buffer (org-capture-target-buffer (buffer-file-name)))
|
||||
(org-capture-put-target-region-and-position)
|
||||
(widen)
|
||||
(setq target-entry-p nil)))
|
||||
|
||||
((eq (car target) 'id)
|
||||
(let ((loc (org-id-find (nth 1 target))))
|
||||
(if (not loc)
|
||||
|
Loading…
x
Reference in New Issue
Block a user