From e3c2d0a979cff7077fe730b744fb18f08558cd11 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sun, 2 Oct 2022 21:54:31 +0200 Subject: [PATCH 3/3] Improve documentation of org-kill-line * lisp/org.el (org-special-ctrl-k): Doc fix; clarify what is being killed and improve wording. Add command substitutions. (org-kill-line): Doc fix; mention user options that this command relies on. --- lisp/org.el | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 537ad1487..075b6397f 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -1527,13 +1527,15 @@ This may also be a cons cell where the behavior for `C-a' and (const :tag "reversed: after tags first" reversed))))) (defcustom org-special-ctrl-k nil - "Non-nil means `C-k' will behave specially in headlines. -When nil, `C-k' will call the default `kill-line' command. -When t, the following will happen while the cursor is in the headline: + "Non-nil means that \\\\[org-kill-line] \ +will behave specially in headlines. -- When at the beginning of a headline, kill the entire subtree. -- When in the middle of the headline text, kill the text up to the tags. -- When after the headline text and before the tags, kill all the tags." +When nil, \\[org-kill-line] will call the default `kill-line' command. +Otherwise, the following will happen when point is in a headline: + +- At the beginning of a headline, kill the entire line. +- In the middle of the headline text, kill the text up to the tags. +- After the headline text and before the tags, kill all the tags." :group 'org-edit-structure :type 'boolean) @@ -19970,7 +19972,11 @@ depending on context." (call-interactively #'forward-sentence))))))) (defun org-kill-line (&optional _arg) - "Kill line, to tags or end of line." + "Kill line, to tags or end of line. + +The behavior of this command depends on the user options +`org-special-ctrl-k' and `org-ctrl-k-protect-subtree' (which +see)." (interactive) (cond ((or (not org-special-ctrl-k) -- 2.30.2