emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Samuel Wales <samologist@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [bug] deleting backward char does not do undo-boundary
Date: Fri, 14 Aug 2020 16:18:27 -0700	[thread overview]
Message-ID: <CAJcAo8sThDPyGb_498F+8PAEMVMJ37Af-bSrXNFzcgKqEzYmpw@mail.gmail.com> (raw)

you know that thing in emacs where up to 20 self-insert-command
invocations are undone all at once?  i dislike it and have fixed it
for everything except one command in org.

in org, backspace [org delete backward char] clusters for undo
["amalgamates" in emacs lingo] even when
org-self-insert-cluster-for-undo is nil.  this is not true of delete,
which works ok.

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.

  (defun alpha-wrap-with-undo-boundary (old)
    ;; (defun (make-symbol (concat "alpha-") old) ()
    ;;   (interactive)
    (call-interactively old)
  (define-key global-map [remap delete-char] #'alpha-delete-char)
  (define-key global-map [remap delete-forward-char]
  (define-key global-map [remap delete-backward-char]
  (define-key global-map [remap backward-delete-char-untabify]
  (defun alpha-delete-char () (interactive)
(alpha-wrap-with-undo-boundary 'delete-char))
  (defun alpha-backward-delete-char-untabify ()
    (alpha-wrap-with-undo-boundary 'backward-delete-char-untabify))
  (defun alpha-delete-forward-char ()
    (alpha-wrap-with-undo-boundary 'delete-forward-char))
  (defun alpha-delete-backward-char ()
    (alpha-wrap-with-undo-boundary 'delete-backward-char))
  ;; ;; not work.   it is an alias.  trying org versions.
  ;; (define-key global-map [remap backward-delete-char]
  ;; (defun alpha-backward-delete-char ()
  ;;   (interactive)
  ;;   (alpha-wrap-with-undo-boundary 'backward-delete-char))
  (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))

The Kafka Pandemic

Please learn what misopathy is.

             reply	other threads:[~2020-08-15 16:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-14 23:18 Samuel Wales [this message]
2020-08-22  4:17 ` [bug] deleting backward char does not do undo-boundary Kyle Meyer
2020-08-22  4:38   ` Samuel Wales
2020-08-22  5:03     ` Kyle Meyer

Reply instructions:

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 \
    --in-reply-to=CAJcAo8sThDPyGb_498F+8PAEMVMJ37Af-bSrXNFzcgKqEzYmpw@mail.gmail.com \
    --to=samologist@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* 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).