Re: bug#45915: 28.2; delete-char deletes two letters

2022-09-22 Thread Eli Zaretskii
> Date: Fri, 23 Sep 2022 06:36:58 +0900 (JST)
> Cc: yanta...@gmail.com, homeros.mis...@gmail.com, 45...@debbugs.gnu.org,
>  emacs-orgmode@gnu.org, t...@misasa.okayama-u.ac.jp
> From: Tak Kunihiro 
> 
> >>> One other possibility is to use a slightly different :relative-width
> >>> factor for the two spaces in a table cell: one with the value of 1,
> >>> the other with 1.001 (say).  They will be indistinguishable on
> >>> display, but since the values are not equal, both stretch gfyphs will
> >>> be displayed, not just one.
> >> 
> >> This is a good idea. I used it to fix the reported issue.
> >> 
> >> Fixed on main.
> > 
> > Great.  So I guess this bug report can be closed?
> 
> Nice. Yes, please close this bug report.

Thanks, done.



Re: bug#45915: 28.2; delete-char deletes two letters

2022-09-22 Thread Tak Kunihiro
>>> One other possibility is to use a slightly different :relative-width
>>> factor for the two spaces in a table cell: one with the value of 1,
>>> the other with 1.001 (say).  They will be indistinguishable on
>>> display, but since the values are not equal, both stretch gfyphs will
>>> be displayed, not just one.
>> 
>> This is a good idea. I used it to fix the reported issue.
>> 
>> Fixed on main.
> 
> Great.  So I guess this bug report can be closed?

Nice. Yes, please close this bug report.



Re: bug#45915: 28.2; delete-char deletes two letters

2022-09-22 Thread Eli Zaretskii
> From: Ihor Radchenko 
> Cc: homeros.mis...@gmail.com,  t...@misasa.okayama-u.ac.jp,
>   45...@debbugs.gnu.org, emacs-orgmode@gnu.org
> Date: Thu, 22 Sep 2022 20:03:55 +0800
> 
> Eli Zaretskii  writes:
> 
> > One other possibility is to use a slightly different :relative-width
> > factor for the two spaces in a table cell: one with the value of 1,
> > the other with 1.001 (say).  They will be indistinguishable on
> > display, but since the values are not equal, both stretch gfyphs will
> > be displayed, not just one.
> 
> This is a good idea. I used it to fix the reported issue.
> 
> Fixed on main.

Great.  So I guess this bug report can be closed?



Re: bug#45915: 28.2; delete-char deletes two letters

2022-09-22 Thread Ihor Radchenko
Eli Zaretskii  writes:

>> I don't think this is the right solution.  One possible solution that
>> is better is to bind  to an org-table specific command, which
>> would insert some character displayed as a thin space between the two
>> spaces that have the 'display' property.  But I'll let Ihor chime in.
>
> One other possibility is to use a slightly different :relative-width
> factor for the two spaces in a table cell: one with the value of 1,
> the other with 1.001 (say).  They will be indistinguishable on
> display, but since the values are not equal, both stretch gfyphs will
> be displayed, not just one.

This is a good idea. I used it to fix the reported issue.

Fixed on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=9dde82411aefe5a6728eef95c3629dbf266fefa5

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



bug#45915: 28.2; delete-char deletes two letters

2022-09-15 Thread Tak Kunihiro
I confirmed that delete-char still deletes two letters on
emacs-version: 28.2, org-version: 9.5.5.

I found out (org-table-align) in (org-table-copy-down) makes
this situation.

Can someone take a look (org-table-align)?

TIA

#+begin_src emacs-lisp
(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 "| 1 |"))
  (switch-to-buffer-other-window "*temp buffer*")
  (execute-kbd-macro (kbd "M-< C-n C-f C-f"))
  (message "I will call #'org-table-copy-down.")
  (sit-for 2)
  (call-interactively #'org-table-copy-down)
  (sit-for 2)
  (message "I will hit .")
  (sit-for 2)
  (execute-kbd-macro (kbd ""))
  (message "Two letters were deleted unexpectedly."))
;;; (call-interactively 'emacs-bug-reproduce-45915)
#+end_src