sabof / org-bullets

utf-8 bullets for org-mode
686 stars 56 forks source link

delete does not work on bullet, in latest Emacs #32

Open holtzermann17 opened 2 years ago

holtzermann17 commented 2 years ago

For me <delete> runs the command delete-forward-char.

Pressing it with the cursor on a bullet raises the following debugger message:

Debugger entered--Lisp error: (wrong-type-argument sequencep t)
  lgstring-glyph-boundary(t 117 118)
  delete-forward-char(1 nil)
  funcall-interactively(delete-forward-char 1 nil)
  command-execute(delete-forward-char)

I'm on GNU Emacs 29.0.50 (build 3, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars) of 2022-08-22.

holtzermann17 commented 2 years ago

Quick work-around

(defun delete-something-here ()
  (interactive)
  (if (get-char-property (point) 'composition)
      (delete-region (point) (1+ (point)))
    (delete-forward-char 1)))

(global-set-key [delete] 'delete-something-here)