(Emacs+Org-Mode) Why Not Bind `delete-forward-char'?

Thank you Greg for the big correction here <2018-01-12 Fri>

The documentation for delete-char suggests that delete-forward-char ought to be used for interactive use instead of delete-char

(global-set-key (kbd "C-d") #'delete-forward-char)

2 thoughts on “(Emacs+Org-Mode) Why Not Bind `delete-forward-char'?”

  1. Doesn’t `C-d` do this by default already? I use the default bindings for `C-d` and `M-d` frequently.
    One thing I just noticed: `C-d` is it is mapped to `delete-char`, even though that function’s doc string says “The command ‘delete-forward-char’ is preferable for interactive use, e.g. because it respects values of ‘delete-active-region’ and ‘overwrite-mode’.” Seems odd that a default key binding would use a function for which there is a built-in “preferable” alternative.

    1. Doesn’t `C-d` do this by default already?

      Yes. I had meant to refer to backward-delete-char.

      Thank your for pointing out that minor detail (Joy)(Surprise).

      Seems odd that a default key binding would use a function for which there is a
      built-in “preferable” alternative.

      That flexibility make me think of delete-selection-mode, too. I’m curious
      about why somebody’s Emacs might get configured without and with these.

Leave a Reply to Grant Cancel reply

Your email address will not be published. Required fields are marked *