1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-26 07:33:39 +00:00

org-src: Do not restore window config when exiting an edit buffer

org-src.el (org-src--saved-temp-window-config): Remove variable.
* lisp/org-src.el (org-src--edit-element): Apply removal.
This commit is contained in:
Matt Price 2018-11-27 21:32:07 +01:00 committed by Nicolas Goaziou
parent 655c08dcc8
commit 819e98afd0
2 changed files with 7 additions and 10 deletions

View File

@ -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

View File

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