From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id wNY7GU7yw2NMbwEAbAwnHQ (envelope-from ) for ; Sun, 15 Jan 2023 13:32:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id WL1PGE7yw2PP6gAAG6o9tA (envelope-from ) for ; Sun, 15 Jan 2023 13:32:14 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1279127A6A for ; Sun, 15 Jan 2023 13:32:12 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pH2Ac-0007BA-CS; Sun, 15 Jan 2023 07:31:30 -0500 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 1pH2AW-00078C-9x for emacs-orgmode@gnu.org; Sun, 15 Jan 2023 07:31:28 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pH2AR-0005EN-HZ for emacs-orgmode@gnu.org; Sun, 15 Jan 2023 07:31:22 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 88A232401BE for ; Sun, 15 Jan 2023 13:31:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1673785877; bh=USRy3KHFLZAoC6bgSI3eb8UUPY3uc00G8KWXTA7HH4w=; h=From:To:Cc:Subject:Date:From; b=cBvRQ0xu0DDg8OSMyIc7BVg3fWa/BuYjVUHJ7g0sUucBbWztcvLsjwUojn2PTWnfa HWnFz/1iFvBsMo1Q2zneLjwO2DM7h9cB/E0CEla64+eXuQCmi56LGXFXydUfCnxDrY l/pYfNS//vWxRimDySqcozpXcwolwhajcog5uIMaV78jtA1wdcKGB5g9q4OMtMmxt9 1yBZFk/w/djjhZQRGynp2mkaPIntIh4dxCckL/CqikqUOn5/2VZekR9UytpORHLmAA pqTENb5e+AIMt3JUQJGxVRdFzyTL/qGOMA7jGHMd+DS3EbR7yfGVAnAnwb3g3LmZ9W vbtFCj71qrPgQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Nvvdw6jyjz9rxD; Sun, 15 Jan 2023 13:31:16 +0100 (CET) From: Ihor Radchenko To: emacs-orgmode@gnu.org Cc: Ihor Radchenko Subject: [PATCH 0/4] Structure editing when region is active Date: Sun, 15 Jan 2023 12:31:28 +0000 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673785934; a=rsa-sha256; cv=none; b=qoaKA/W5UKrbKjSD4bKHbjRA788Zl/Ed5nDYD6aBOvjDkGpT3v8CoyCkvIMlvKRwXlezFc anXwX1gdynwEY1WhODS4z5GLmoGLJdDLgS0VA7PwMhVdw/NLt20jL+sTCvKpJbXBDVx3ZF rd0sQR5oVXm95m91fDiOJGx80XI7k13agX5umKnIk5eMxRiWUDy5cToyc+3pO7G9mJAaER UbcSpGY9cTW+04PAED8G7NxZtgg/+WmcIuvWbxqHWU4y7SJr7nvZOpCwxfvmZ+woS4KBLD jIPILm0CLlsh/Bgwv6shb4ScbTnSmizvkgKZNIk365UFhit1Wa4ZdBmOrxqMRA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=cBvRQ0xu; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673785934; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=3AUo7Zwj5ewbdUEqFD4Bc2MN4nAq9z8c16jOewNIGa4=; b=kCKLo0VJD6zF6OJqIq9v1YiF8eZzBLr6HtJ5nKIB7rRPsM+CcpP7NRIS3+aRoHPSOJesZg al61rsvxbm8OLMW2OZQMFWFCgvaWp0H3PPYXcjr4BDjqOTH2qtuhKK6+DGvLI5k4Xl0WO7 qm/pn3G94mmygA5YEue5eaxNnPEoeW4HwNBYrO+u8KwrwP3TC0P2IFw7vdhAd6i1dJ51bN KSd7BSR8iMDZxUq8yBksBO1bS4MldkHaRPgPzk555ZCqQYUO5nSauhCSbTTwzAuZTMZpnD vDVa78ZmUDyen/ld1MEcfERGfIE0EdkjMZq2iZewbNLKziqKLbx6O5GFzSSpHg== X-Migadu-Spam-Score: -3.56 X-Spam-Score: -3.56 X-Migadu-Queue-Id: 1279127A6A X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=cBvRQ0xu; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net X-TUID: u8WxhByl6JBC Hi, I'd like to propose a patchset that addresses some issues raised in https://teddit.zaggy.nl/r/orgmode/comments/10b6ue6/orgmode_is_so_bad_at_rearranging_items_in_an/ 1. When acting on region, promotion, demotion, and other structure editing commands immediately deactivate selection. It is annoying when one wants to promote several headings togetehr multiple times. 2. M-/ on region does not care if there are headings inside region and simply treats region as plain text: * Heading 1 text ** Sub * Heading 2 * Heading 3 {M-} * Heading 1 text * Heading 2 * Heading 3 ** Sub The patchset below addresses (2) by making org-metaup/org-metadown aware of headings in region (when region starts at heading). In addition, it alters M-/M-/M-/M- to not deactivate active selection (Transient mark mode). This way, one can issue, say, M- repeatedly without having to re-select everything. Similarly, bulk editing commands like setting schedule, deadline, tags, and todo do not deactivate region. I'd appreciate testing on edge cases and ideas for tests. Ihor Radchenko (4): Preserve active region after structure edits Preserve active region when toggling heading state org-metaup, org-metadown: Move subtrees in active region org-manual.org: Document changes in 8f6fcd709, 5719a8163, and eda9909a9 etc/ORG-NEWS | 20 ++++++ lisp/org-list.el | 3 +- lisp/org.el | 146 +++++++++++++++++++++++++++------------ testing/lisp/test-org.el | 54 +++++++++++++++ 4 files changed, 179 insertions(+), 44 deletions(-) -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at