From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug: org-edit-src keeps splitting the window [9.2.5 (release_9.2.5-504-g3c24be @ /home/immanuel/.emacs.d/straight/build/org/)] Date: Mon, 02 Sep 2019 21:41:00 +0200 Message-ID: <875zmaqyer.fsf@nicolasgoaziou.fr> References: <87r252swre.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:52430) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4sCJ-0002iW-5f for emacs-orgmode@gnu.org; Mon, 02 Sep 2019 15:41:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i4sCH-0004FZ-SB for emacs-orgmode@gnu.org; Mon, 02 Sep 2019 15:41:06 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:59217) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i4sCH-0004EQ-E5 for emacs-orgmode@gnu.org; Mon, 02 Sep 2019 15:41:05 -0400 In-Reply-To: <87r252swre.fsf@gmail.com> (immanuel's message of "Fri, 30 Aug 2019 13:44:37 +0200") 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: immanuel Cc: emacs-orgmode@gnu.org Hello, immanuel writes: > When org-edit-src-code is called with org-window-setup equal to > 'split-window-below or 'split-window-right it will keep splitting the > window if the mouse is clicked on the src block in the org buffer. > This patch tries to address that [...] > +(defun org-src-select-window-for-buffer (buffer split-fun) You should make it an internal function: `org-src--select-window-for-buffer'. > + "Tries to select an existing window for buffer or splits the > window." You need to expound the docstring a bit, e.g.: "Re-use an existing window or split the current window. If BUFFER is current in a window, use it. Otherwise, split the current window, according to SPLIT-FUN, in order to display it. Also, I think this should be notified in ORG-NEWS file. Thank you! Regards, -- Nicolas Goaziou