From: Kyle Meyer <firstname.lastname@example.org>
To: Samuel Wales <email@example.com>, firstname.lastname@example.org
Subject: Re: [bug] deleting backward char does not do undo-boundary
Date: Sat, 22 Aug 2020 00:17:08 -0400 [thread overview]
Message-ID: <email@example.com> (raw)
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]
> (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
(define-key my-mode-map [remap kill-line] 'my-kill-line)
(define-key my-mode-map [remap my-kill-line] 'my-other-kill-line)
‘kill-line’ is _not_ remapped to ‘my-other-kill-line’. Instead, if
an ordinary key binding specifies ‘kill-line’, it is remapped to
‘my-kill-line’; if an ordinary binding specifies ‘my-kill-line’, it
is remapped to ‘my-other-kill-line’.
Perhaps just bind it directly?
(define-key org-mode-map (kbd "DEL") #'alpha-org-delete-backward-char)
next prev parent reply other threads:[~2020-08-22 4:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-14 23:18 [bug] deleting backward char does not do undo-boundary Samuel Wales
2020-08-22 4:17 ` Kyle Meyer [this message]
2020-08-22 4:38 ` Samuel Wales
2020-08-22 5:03 ` Kyle Meyer
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).