* PATCH: do not restore window config on exit from src buffer
@ 2018-11-27 13:26 Matt Price
2018-11-27 20:33 ` Nicolas Goaziou
0 siblings, 1 reply; 2+ messages in thread
From: Matt Price @ 2018-11-27 13:26 UTC (permalink / raw)
To: Org Mode
[-- Attachment #1.1: Type: text/plain, Size: 104 bytes --]
As per our earlier thread, here is a patch to remove
org-src--saved-temp-window-config from org-src.el.
[-- Attachment #1.2: Type: text/html, Size: 130 bytes --]
[-- Attachment #2: 0001-Org-sr.el-On-exiting-src-buffer-do-not-restore-prior.patch --]
[-- Type: text/x-patch, Size: 2638 bytes --]
From ad2d8d26eee6c2bcfa517e0f7352406c9980bfd4 Mon Sep 17 00:00:00 2001
From: Matt Price <matt.price@utoronto.ca>
Date: Tue, 27 Nov 2018 08:19:03 -0500
Subject: [PATCH] Org-sr.el: On exiting src buffer, do not restore prior config
org-src.el (org-src--saved-temp-window-config): remove all references
to org-src--saved-temp-window-config. Org will no longer attempt to
restore the previous window configuration on exit from a src buffer.
---
etc/ORG-NEWS | 5 ++++-
lisp/org-src.el | 10 ++--------
2 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 811e98147..6ec90bfc2 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -9,7 +9,10 @@ Copyright (C) 2012-2018 Free Software Foundation, Inc.
See the end of the file for license conditions.
Please send Org bug reports to mailto:emacs-orgmode@gnu.org.
-
+* Version 9.3
+** Incompatible changes
+*** Change in behavior on exit from an Org Src 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.
* Version 9.2
** Incompatible changes
*** Removal of OrgStruct mode mode and radio lists
diff --git a/lisp/org-src.el b/lisp/org-src.el
index 12163156f..f024b31a9 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,8 +472,7 @@ 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))
+ (let* ((area (org-src--contents-area datum))
(beg (copy-marker (nth 0 area)))
(end (copy-marker (nth 1 area) t))
(old-edit-buffer (org-src--edit-buffer beg end))
@@ -1173,9 +1169,7 @@ Throw an error if there is no such buffer."
;; 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))))
+ ))
(provide 'org-src)
--
2.19.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: PATCH: do not restore window config on exit from src buffer
2018-11-27 13:26 PATCH: do not restore window config on exit from src buffer Matt Price
@ 2018-11-27 20:33 ` Nicolas Goaziou
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2018-11-27 20:33 UTC (permalink / raw)
To: Matt Price; +Cc: Org Mode
Hello,
Matt Price <moptop99@gmail.com> writes:
> As per our earlier thread, here is a patch to remove
> org-src--saved-temp-window-config from org-src.el.
> From ad2d8d26eee6c2bcfa517e0f7352406c9980bfd4 Mon Sep 17 00:00:00 2001
> From: Matt Price <matt.price@utoronto.ca>
> Date: Tue, 27 Nov 2018 08:19:03 -0500
> Subject: [PATCH] Org-sr.el: On exiting src buffer, do not restore prior config
>
> org-src.el (org-src--saved-temp-window-config): remove all references
> to org-src--saved-temp-window-config. Org will no longer attempt to
> restore the previous window configuration on exit from a src buffer.
Applied. Thank you.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-27 20:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-27 13:26 PATCH: do not restore window config on exit from src buffer Matt Price
2018-11-27 20:33 ` Nicolas Goaziou
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.