tweaking various org things
This commit is contained in:
parent
ff163c2660
commit
b8ee1a7d80
25
README.org
25
README.org
|
@ -1082,7 +1082,8 @@ We also need to setup some capture templates to use some specific setups with my
|
|||
"Create an org roam node underneath this org node"
|
||||
(interactive)
|
||||
(+org/insert-item-below 1)
|
||||
(org-id-get-create))
|
||||
(org-id-get-create)
|
||||
(org-roam-alias-add))
|
||||
(defun chris/org-roam-node-id-create ()
|
||||
"Make the basic org node and org roam one by adding an id and creating an alias"
|
||||
(interactive)
|
||||
|
@ -1108,6 +1109,28 @@ We also need to setup some capture templates to use some specific setups with my
|
|||
(chris/consult-ripgrep-files-with-matches org-roam-directory))
|
||||
|
||||
|
||||
(defun chris/org-roam-refile-node-to-file ()
|
||||
"Take the node at point and refile it into a new org roam file"
|
||||
(interactive)
|
||||
(if (org-before-first-heading-p)
|
||||
(message "Not in or on an org heading")
|
||||
(save-excursion
|
||||
;; If inside heading contents, move the point back to the heading
|
||||
;; otherwise `org-agenda-get-some-entry-text' won't work.
|
||||
(unless (org-on-heading-p) (org-previous-visible-heading 1))
|
||||
(let ((heading (substring-no-properties (thing-at-point 'line)))
|
||||
(contents (substring-no-properties
|
||||
(org-agenda-get-some-entry-text
|
||||
(point-marker)
|
||||
most-positive-fixnum)))
|
||||
(node (concat heading contents)))
|
||||
(message "Copied: %s" heading)
|
||||
(kill-new node)
|
||||
(org-roam-node-find)
|
||||
(delete-line)
|
||||
(newline)
|
||||
(yank)))))
|
||||
|
||||
(org-roam-setup)
|
||||
:general
|
||||
(chris/leader-keys
|
||||
|
|
25
init.el
25
init.el
|
@ -789,7 +789,8 @@ much faster. The hope is to also make this a faster version of imenu."
|
|||
"Create an org roam node underneath this org node"
|
||||
(interactive)
|
||||
(+org/insert-item-below 1)
|
||||
(org-id-get-create))
|
||||
(org-id-get-create)
|
||||
(org-roam-alias-add))
|
||||
(defun chris/org-roam-node-id-create ()
|
||||
"Make the basic org node and org roam one by adding an id and creating an alias"
|
||||
(interactive)
|
||||
|
@ -815,6 +816,28 @@ much faster. The hope is to also make this a faster version of imenu."
|
|||
(chris/consult-ripgrep-files-with-matches org-roam-directory))
|
||||
|
||||
|
||||
(defun chris/org-roam-refile-node-to-file ()
|
||||
"Take the node at point and refile it into a new org roam file"
|
||||
(interactive)
|
||||
(if (org-before-first-heading-p)
|
||||
(message "Not in or on an org heading")
|
||||
(save-excursion
|
||||
;; If inside heading contents, move the point back to the heading
|
||||
;; otherwise `org-agenda-get-some-entry-text' won't work.
|
||||
(unless (org-on-heading-p) (org-previous-visible-heading 1))
|
||||
(let ((heading (substring-no-properties (thing-at-point 'line)))
|
||||
(contents (substring-no-properties
|
||||
(org-agenda-get-some-entry-text
|
||||
(point-marker)
|
||||
most-positive-fixnum)))
|
||||
(node (concat heading contents)))
|
||||
(message "Copied: %s" heading)
|
||||
(kill-new node)
|
||||
(org-roam-node-find)
|
||||
(delete-line)
|
||||
(newline)
|
||||
(yank)))))
|
||||
|
||||
(org-roam-setup)
|
||||
:general
|
||||
(chris/leader-keys
|
||||
|
|
Loading…
Reference in a new issue