Add org refile config option and utility function
This commit is contained in:
parent
2642d50c6b
commit
0c91351414
1 changed files with 10 additions and 0 deletions
10
init.el
10
init.el
|
@ -65,6 +65,14 @@
|
||||||
(let ((fill-column (point-max)))
|
(let ((fill-column (point-max)))
|
||||||
(fill-region (region-beginning) (region-end) nil)))
|
(fill-region (region-beginning) (region-end) nil)))
|
||||||
|
|
||||||
|
(defun random-todo ()
|
||||||
|
(interactive)
|
||||||
|
(let ((points nil))
|
||||||
|
(goto-char (point-min))
|
||||||
|
(while (search-forward-regexp "\*\sTODO" nil t)
|
||||||
|
(setq points (cons (1+ (match-end 0)) points)))
|
||||||
|
(goto-char (seq-random-elt points))))
|
||||||
|
|
||||||
;; Straight.el setup
|
;; Straight.el setup
|
||||||
(setq straight-repository-branch "develop")
|
(setq straight-repository-branch "develop")
|
||||||
(defvar bootstrap-version)
|
(defvar bootstrap-version)
|
||||||
|
@ -561,6 +569,8 @@
|
||||||
(setq org-startup-folded nil)
|
(setq org-startup-folded nil)
|
||||||
;; Only one empty line is enough to separate headings when folded
|
;; Only one empty line is enough to separate headings when folded
|
||||||
(setq org-cycle-separator-lines 1)
|
(setq org-cycle-separator-lines 1)
|
||||||
|
;; Refile to paths in the file (level1/level2/level3)
|
||||||
|
(setq org-refile-use-outline-path t)
|
||||||
|
|
||||||
(add-hook 'org-mode-hook #'visual-line-mode)
|
(add-hook 'org-mode-hook #'visual-line-mode)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue