all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [BUG] after execute +org-realign-table-maybe-h may move point [9.6 (9.6-??-bed47b4 @ c:/Users/yhht/.emacs.d/.local/straight/build-28.2/org/)]
@ 2023-03-10  6:21 赵一宇
  2023-03-10 12:56 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: 赵一宇 @ 2023-03-10  6:21 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 814 bytes --]

+org-realign-table-maybe-h function definition is at the end. 

Instead of using save-excursion macro, it saves current point to a var,
and restore the point after execute org-table-align.
That would cause point move visually. Although the (point) value not changed, org-table-align function shall insert  spaces in front of the point. 
Don't know if it has already fixed, or there are some other concerns.
(defun +org-realign-table-maybe-h ()
  "Auto-align table under cursor."
  (when (and org-table-automatic-realign (org-at-table-p) org-table-may-need-update)
    (let ((pt (point))
          (inhibit-message t))
      (if org-table-may-need-update (org-table-align))
      (goto-char pt))))
Emacs : GNU Emacs 28.2 (build 2, x86_64-w64-mingw32)
 of 2022-09-13
Package: Org mode version 9.6 (9.6-??-bed47b4 )


[-- Attachment #2: Type: text/html, Size: 1593 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-10 12:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-10  6:21 [BUG] after execute +org-realign-table-maybe-h may move point [9.6 (9.6-??-bed47b4 @ c:/Users/yhht/.emacs.d/.local/straight/build-28.2/org/)] 赵一宇
2023-03-10 12:56 ` Ihor Radchenko

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.