From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: [PATCH] don't always restore previous window configuration? Date: Fri, 23 Nov 2018 10:20:56 -0500 Message-ID: References: <87zhu0nw36.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="00000000000014c027057b568687" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gQDG0-00082U-7F for emacs-orgmode@gnu.org; Fri, 23 Nov 2018 10:20:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gQDFy-0008CU-7n for emacs-orgmode@gnu.org; Fri, 23 Nov 2018 10:20:36 -0500 Received: from mail-it1-x144.google.com ([2607:f8b0:4864:20::144]:35873) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gQDFx-00086I-WE for emacs-orgmode@gnu.org; Fri, 23 Nov 2018 10:20:34 -0500 Received: by mail-it1-x144.google.com with SMTP id c9so18411129itj.1 for ; Fri, 23 Nov 2018 07:20:31 -0800 (PST) In-Reply-To: <87zhu0nw36.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Org Mode --00000000000014c027057b568687 Content-Type: multipart/alternative; boundary="00000000000014c024057b568685" --00000000000014c024057b568685 Content-Type: text/plain; charset="UTF-8" OH man, that was a little harder than I thought it would be. Does `make test` randomly checkout a new branch or something? This patch adds a new long-winded variable `org-src-restore-window-config`, t by default, which if set to `nil` will inhibit restoration of previous window config in `org-edit-src-exit`. I'm afraid I don't really understand the tests and I learn so slowly that I don't have time to keep trying today. But hopefully this simple patch is adequate. I also wrote a changelog entry in my git commit msg, which is here: Make restoration of window config optional on exit from src buffer * org-srce.el (org-src-restore-window-config, org-exit-from-src): New variable org-src-restore-window-config allows user to opt out of restoring window config when exiting from source buffer with org-exit-from-src. On Fri, Nov 23, 2018 at 1:31 AM Eric S Fraga wrote: > On Thursday, 22 Nov 2018 at 14:09, Matt Price wrote: > > SO far this is working for me but I wondered whether other people would > > similarly want to change this behaviour and I should put together a > proper > > proposal & patch? > > Yes, please. This is becoming more and more necessary as monitors get > larger. I am using a very wide (and very nice) 38" monitor at work. My > window configuration within a single frame can get quite > complex. Having org (and other tools) change this configuration can be > quite annoying. > > -- > Eric S Fraga via Emacs 27.0.50, Org release_9.1.14-1035-gfeb442 > --00000000000014c024057b568685 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
OH man, that was a little harder tha= n I thought it would be. Does `make test` randomly checkout a new branch or= something?=C2=A0

This patch adds a new long-= winded variable `org-src-restore-window-config`, t by default, which if set= to `nil` will inhibit restoration of previous window config in `org-edit-s= rc-exit`.
I'm afraid I don't really understand the tests = and I learn so slowly that I don't have time to keep trying today.=C2= =A0 But hopefully this simple patch is adequate. I also wrote a changelog e= ntry in my git commit msg, which is here:

Make res= toration of window config optional on exit from src buffer

* org-src= e.el (org-src-restore-window-config, org-exit-from-src): New
=C2=A0 vari= able org-src-restore-window-config allows user to opt out of
=C2=A0 rest= oring window config when exiting from source buffer with
=C2=A0 org-exit= -from-src.




On Fri, Nov 23, 2018 at 1:31 AM Eric S Fraga <esflists@gmail.com> wrote:
On Thursday, 22 Nov 2018= at 14:09, Matt Price wrote:
> SO far this is working for me but I wondered whether other people woul= d
> similarly want to change this behaviour and I should put together a pr= oper
> proposal & patch?

Yes, please.=C2=A0 This is becoming more and more necessary as monitors get=
larger.=C2=A0 I am using a very wide (and very nice) 38" monitor at wo= rk.=C2=A0 My
window configuration within a single frame can get quite
complex.=C2=A0 Having org (and other tools) change this configuration can b= e
quite annoying.

--
Eric S Fraga via Emacs 27.0.50, Org release_9.1.14-1035-gfeb442
--00000000000014c024057b568685-- --00000000000014c027057b568687 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Make-restoration-of-window-config-optional-on-exit-f.patch" Content-Disposition: attachment; filename="0001-Make-restoration-of-window-config-optional-on-exit-f.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jou6ahql0 RnJvbSA3YWRlY2E2MzhlZmY5NjI3NzA4NzQwNzg4MjJlMmEzZDIzNDMwYjJiIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBNYXR0IFByaWNlIDxtYXR0LnByaWNlQHV0b3JvbnRvLmNhPgpE YXRlOiBGcmksIDIzIE5vdiAyMDE4IDA5OjE2OjQwIC0wNTAwClN1YmplY3Q6IFtQQVRDSF0gTWFr ZSByZXN0b3JhdGlvbiBvZiB3aW5kb3cgY29uZmlnIG9wdGlvbmFsIG9uIGV4aXQgZnJvbSBzcmMK IGJ1ZmZlcgoKKiBvcmctc3JjZS5lbCAob3JnLXNyYy1yZXN0b3JlLXdpbmRvdy1jb25maWcsIG9y Zy1leGl0LWZyb20tc3JjKTogTmV3CiAgdmFyaWFibGUgb3JnLXNyYy1yZXd0b3JlLXdpbmRvdy1j b25maWcgYWxsb3dzIHVzZXIgdG8gb3B0IG91dCBvZgogIHJlc3RvcmluZyB3aW5kb3IgY29uZmln IHdoZW4gZXhpdGluZyBmcm9tIHNvdXJjZSBidWZmZXIgd2l0aAogIG9yZy1leGl0LWZyb20tc3Jj LgotLS0KIGxpc3Avb3JnLXNyYy5lbCB8IDEyICsrKysrKysrKystLQogMSBmaWxlIGNoYW5nZWQs IDEwIGluc2VydGlvbnMoKyksIDIgZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvbGlzcC9vcmct c3JjLmVsIGIvbGlzcC9vcmctc3JjLmVsCmluZGV4IDEyMTYzMTU2Zi4uMzg2YmFkNDEzIDEwMDY0 NAotLS0gYS9saXNwL29yZy1zcmMuZWwKKysrIGIvbGlzcC9vcmctc3JjLmVsCkBAIC0xNjYsNiAr MTY2LDE0IEBA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