summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Price <moptop99@gmail.com>2018-11-27 21:32:07 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2018-11-27 21:32:07 +0100
commit819e98afd018cad3c13fd58bfcbd979ab36dfbc7 (patch)
treea7dc82290ae268592cb56b9c1c400c82066fff5d
parent655c08dcc86cdcd46097bd22e293314f42456426 (diff)
downloadorg-mode-819e98afd018cad3c13fd58bfcbd979ab36dfbc7.tar.gz
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.
-rw-r--r--etc/ORG-NEWS8
-rw-r--r--lisp/org-src.el9
2 files changed, 7 insertions, 10 deletions
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index e84b10f..6b09cdc 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 08deda4..d383339 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)