From b0d648c09382241bb9fe1aef4c049ed2595f8e5e Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sun, 30 Mar 2025 18:46:04 +0200 Subject: [PATCH] Guard headline stars from accidental changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Activate Org's speed keys for this. Let's see whether now I will accidentally do other things than typing characters at the beginning of a headline … --- init.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index a2efc2a..18f0cfd 100644 --- a/init.el +++ b/init.el @@ -734,7 +734,13 @@ '(("Effort_ALL" . "0:00 0:05 0:10 0:15 0:30 0:45 1:00 2:00 3:00 4:00 6:00 8:00")) org-columns-default-format - "%80ITEM(Task) %10Effort(Effort) %10CLOCKSUM") + "%80ITEM(Task) %10Effort(Effort) %10CLOCKSUM" + + ;; We activate speed keys primarily to avoid invalidating headlines by accidentally + ;; typing non-star characters when at the start of a headline. + org-use-speed-commands #'(lambda () + (and (looking-at org-outline-regexp) + (looking-back "^\\**" nil)))) ;; Keywords and Tags