emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [bug] deleting backward char does not do undo-boundary
@ 2020-08-14 23:18 Samuel Wales
  2020-08-22  4:17 ` Kyle Meyer
  0 siblings, 1 reply; 4+ messages in thread
From: Samuel Wales @ 2020-08-14 23:18 UTC (permalink / raw)
  To: emacs-orgmode

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-08-22  5:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-14 23:18 [bug] deleting backward char does not do undo-boundary Samuel Wales
2020-08-22  4:17 ` Kyle Meyer
2020-08-22  4:38   ` Samuel Wales
2020-08-22  5:03     ` Kyle Meyer

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