From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id r69uGVqhQF8pBgAA0tVLHw (envelope-from ) for ; Sat, 22 Aug 2020 04:38:50 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id AP6rFFqhQF/wIAAA1q6Kng (envelope-from ) for ; Sat, 22 Aug 2020 04:38:50 +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 E790594005D for ; Sat, 22 Aug 2020 04:38:49 +0000 (UTC) Received: from localhost ([::1]:59954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k9LIm-0000eY-U5 for larch@yhetil.org; Sat, 22 Aug 2020 00:38:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k9LIM-0000eR-Kp for emacs-orgmode@gnu.org; Sat, 22 Aug 2020 00:38:22 -0400 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]:43881) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k9LIK-0001hV-SA for emacs-orgmode@gnu.org; Sat, 22 Aug 2020 00:38:22 -0400 Received: by mail-pg1-x533.google.com with SMTP id d19so1935745pgl.10 for ; Fri, 21 Aug 2020 21:38:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=WlLB7YwPn4yzMlSPOpNeoPNlkjmtYDD8+sUjO7j5q8o=; b=hrPl+DHnk5N3JWQP+m1hlKJZ/YYNCC98mlGCVAEmNgDasd2nvSQ9MFfjfmI7GPfRt0 9e0/VqxLITC1YAgxbptXmWhyGrRVer7m9gC6aN/QtXdzdxp58RYnzDNa2Ew2vl9O3YpU buoVR4mYoLasfaLvPRKZxsdnfG6UaVIxblxnvBSFScb2rtPTBVPIoRfAnTZ4PncpTPnu 27JfI91EW3vdcdG7YxRo7Xn/gRVQTithYhdaFREw8rALZFcXgZh7iJVGXyNjw/rE6q1S /ijaORPEEgCVaJSi/nJsbA4c1aJOYbDVPUjShd+sGgulrkICKB2M5jIpfyKzpLq4Felr TINw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=WlLB7YwPn4yzMlSPOpNeoPNlkjmtYDD8+sUjO7j5q8o=; b=ZL9voHRj8oZ1jgWQ8gV9eRGtqm7dEqkDeEx0XuQooBoeD+4jyvC8gVQH2SJDZEVYH1 ew92iWRuzkHhAHP77NB08WuhM3QAXujvEyNjliU/98/KUO7v167OawDcBYIcdR8aVtAG 1PcoiZNqb46UzlWyyLYgJF/vBJ8HOKfaVKfx9yA/ovY7KbLJzk1BIeJPJxnYbSc55s9j wiScYPxvaHihin+ZhInlfhvnOPxvEUC3ANXIeHRGlF+gHQrSqJDahxR2fgsh92WFsSDb zETFb5Ds75/40EJURqbvobMxTkeXfNGxCIEN2rGWUpPNq0wC7upnBreWucFTleSgN6p5 keHQ== X-Gm-Message-State: AOAM531Lc7jTwE+W0XBZqD5Pvnr1/893FcCCQTQXhKfQJFPHbvjX3wyd 9dn9jrhdxxmKPg4kMnrCYAjcnfnBwI+c82fAQcCAP+lI2NE= X-Google-Smtp-Source: ABdhPJwMVoi7I4IWNZF7VRGuEcNCEyl+H3XSBgj2xiMzwX27XNJZrGAF+Fkuqjnk9zM6PwJKyvUa/n66fMV875aCjq8= X-Received: by 2002:a63:6f02:: with SMTP id k2mr4443862pgc.191.1598071098785; Fri, 21 Aug 2020 21:38:18 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6a10:d104:0:0:0:0 with HTTP; Fri, 21 Aug 2020 21:38:18 -0700 (PDT) In-Reply-To: <87d03jwbzv.fsf@kyleam.com> References: <87d03jwbzv.fsf@kyleam.com> From: Samuel Wales Date: Fri, 21 Aug 2020 21:38:18 -0700 Message-ID: Subject: Re: [bug] deleting backward char does not do undo-boundary To: Kyle Meyer Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::533; envelope-from=samologist@gmail.com; helo=mail-pg1-x533.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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: , Cc: emacs-orgmode@gnu.org 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=gmail.com header.s=20161025 header.b=hrPl+DHn; dmarc=pass (policy=none) header.from=gmail.com; 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.71 X-TUID: ZciJaFbLR18g ah, so org did the remap and i tried to remap the remap? my brain is not working right now, but i think you might be right. in either case, your solution works and is straightforward. thank you. On 8/21/20, Kyle Meyer wrote: > 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-char) >> (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, > > (define-key my-mode-map [remap kill-line] 'my-kill-line) > (define-key my-mode-map [remap my-kill-line] 'my-other-kill-line= ) > > =E2=80=98kill-line=E2=80=99 is _not_ remapped to =E2=80=98my-other-ki= ll-line=E2=80=99. Instead, if > an ordinary key binding specifies =E2=80=98kill-line=E2=80=99, it is = remapped 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= ) > --=20 The Kafka Pandemic Please learn what misopathy is. https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged= .html