From mboxrd@z Thu Jan 1 00:00:00 1970 From: Immanuel Litzroth 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, 2 Sep 2019 23:26:33 +0200 Message-ID: References: <87r252swre.fsf@gmail.com> <875zmaqyer.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:37369) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4tqa-0001J6-6C for emacs-orgmode@gnu.org; Mon, 02 Sep 2019 17:26:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i4tqY-0002hB-3B for emacs-orgmode@gnu.org; Mon, 02 Sep 2019 17:26:48 -0400 Received: from mail-io1-xd31.google.com ([2607:f8b0:4864:20::d31]:37951) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i4tqX-0002gW-Vc for emacs-orgmode@gnu.org; Mon, 02 Sep 2019 17:26:46 -0400 Received: by mail-io1-xd31.google.com with SMTP id p12so31448908iog.5 for ; Mon, 02 Sep 2019 14:26:45 -0700 (PDT) In-Reply-To: <875zmaqyer.fsf@nicolasgoaziou.fr> 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 , emacs-orgmode@gnu.org You want me to do that and send a new patch or are you going to do it after you apply the patch? Regards, Immanuel On Mon, Sep 2, 2019 at 9:41 PM Nicolas Goaziou wrote: > > 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