diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index e84b10f2e..6b09cdc5b 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -12,8 +12,12 @@ Please send Org bug reports to mailto:emacs-orgmode@gnu.org. * Version 9.3 -** Incompatible change - +** Incompatible changes +*** Change in behavior on exit from an Org edit buffer +Org will no longer attempt to restore the window configuration in the +frame to which the user returns after editing a source block with +~org-edit-src-code~. Instead, the window configuration will remain as +it is. *** Change default value for ~org-email-link-description-format~ When linking from a mail buffer, Org used to truncate the subject of diff --git a/lisp/org-src.el b/lisp/org-src.el index 08deda4d2..d383339e0 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -270,9 +270,6 @@ issued in the language major mode buffer." (defvar-local org-src--remote nil) (put 'org-src--remote 'permanent-local t) -(defvar-local org-src--saved-temp-window-config nil) -(put 'org-src--saved-temp-window-config 'permanent-local t) - (defvar-local org-src--source-type nil "Type of element being edited, as a symbol.") (put 'org-src--source-type 'permanent-local t) @@ -475,7 +472,6 @@ When REMOTE is non-nil, do not try to preserve point or mark when moving from the edit area to the source. Leave point in edit buffer." - (setq org-src--saved-temp-window-config (current-window-configuration)) (let* ((area (org-src--contents-area datum)) (beg (copy-marker (nth 0 area))) (end (copy-marker (nth 1 area) t)) @@ -1172,10 +1168,7 @@ Throw an error if there is no such buffer." (write-back (org-src--goto-coordinates coordinates beg end)))) ;; Clean up left-over markers and restore window configuration. (set-marker beg nil) - (set-marker end nil) - (when org-src--saved-temp-window-config - (set-window-configuration org-src--saved-temp-window-config) - (setq org-src--saved-temp-window-config nil)))) + (set-marker end nil))) (provide 'org-src)