GNU bug report logs - #45915
27.1; deletechar distorts org-table

Previous Next

Package: emacs;

Reported by: Tak Kunihiro <tkk <at> misasa.okayama-u.ac.jp>

Date: Sat, 16 Jan 2021 08:03:02 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #29 received at 45915 <at> debbugs.gnu.org (full text, mbox):

From: Ihor Radchenko <yantar92 <at> gmail.com>
To: Tak Kunihiro <homeros.misasa <at> gmail.com>
Cc: tkk <at> misasa.okayama-u.ac.jp, 45915 <at> debbugs.gnu.org
Subject: Re: bug#45915: 28.0.90; deletechar distorts org-table
Date: Sat, 30 Apr 2022 12:00:21 +0800
Tak Kunihiro <homeros.misasa <at> gmail.com> writes:

> Thank you for the patch.  I applied the patch to org-table.el on Emacs
> 28.0.90.
>
> And I still see the problem there.  Is the problem solved by the patch
> on your environment?

The problem was solved on my side, but _not_ using your reproducer
explicitly. If I save the buffer from your reproducer as a file and
later open in, the patch does solve the problem. However, when I run the
reproducer as is, a similar-looking problem emerges.

Using your reproducer, something very strange is going on.
With the patch, <delete> is correctly mapped to org-delete-char, which
calls (delete-char 1) at some point. However, this (delete-char 1)
somehow deletes 2!! chars instead of 1. This should be some tricky Emacs
issue (bug?). In any case, I am not ready to dig into what is going on
in Emacs. I do not think that such problem is going to appear during
normal Emacs usage. At least, I was unable to reproduce it by other
means than your reproducer function.

To illustrate the issue, one can use the following version of the
reproducer. Feel free to report this to Emacs upstream.

(defun emacs-bug-reproduce-45915 ()
  "Reproduce bug#45915."
  ;; (gnus-read-ephemeral-emacs-bug-group 45915)
  (interactive)
  (with-current-buffer (get-buffer-create "*temp buffer*")
    (erase-buffer)
    (require 'org)
    (orgtbl-mode 1)
    (insert (format "emacs-version: %s, org-version: %s\n" emacs-version org-version))
    (insert "|   | rownames |
| / | <l>      |
|---+----------|
|   | a        |"))
  (switch-to-buffer-other-window "*temp buffer*")
  (execute-kbd-macro (kbd "M-< C-n C-n C-n C-n C-f C-f"))
  (message "I will hit S-<return>.")
  (sit-for 2)
  (execute-kbd-macro (kbd "S-<return>"))
  (message "I will hit <delete>.")
  (sit-for 2)
  ;;  (execute-kbd-macro (kbd "<delete>"))
  (delete-char 1)
  (message "I will call previous-line.")
  (sit-for 2)
  (call-interactively 'previous-line))

Best,
Ihor




This bug report was last modified 2 years and 238 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.