aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/lisp/my/my-org.el
diff options
context:
space:
mode:
authorYuchen Pei <id@ypei.org>2023-06-26 15:17:20 +1000
committerYuchen Pei <id@ypei.org>2023-06-26 15:17:20 +1000
commitea1e815c3dc1781aa5cb6d401e233c73fa8a108b (patch)
tree189aa1cc44277f5c298eed5230c4ae2784fafeec /emacs/.emacs.d/lisp/my/my-org.el
parentf77444c030038100908e298666f8f84f85e768cb (diff)
Adapted more configs from other emacs configs
Including wasamasa and jwiegley
Diffstat (limited to 'emacs/.emacs.d/lisp/my/my-org.el')
-rw-r--r--emacs/.emacs.d/lisp/my/my-org.el19
1 files changed, 17 insertions, 2 deletions
diff --git a/emacs/.emacs.d/lisp/my/my-org.el b/emacs/.emacs.d/lisp/my/my-org.el
index 4c69484..4b8ad44 100644
--- a/emacs/.emacs.d/lisp/my/my-org.el
+++ b/emacs/.emacs.d/lisp/my/my-org.el
@@ -95,8 +95,23 @@ With a prefix, insert inactive dates.
(save-restriction
(org-narrow-to-subtree)
(goto-char (point-min))
- (when (re-search-forward "^\\s-*:PROPERTIES:" nil t)
- (org-hide-drawer-toggle)))))
+ (while (re-search-forward "^\\ *:[A-Z]+:\\ *$" nil t)
+ (org-hide-drawer-toggle)
+ (re-search-forward "^\\ *:END:\\ *$" nil t)))))
+
+(defun my-org-beginning-of-line-or-indent ()
+ "Move to org beginning of line, or indentation"
+ (interactive)
+ (if (bolp)
+ (back-to-indentation)
+ (org-beginning-of-line)))
+
+(defun my-org-kill-line (&optional arg)
+ "Call `my-kill-forward' or `org-kill-line' with a prefix arg."
+ (interactive "P")
+ (if arg
+ (org-kill-line)
+ (my-kill-forward)))
(defun my-org-open-default-notes-file ()
(interactive)