[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] restore window configuration after org-edit-src-exit

From: Matt Price
Subject: Re: [PATCH] restore window configuration after org-edit-src-exit
Date: Thu, 9 Jan 2020 10:03:18 -0500

Hi, sorry I missed this thread in the peri-holiday rush, just want to say thank you all for ironing out the difficulties arsing from that change earlier.

On Tue, Jan 7, 2020 at 4:06 AM Nicolas Goaziou <address@hidden> wrote:

Jack Kamm <address@hidden> writes:

> Attached is a patch to restore the window configuration after exiting an
> org source buffer, when org-src-window-setup is one of reorganize-frame,
> split-window-below, or split-window-right.

Thank you for the patch! Some comments follow.

> @@ -156,8 +156,7 @@ split-window-right Show edit buffer to the right of the current window,
>                     keeping all other windows.
>  other-window       Use `switch-to-buffer-other-window' to display edit buffer.
>  reorganize-frame   Show only two windows on the current frame, the current
> -                   window and the edit buffer.  When exiting the edit buffer,
> -                   return to one window.
> +                   window and the edit buffer.
>  other-frame        Use `switch-to-buffer-other-frame' to display edit buffer.
>                     Also, when exiting the edit buffer, kill that
>                     frame."

It would be useful to also explain what happens when the value is
`reorganize-frame', `split-window-right', or `split-window-right', e.g.,
that previous window configuration is restored.

> +    (when org-src--saved-temp-window-config
> +      (set-window-configuration org-src--saved-temp-window-config)
> +      (setq org-src--saved-temp-window-config nil))))

It may be useful to wrap `set-window-configuration' within
`unwind-protect' so we can still reset the
`org-src--saved-temp-window-config' variable even though something went



Nicolas Goaziou

reply via email to

[Prev in Thread] Current Thread [Next in Thread]