[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[BUG] after execute +org-realign-table-maybe-h may move point [9.6 (9.6-

From: 赵一宇
Subject: [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/)]
Date: Fri, 10 Mar 2023 14:21:45 +0800 (GMT+08:00)

+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 )

reply via email to

[Prev in Thread] Current Thread [Next in Thread]