mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-05 15:43:28 +00:00
org-table.el (org-table-align): Only set the window start when table alignment is performed in the selected window
* org-table.el (org-table-align): Only set the window start when table alignment is performed in the selected window. Thanks to Michael Brand for reporting this. When opening an .org file from another .org file, org-mode is initialized in the second one while the window is not yet selected. So, functions run during org-mode's initialization need to check if the org-mode window is the selected one before manipulating the "current window".
This commit is contained in:
parent
09ffff9cee
commit
adcc0d414b
|
@ -921,7 +921,8 @@ When nil, simply write \"#ERROR\" in corrupted fields.")
|
||||||
(org-goto-line winstartline)
|
(org-goto-line winstartline)
|
||||||
(setq winstart (point-at-bol))
|
(setq winstart (point-at-bol))
|
||||||
(org-goto-line linepos)
|
(org-goto-line linepos)
|
||||||
(set-window-start (selected-window) winstart 'noforce)
|
(when (eq (window-buffer (selected-window)) (current-buffer))
|
||||||
|
(set-window-start (selected-window) winstart 'noforce))
|
||||||
(org-table-goto-column colpos)
|
(org-table-goto-column colpos)
|
||||||
(and org-table-overlay-coordinates (org-table-overlay-coordinates))
|
(and org-table-overlay-coordinates (org-table-overlay-coordinates))
|
||||||
(setq org-table-may-need-update nil)
|
(setq org-table-may-need-update nil)
|
||||||
|
|
Loading…
Reference in a new issue