mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
lang/org: replace +org-capture/open with org-capture
This commit is contained in:
@ -230,7 +230,7 @@
|
|||||||
(:desc "notes" :prefix "n"
|
(:desc "notes" :prefix "n"
|
||||||
:desc "Find file in notes" :n "n" #'+default/find-in-notes
|
:desc "Find file in notes" :n "n" #'+default/find-in-notes
|
||||||
:desc "Browse notes" :n "N" #'+default/browse-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 mode notes" :n "m" #'+org/browse-notes-for-major-mode
|
||||||
:desc "Browse project notes" :n "p" #'+org/browse-notes-for-project)
|
:desc "Browse project notes" :n "p" #'+org/browse-notes-for-project)
|
||||||
|
|
||||||
|
@ -1,23 +1,6 @@
|
|||||||
;;; lang/org/autoload/org-capture.el -*- lexical-binding: t; -*-
|
;;; lang/org/autoload/org-capture.el -*- lexical-binding: t; -*-
|
||||||
;;;###if (featurep! +capture)
|
;;;###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 ---------------------
|
;; --- External frame ---------------------
|
||||||
|
|
||||||
(defvar +org-capture-window-params
|
(defvar +org-capture-window-params
|
||||||
|
Reference in New Issue
Block a user