From ea1e815c3dc1781aa5cb6d401e233c73fa8a108b Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Mon, 26 Jun 2023 15:17:20 +1000 Subject: Adapted more configs from other emacs configs Including wasamasa and jwiegley --- emacs/.emacs.d/lisp/my/my-org.el | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'emacs/.emacs.d/lisp/my/my-org.el') 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) -- cgit v1.2.3