From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sebastian Miele Newsgroups: gmane.emacs.bugs Subject: 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 17:04:48 +0200 Message-ID: <87o7if72b2.fsf__2232.40415086678$1694013926$gmane$org@whxvd.name> References: <87il8pao4l.fsf@whxvd.name> <87tts8vrpb.fsf@localhost> <83h6o84yz1.fsf@gnu.org> <87ledju2j7.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22692"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-orgmode@gnu.org, Eli Zaretskii , 65734@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 06 17:25:18 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qduP8-0005g9-D2 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Sep 2023 17:25:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qduOu-0004eZ-AC; Wed, 06 Sep 2023 11:25:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qduOs-0004eB-PX for bug-gnu-emacs@gnu.org; Wed, 06 Sep 2023 11:25:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qduOs-0006Pf-F1 for bug-gnu-emacs@gnu.org; Wed, 06 Sep 2023 11:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qduOs-0002HP-Ib for bug-gnu-emacs@gnu.org; Wed, 06 Sep 2023 11:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Sebastian Miele Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Sep 2023 15:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65734 X-GNU-PR-Package: emacs Original-Received: via spool by 65734-submit@debbugs.gnu.org id=B65734.16940138598709 (code B ref 65734); Wed, 06 Sep 2023 15:25:02 +0000 Original-Received: (at 65734) by debbugs.gnu.org; 6 Sep 2023 15:24:19 +0000 Original-Received: from localhost ([127.0.0.1]:37148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qduOA-0002GO-IH for submit@debbugs.gnu.org; Wed, 06 Sep 2023 11:24:18 -0400 Original-Received: from mout-p-102.mailbox.org ([2001:67c:2050:0:465::102]:54278) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qduO5-0002G5-MD for 65734@debbugs.gnu.org; Wed, 06 Sep 2023 11:24:16 -0400 Original-Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4RgmPG4WtMz9t54; Wed, 6 Sep 2023 17:24:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=whxvd.name; s=MBO0001; t=1694013842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=g1FS0cah8DcgdC/jtJ5wlSNgG9WLP6BowAm+srTWYPY=; b=W5xNxQMVhgROEP3VeiIiQfv2h5wxs9LkM1C5LRxiNMIf4TvAZVpi7itz5PwX2qJYpCYJ/g GsXxj9Wi7PNSbFQ38Lf46pTrcLkJSZx7R+3z4N6fy6ZPJo51XhKrbWrlHWC6sO08i1Wjjo imoW7HuKSzS107hkeLVJIStNxwoSEU4agi5Fi737nTTUvj+tVK+6loFAtXd8vXa9aPlGjR BW0A+ldASm/8rhlEnyid/9jJDxC0sPDQH/lYg5h3WJ14dAQSzaQ26GcG8jAVsDRItDwuLQ 4HzHcN8DTtut7RdFL7m80a/mrShsnYLM4naw48azpfhs0/50j23SaunZqSA/pg== In-reply-to: <87ledju2j7.fsf@localhost> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:269551 Archived-At: > From: Ihor Radchenko > Date: Wed, 2023-09-06 08:30 +0000 > > Eli Zaretskii 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? I tried to wrap the problematic portion of `kill-whole-line' into `combine-after-change-calls'. It seems to have no effect. The after-change function `org-fold-core--fix-folded-region' still gets called twice, not fixing the bug. I did not dig deeper, because the stuff that makes `combine-after-change-calls' work at least partially goes in C and seems to be scattered over several places. The Emacs Lisp manual states that `combine-after-change-calls' "arranges to call the after-change functions just once for a series of several changes=E2=80=94if that seems safe." So this case does not seem safe. Apa= rt from that, there is no stated guarantee for when it would seem it safe. I conclude that, although this path looked possibly elegant at first, and I wanted to give it a try, this cannot work out.