From 53313ab3dcea0f933e08e09a37fc1646e6bd9825 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Thu, 8 May 2025 20:04:00 +0200 Subject: [PATCH] Guard direct headline editing also at beginning of line Had missed that case up to now. --- site-lisp/db-org.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/site-lisp/db-org.el b/site-lisp/db-org.el index 0b544fd..9905225 100644 --- a/site-lisp/db-org.el +++ b/site-lisp/db-org.el @@ -1255,9 +1255,10 @@ ignored. The implementat has been adapted from `org-speed-command-activate' to ignore all keys pressed at the beginning of a headline." (ignore keys) - (when (and (or (looking-at "\\*") - (looking-at " ")) - (looking-back "^\\*+ ?" nil)) + (when (or (looking-at "^\\*") ; bol with * as first entry + (and (or (looking-at "\\*") ; at the start of a headline, but not at bol + (looking-at " ")) + (looking-back "^\\*+ ?" nil))) #'(lambda () (user-error "No direct input allowed in headline"))))