From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id MORBO/Pat2TxcAAASxT56A (envelope-from ) for ; Wed, 19 Jul 2023 14:45:40 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id MG3DOvPat2TcXwEAauVa8A (envelope-from ) for ; Wed, 19 Jul 2023 14:45:39 +0200 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 A58A94E831 for ; Wed, 19 Jul 2023 14:45:39 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=AaRLO6hl; 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=1689770739; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=cXIrdXo9pA+vBNyPHzFvbnT1BVHfy+YvWPx3G0OT+3c=; b=RHoj5Krl0Ey2pOXbIOOMY9muSNeqb7W9/VDCv6ilpW/aBC1erp67SrxIBcFvDtA404S9ns Rx+tIVAiMJaOXdqqa8/yu9r9Bkya/bafwjqp0d0sD4CbiGIgTcQ15J5Gaiex3Q5bDWiu5g gNBJutySDfrz1t+Q6ZdzkbRwI9v9o8DTbqjY7cyYqGYy3gDrO7e9A/XC54aVS4htf5ejFh UjMsQE6GCZVx3pQ7rmr2CHUqTK/6KOFsOSCYVpHH3wS5O9sxBZZWe9LYIxWm8ql0C2zsXs 5UrN9VPdV2/TATimag+B/ELbXxvWPxhjK47naBVlbQRLNdDv95IIavY6DkxGSQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1689770739; a=rsa-sha256; cv=none; b=DRzptvzoFWIu93bU41nVg+jfoja7MSJZ+Wron3becbrBFTMAiVna+J6CMTqnczOFsU2MCS PHCr0m2J6xarfrNWomEivqo3n8CSfrgc+8zSCxYmyrky5gC8I4CmjmaG/rcyf91/Ex824X mC+DTm4DCA2mTfC4DRIAzQkeQDxaoKoq47mcQQVZSj0kchXV6mb0biES7+DEm7CLWZdNiT M1ZTHPYX71LooYXnucWMUwfP+n8Rbvp86VCCB0XIfs0OK1P8ZajOjejtGNtFTeXKL3uy2l WvtHsX1AJ9zSlrOu6M3Ud+v8XDxO3Wqo8gXjoYN1G3OtbMwJb9wnnuKQc32avw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=AaRLO6hl; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qM6Xm-0004Jb-5K; Wed, 19 Jul 2023 08:44:38 -0400 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 1qM6Xg-0004JD-1g for emacs-orgmode@gnu.org; Wed, 19 Jul 2023 08:44:33 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qM6Xd-00054g-PC for emacs-orgmode@gnu.org; Wed, 19 Jul 2023 08:44:31 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 6A36B24002A for ; Wed, 19 Jul 2023 14:44:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1689770667; bh=SMeNjOZA3VQZRrHCEQI2UFRbe0OQh/1ZLSvcXCHWcsA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=AaRLO6hl6PRTZkV7oj6mHtEcAZ/czgLiM//ShZBuxwV6MK+jjquqTTotrKW8zaxW8 vTR8WI/BQCefrWdw2yci+XdztnJSHWhhS7ykXGlwQtprLE9iUoBubGCJXnR2c810tk 64PVy3tXYAPunOP/to4yrVL4mN5896zzqkow0p4sbNrDqPm71i4EUV8Rbz0wYmakF8 AevchKsq+CIEQWRvv5TrnFnI5d0r1TsMuxTSDf2f+avxJ8oViRJa0tUjh+N1WD7m8/ FP1wdzcHP8klt0V7cyLEODD+8/7mteiT0QBtF13ZrMN588mIAOgWOizE3aAmANkHQt I4WS/YtBAvNUQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4R5b9k5yHgz6tm4; Wed, 19 Jul 2023 14:44:26 +0200 (CEST) From: Ihor Radchenko To: Okamsn Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] `org-delete-char` and `org-delete-backward-char` don't respect `delete-active-region` In-Reply-To: <684fb4d3-9653-bc06-de72-b22fcbd51b3d@protonmail.com> References: <87y1kdf7gc.fsf@localhost> <684fb4d3-9653-bc06-de72-b22fcbd51b3d@protonmail.com> Date: Wed, 19 Jul 2023 12:44:37 +0000 Message-ID: <87jzuwyssq.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 X-Migadu-Spam-Score: -8.64 X-Spam-Score: -8.64 X-Migadu-Queue-Id: A58A94E831 X-Migadu-Scanner: mx1.migadu.com X-TUID: PV6xVZkShc/F Okamsn writes: > With your clarification, I am asking that Org commands be added/changed > to support `delete-active-region`. Maybe something like below? (100% untested) (defun org-delete-forward-char (N) "Like `delete-forward-char', insert whitespace at field end in tables. When deleting, in tables this function will insert whitespace in front of the previous \"|\" separator, to keep the table aligned. The table will still be marked for re-alignment if the field did fill the entire column, because, in this case the deletion might narrow the column." (interactive "p") (save-match-data (if (and (= N 1) (not overwrite-mode) (not (org-region-active-p)) (not (eq (char-after) ?|)) (looking-at-p ".*?|") (org-at-table-p)) (org-delete-char 1) (funcall-interactively #'delete-forward-char N) (org-fix-tags-on-the-fly)))) -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at