GNU bug report logs -
#65734
29.1.50; kill-whole-line and visibility of Org subtrees
Previous Next
Reported by: Sebastian Miele <iota <at> whxvd.name>
Date: Mon, 4 Sep 2023 14:49:02 UTC
Severity: normal
Found in version 29.1.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #158 received at 65734 <at> debbugs.gnu.org (full text, mbox):
> From: Ihor Radchenko <yantar92 <at> posteo.net>
> Cc: monnier <at> iro.umontreal.ca, emacs-orgmode <at> gnu.org, 65734 <at> debbugs.gnu.org,
> manikulin <at> gmail.com, iota <at> whxvd.name
> Date: Thu, 11 Jan 2024 16:15:13 +0000
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >> So, I'd like some way to configure `kill-whole-line'/`kill-line' to warn
> >> user about killing hidden text when we detect that we are deleting a
> >> folded heading. Something like:
> >>
> >> (y-or-n-p "Kill hidden subtree along with headline? ")
> >>
> >> I believe that it might be useful in other situations as well. Like in
> >> outline-mode or outline-minor-mode.
> >
> > How would kill-line know that it's about to kill a subtree? All it
> > knows is that it is killing some invisible text.
>
> I imagine the following:
>
> 1. `kill-*-line' function will, by default, test if invisible text of
> length size is killed and query the user when called interactively.
>
> 2. Major modes could also set buffer-local `kill-line-query-function'
> that will return nil when killing should proceed without query or a
> string with query text.
If the command is only sensitive to invisible text, it could warn
about so-and-so many invisible characters being killed, but it could
not warn about "subtrees", which is what you wanted. Invisible text
in a buffer could have nothing to do with subtrees, even if the buffer
is under org-mode.
This bug report was last modified 329 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.