From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8PtOH2OcQF8hVQAA0tVLHw (envelope-from ) for ; Sat, 22 Aug 2020 04:17:39 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 0NJLG2OcQF8kSwAAB5/wlQ (envelope-from ) for ; Sat, 22 Aug 2020 04:17:39 +0000 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 8E3F394050F for ; Sat, 22 Aug 2020 04:17:38 +0000 (UTC) Received: from localhost ([::1]:55390 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k9KyH-0005ge-7x for larch@yhetil.org; Sat, 22 Aug 2020 00:17:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52682) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k9Kxw-0005gY-Q0 for emacs-orgmode@gnu.org; Sat, 22 Aug 2020 00:17:16 -0400 Received: from pb-smtp21.pobox.com ([173.228.157.53]:61031) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k9Kxv-0007T4-2t for emacs-orgmode@gnu.org; Sat, 22 Aug 2020 00:17:16 -0400 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 7B914E5151; Sat, 22 Aug 2020 00:17:13 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to :subject:in-reply-to:references:date:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=bhBmfzopwIGe qyxqGjlseGTqGvQ=; b=KpvnEFmBtY5qDac67TyCVBGTgIRy0IFTrxj50quotw12 IXlYpjYH1jFiI0q2GxWps2q9zct/UX1Div7FGnTFOMnxVtDLhvpPENQvIf9IlR6X 8AZQxsyi2AHn9W5oPX29BQ9IEYaNLgwaZ9bJMrNJJXu15ilW2sGs96sXcGvn968= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 74AE1E5150; Sat, 22 Aug 2020 00:17:13 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:subject:in-reply-to:references:date:message-id:mime-version:content-type:content-transfer-encoding; s=mesmtp; bh=KHDNh/zbPvutHtDJzgHZs1auH2Z03ZQST71rcdmtuSg=; b=MnF8QmyH0SNpT3DlIOBSKq1zIFDpDEIYC6KN7DiMD5H1Xk1pQT4G2Mey5fUyIVBsPD/tYg5Lo/LnjZi+nblC1DbY5Ahgq4qpTlWpmAcHCcUqWP+w9mIm0Rv6/GKgn+8mvEsb5H8Jy/l4rA+kWS27pZzmEdcJCJ2MnLbnPF1UjDo= Received: from localhost (unknown [45.33.91.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id E2A51E514F; Sat, 22 Aug 2020 00:17:10 -0400 (EDT) (envelope-from kyle@kyleam.com) From: Kyle Meyer To: Samuel Wales , emacs-orgmode@gnu.org Subject: Re: [bug] deleting backward char does not do undo-boundary In-Reply-To: References: Date: Sat, 22 Aug 2020 00:17:08 -0400 Message-ID: <87d03jwbzv.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Pobox-Relay-ID: 59802566-E42E-11EA-BF2B-843F439F7C89-24757444!pb-smtp21.pobox.com Received-SPF: pass client-ip=173.228.157.53; envelope-from=kyle@kyleam.com; helo=pb-smtp21.pobox.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/22 00:17:13 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 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" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=pobox.com header.s=sasl header.b=KpvnEFmB; dkim=pass header.d=kyleam.com header.s=mesmtp header.b=MnF8QmyH; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.21 X-TUID: JxdqAZB0XE43 Samuel Wales writes: > here is my code to try to fix it [note that i fix teh rest of emacs 25 > also]. but that one command does not accept the undo-boundary that i > call. i do not udnerstand why this is the case. Without looking at this too closely, I'd guess it's because ... > (define-key org-mode-map [remap org-delete-backward-char] > #'alpha-org-delete-backward-char) > (define-key org-mode-map [remap org-delete-char] #'alpha-org-delete-cha= r) > (defun alpha-org-delete-char () (interactive) > (alpha-wrap-with-undo-boundary 'org-delete-char)) > (defun alpha-org-delete-backward-char () (interactive) > (alpha-wrap-with-undo-boundary 'org-delete-backward-char)) ... you're trying to remap a command that is itself remapping a command. (info "(elisp)remapping commands") In addition, remapping only works through a single level; in the following example, =20=20=20=20 (define-key my-mode-map [remap kill-line] 'my-kill-line) (define-key my-mode-map [remap my-kill-line] 'my-other-kill-line) =20=20=20=20 =E2=80=98kill-line=E2=80=99 is _not_ remapped to =E2=80=98my-other-kill= -line=E2=80=99. Instead, if an ordinary key binding specifies =E2=80=98kill-line=E2=80=99, it is re= mapped to =E2=80=98my-kill-line=E2=80=99; if an ordinary binding specifies =E2=80= =98my-kill-line=E2=80=99, it is remapped to =E2=80=98my-other-kill-line=E2=80=99. Perhaps just bind it directly? (define-key org-mode-map (kbd "DEL") #'alpha-org-delete-backward-char)