GNU bug report logs - #42487
26.3; org-mode; Found a bug when typing Korean in org-table!

Previous Next

Package: org-mode;

Reported by: Chanhee Jeong <chanheejeong <at> outlook.kr>

Date: Thu, 23 Jul 2020 05:12:03 UTC

Severity: normal

Found in version 26.3

Full log


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

From: Chanhee Jeong <chanheejeong <at> outlook.kr>
To: Bastien <bzg <at> gnu.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>,
 "42487 <at> debbugs.gnu.org" <42487 <at> debbugs.gnu.org>
Subject: RE: bug#42487: 26.3; org-mode; Found a bug when typing Korean in
 org-table!
Date: Fri, 18 Sep 2020 03:06:37 +0000
[Message part 1 (text/plain, inline)]
Thank you for the advice!

Indeed, (setq org-table-auto-blank-field nil) does fix my problems – no more disappearing Korean characters!

Adding the said line in my .emacs works for me, but I believe adding a line in .emacs doesn’t count as a bug fix… (am I right?)

I think it’s a problem arising from Korean input method and org-table input method. Both are excellent codes but I guess org-table was written without consideration of a language other than English.

I did some research and in org-table.el, function orgtbl-self-insert-command seem to be related, though I’m not sure where the problem begins…

I’m appending the function definition (although I’m sure you’ll have no problem finding it)

(defun orgtbl-self-insert-command (N)
  "Like `self-insert-command', use overwrite-mode for whitespace in tables.
If the cursor is in a table looking at whitespace, the whitespace is
overwritten, and the table is not marked as requiring realignment."
  (interactive "p")
  (if (and (org-at-table-p)
              (or
               (and org-table-auto-blank-field
                     (member last-command
                                '(orgtbl-hijacker-command-100
                                   orgtbl-hijacker-command-101
                                   orgtbl-hijacker-command-102
                                   orgtbl-hijacker-command-103
                                   orgtbl-hijacker-command-104
                                   orgtbl-hijacker-command-105
                                   yas/expand))
                     (org-table-blank-field))
               t)
              (eq N 1)
              (looking-at "[^|\n]* \\( \\)|"))
      (let (org-table-may-need-update)
           (delete-region (match-beginning 1) (match-end 1))
           (self-insert-command N))
    (setq org-table-may-need-update t)
    (let* (orgtbl-mode
              a
              (cmd (or (key-binding
                          (or (and (listp function-key-map)
                                      (setq a (assoc last-input-event function-key-map))
                                      (cdr a))
                                (vector last-input-event)))
                         'self-insert-command)))
      (call-interactively cmd)
      (if (and org-self-insert-cluster-for-undo
                  (eq cmd 'self-insert-command))
             (if (not (eq last-command 'orgtbl-self-insert-command))
                 (setq org-self-insert-command-undo-counter 1)
               (if (>= org-self-insert-command-undo-counter 20)
                     (setq org-self-insert-command-undo-counter 1)
                 (and (> org-self-insert-command-undo-counter 0)
                        buffer-undo-list
                        (not (cadr buffer-undo-list)) ; remove nil entry
                        (setcdr buffer-undo-list (cddr buffer-undo-list)))
                 (setq org-self-insert-command-undo-counter
                         (1+ org-self-insert-command-undo-counter))))))))

The if statement seem to be t for Korean input for some reason… Could you take another look into it please?

Thank you very much

Sincerely,

Chanhee Jeong
chanheejeong <at> outlook.kr<mailto:chanheejeong <at> outlook.kr>
chanheejeong <at> snu.ac.kr<mailto:chanheejeong <at> snu.ac.kr>

보낸 사람: Bastien<mailto:bzg <at> gnu.org>
보낸 날짜: 2020년 9월 6일 일요일 오후 5:18
받는 사람: Chanhee Jeong<mailto:chanheejeong <at> outlook.kr>
참조: Eli Zaretskii<mailto:eliz <at> gnu.org>; 42487 <at> debbugs.gnu.org<mailto:42487 <at> debbugs.gnu.org>
제목: Re: bug#42487: 26.3; org-mode; Found a bug when typing Korean in org-table!

Chanhee Jeong <chanheejeong <at> outlook.kr> writes:

> Please refer to: https://giphy.com/gifs/Ln3lQrKDQIZf5RHCsM

Thanks for taking the time to provide an image, that's useful.

Can you try setting this:

(setq org-table-auto-blank-field nil)

Do you still have disappearing cells?

--
 Bastien

[Message part 2 (text/html, inline)]

This bug report was last modified 4 years and 326 days ago.

Previous Next


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