lang/org: replace +org-capture/open with org-capture
This commit is contained in:
parent
ccaf5eabbd
commit
c0e5152b8f
2 changed files with 1 additions and 18 deletions
|
@ -230,7 +230,7 @@
|
|||
(:desc "notes" :prefix "n"
|
||||
:desc "Find file in notes" :n "n" #'+default/find-in-notes
|
||||
:desc "Browse notes" :n "N" #'+default/browse-notes
|
||||
:desc "Org capture" :n "x" #'+org-capture/open
|
||||
:desc "Org capture" :n "x" #'org-capture
|
||||
:desc "Browse mode notes" :n "m" #'+org/browse-notes-for-major-mode
|
||||
:desc "Browse project notes" :n "p" #'+org/browse-notes-for-project)
|
||||
|
||||
|
|
|
@ -1,23 +1,6 @@
|
|||
;;; lang/org/autoload/org-capture.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! +capture)
|
||||
|
||||
;;;###autoload
|
||||
(defun +org-capture/open (&optional string key)
|
||||
"Sends STRING, the current selection or prompted input to `org-capture'.
|
||||
|
||||
Uses the capture template specified by KEY. Otherwise, prompts you for one."
|
||||
(interactive)
|
||||
(let ((key (or key "n")))
|
||||
(if-let* ((string (cond ((not (equal string ""))
|
||||
string)
|
||||
((region-active-p)
|
||||
(buffer-substring-no-properties
|
||||
(region-beginning)
|
||||
(region-end))))))
|
||||
(org-capture-string string key)
|
||||
(org-capture nil key))))
|
||||
|
||||
|
||||
;; --- External frame ---------------------
|
||||
|
||||
(defvar +org-capture-window-params
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue