emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: iota@whxvd.name, 65734@debbugs.gnu.org, emacs-orgmode@gnu.org
Subject: Re: bug#65734: [BUG] kill-whole-line on folded subtrees [9.6.8 (release_9.6.8-3-g21171d @ /home/w/usr/emacs/0/29/0/lisp/org/)]
Date: Wed, 06 Sep 2023 08:30:36 +0000	[thread overview]
Message-ID: <87ledju2j7.fsf@localhost> (raw)
In-Reply-To: <83h6o84yz1.fsf@gnu.org>

Eli Zaretskii <eliz@gnu.org> writes:

>> It would also make sense to group the two edits together via
>> `combine-after-change-calls', although a more universal way to know that
>> certain edits are a part of the same known command (even when called
>> non-interactively) would be useful.
>
> The command kills in two parts for a good reason, which is explained
> in the comments to the code.  So making a single group will not work,
> I think, at least not in all situations.

I think there is misunderstanding. `combine-after-change-calls' will not
affect the two-step modification of the kill ring, if we put it around
`kill-whole-line'. Or do I miss something?

> ...  And relying on after-change
> hooks to fix this use case sounds too obscure and fragile to me.

Indeed. I did not talk about this particular bug report. What I meant is
some way to group change hooks executed by the same function/command.

>> In addition, `org-kill-line' acts specially in certain scenarios:
>> 
>> For
>> * Heading <point> text :tag1:tag2:
>> 
>> `org-kill-line' will keep and re-align ":tag1:tag2:":
>> 
>> * Heading <point>      :tag1:tag2:
>> 
>> It would be nice if we could express such behavior without overriding
>> the `kill-line' command.
>
> This could be handled by a suitable extension to end-of-visible-line.
> For example, introduce a new text property which end-of-visible-line
> would then handle the same as it currently handles invisible text.

I am not sure if I like the idea of text property - marking all the tags
in buffer with text property is expensive. What about something like
`end-of-visible-line-function'?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


  parent reply	other threads:[~2023-09-06  8:30 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-04 16:30 [BUG] kill-whole-line on folded subtrees [9.6.8 (release_9.6.8-3-g21171d @ /home/w/usr/emacs/0/29/0/lisp/org/)] Sebastian Miele
2023-09-05 10:29 ` Ihor Radchenko
2023-09-05 11:54   ` bug#65734: " Eli Zaretskii
2023-09-05 15:25     ` Sebastian Miele
2023-09-05 15:50       ` Eli Zaretskii
2023-09-06  8:23         ` Ihor Radchenko
2023-09-06 12:16           ` Eli Zaretskii
2023-09-06 13:30             ` Sebastian Miele
2023-09-07 13:49               ` Ihor Radchenko
2023-09-06  8:30     ` Ihor Radchenko [this message]
2023-09-06 12:20       ` Eli Zaretskii
2023-09-07 10:00         ` Ihor Radchenko
2023-09-07 10:19           ` Eli Zaretskii
2023-09-07 10:27             ` Sebastian Miele
2023-09-07 13:43             ` Ihor Radchenko
2023-09-06 15:04       ` Sebastian Miele
2023-09-07 10:03         ` Ihor Radchenko
2023-09-05 14:30   ` Max Nikulin
2023-09-05 15:42     ` Eli Zaretskii
2023-09-05 15:50       ` Ihor Radchenko
2023-09-05 16:02         ` Max Nikulin
2023-09-05 16:12           ` Ihor Radchenko
2023-09-05 16:14         ` Eli Zaretskii
2024-01-07 16:27         ` Stefan Monnier
2024-01-08 12:15           ` Ihor Radchenko
2024-01-08 15:33             ` Stefan Monnier
2024-01-09 14:52               ` Ihor Radchenko
2024-01-09 16:48                 ` Stefan Monnier
2024-01-09 22:21                   ` Ihor Radchenko
2024-01-09 15:47             ` Ihor Radchenko
2024-01-09 16:01               ` Stefan Monnier
2024-01-09 22:33                 ` Ihor Radchenko
2024-01-10  3:08                   ` Stefan Monnier
2024-01-10 12:52                   ` Eli Zaretskii
2024-01-10 13:05                     ` Ihor Radchenko
2024-01-10 13:55                       ` Eli Zaretskii
2024-01-11 15:50                         ` Ihor Radchenko
2024-01-11 16:05                           ` Eli Zaretskii
2024-01-11 16:15                             ` Ihor Radchenko
2024-01-11 16:44                               ` Eli Zaretskii
2024-01-11 18:08                                 ` Ihor Radchenko
2024-01-11 19:19                                   ` Eli Zaretskii
2024-01-12 12:24                                     ` Ihor Radchenko
2024-01-12 12:32                                       ` Eli Zaretskii
2024-01-12 12:39                                         ` Ihor Radchenko
2024-01-12 14:03                                           ` Eli Zaretskii
2024-01-12 14:15                                             ` Ihor Radchenko
2024-01-12 21:09                                   ` Stefan Monnier
2024-01-12 21:16                                     ` Ihor Radchenko
2024-01-10 16:26                       ` Stefan Monnier
2024-01-10 16:39                         ` Eli Zaretskii
2024-01-11 15:44                         ` Ihor Radchenko
2024-01-09 15:50 ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ledju2j7.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=65734@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=iota@whxvd.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).