From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id ODwTGQKWkWF+gAEAgWs5BA (envelope-from ) for ; Mon, 15 Nov 2021 00:04:34 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 6OLFFAKWkWFwIQAA1q6Kng (envelope-from ) for ; Sun, 14 Nov 2021 23:04:34 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E6B38BD48 for ; Mon, 15 Nov 2021 00:04:33 +0100 (CET) Received: from localhost ([::1]:60480 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmOY4-0004rv-T8 for larch@yhetil.org; Sun, 14 Nov 2021 18:04:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49120) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmOXK-0004rm-2n for emacs-orgmode@gnu.org; Sun, 14 Nov 2021 18:03:46 -0500 Received: from confino.investici.org ([212.103.72.250]:26793) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmOXG-00009z-Jf for emacs-orgmode@gnu.org; Sun, 14 Nov 2021 18:03:45 -0500 Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4Hsntd20nHz110C; Sun, 14 Nov 2021 23:03:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=onenetbeyond.org; s=stigmate; t=1636931017; bh=ybMtXqDS3J+Xs3ASrH3T1gCxk5rZT+d/mRi4c70l8zQ=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=oX3cQFy3xjOgIyRPNiYDWIiHcEhrE4JmaZpfdunrXTjlFXkOQE2yb/DJ5NBQKWD15 iCNcO1wnIIhyQRcnI4TbytOleecFKBZLcKonxK7pXnaNzEB5n5IiVc5OzBOOcF/aSC 0BUrA4cEiiOzpMzXppKJHBUwEyuBnpmauu3hme8g= Received: from [212.103.72.250] (mx1.investici.org [212.103.72.250]) (Authenticated sender: dal-blazej@onenetbeyond.org) by localhost (Postfix) with ESMTPSA id 4Hsntc0rMsz10hD; Sun, 14 Nov 2021 23:03:35 +0000 (UTC) From: dal-blazej@onenetbeyond.org To: Ihor Radchenko Cc: emacs-orgmode@gnu.org, jan.seeger@thenybble.de Subject: Re: Bug: org-no-popups disregards display-buffer-fallback-action [9.4.6 (9.4.6-13-g4be129-elpaplus @ /home/jeeger/.emacs.d/elpa/org-plus-contrib-20210920/)] References: <87a6ic5u1c.fsf@dumper.i-did-not-set--mail-host-address--so-tickle-me> <8735o4mhvd.fsf@localhost> <87ilwwvu1g.fsf@onenetbeyond.org> <87pmr3mfq3.fsf@localhost> Date: Mon, 15 Nov 2021 00:03:29 +0100 In-Reply-To: <87pmr3mfq3.fsf@localhost> (Ihor Radchenko's message of "Sun, 14 Nov 2021 14:08:36 +0800") Message-ID: <877ddaqr0e.fsf@onenetbeyond.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=212.103.72.250; envelope-from=dal-blazej@onenetbeyond.org; helo=confino.investici.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1636931074; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ybMtXqDS3J+Xs3ASrH3T1gCxk5rZT+d/mRi4c70l8zQ=; b=EZTlDlk5Fpp9/DxPAyjlh3VcgrQtX/oLNhNidLjBTq51RhMVkqppcJiJ3pSEcgKqhBlQvg i0MBZAxgmFkgihjtvxIk3sm6QtHghEkNySDilFZmEORMwCCYPn6W8f3sYFwglKJyuOwuqZ 2Razkz7qOGslGGIAcTROz5LiURCHEp0+be6HvOq8zspD0G+ndBVDPt9wCrvWYcmdhPpZT9 hQFCnFcv58bLBkTNQzTvko+uPYIWtJzH6NYWkmD2zFXkHOk6UkPIXd2aLKN7AtbgoSA96S 4VDGMQnEDyAAw9cLVzwK5FIQb+4VgfXdKEgQNp/0h+c1fcjRhfaBOgfpDTcbxQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636931074; a=rsa-sha256; cv=none; b=p1aLdnrQqoXctrKuQhDyNMOFuQRpGr/8n8jeBWxbxK94lvCvRgKkSwaCr5XaqlrvqtJ3q0 BK8MA09YjycWNxenlPz+LAeiKpGs/MKSQyWFJL6kqPI2GFNjO8JUtfgV+MHmzv2PVn3Pdw m8bh20lSbFb0/lYvVv8+9CPwbHW/gQU6Ua07yG0vk0KuT2XPcYg/boUtz+U5kAJVWOtWeR RK4JPyQL9D/+uKpYLEQpLQkx77FETlCjOf8QlkEdXd5XSc5jksCZ5xhy5SMaOax0KN4QFZ tsF92hk/iKWs/d8nqShAzr8ivWg5QkmODOUAJUjiMMHHtiFpsqqy7Vd9GaJydg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=onenetbeyond.org header.s=stigmate header.b=oX3cQFy3; dmarc=pass (policy=reject) header.from=onenetbeyond.org; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -4.04 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=onenetbeyond.org header.s=stigmate header.b=oX3cQFy3; dmarc=pass (policy=reject) header.from=onenetbeyond.org; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: E6B38BD48 X-Spam-Score: -4.04 X-Migadu-Scanner: scn1.migadu.com X-TUID: i3WV+sLRsOOV Ihor Radchenko writes: >> As others I am currently advising a lot of org display functions to make >> them obey to my 'display-buffer-alist'. I hope for a better cooperation >> from org to window.el. > > Can you elaborate? We are looking forward for ideas how to improve Org > in this area. More concrete suggestions are welcome. > The last time I looked into org-todo I seen that somewhere a call to split-window was make, so wathever I was trying to configure with display-buffer-alist would not conclude. Then I translated that from Doom's Emacs. #+begin_src emacs-lisp ;; Ensure todo, agenda, and other minor popups are delegated to the popup system. ;; needed for at least org-noter / org-insert-structure-template (with-eval-after-load 'org (advice-add #'org-switch-to-buffer-other-window :override (defun +popup--org-pop-to-buffer-a (buf &optional norecord) "Use `pop-to-buffer' instead of `switch-to-buffer' to open buffer.'" (pop-to-buffer buf nil norecord))) (defun +popup--suppress-delete-other-windows-a (fn &rest args) (cl-letf (((symbol-function #'delete-other-windows) #'ignore) ((symbol-function #'delete-window) #'ignore)) (apply fn args))) (dolist (fn '(org-add-log-note org-capture-place-template org-export--dispatch-ui org-agenda-get-restriction-and-command org-goto-location org-fast-tag-selection org-fast-todo-selection)) (advice-add fn :around #'+popup--suppress-delete-other-windows-a)) (advice-add #'org-fit-window-to-buffer :override #'fit-window-to-buffer)) #+end_src You can see that it is not only the org-no-popup macro that is in question but more generally the liberal usage of _split/switch/delete windows_. So if we want to make org cooperate with window.el we must ban theses functions and instead delegate the window management with calls to proper display functions. Concretly if you look at org-fast-todo-selection you can see : (if expert (set-buffer (get-buffer-create " *Org todo*")) (delete-other-windows) (set-window-buffer (split-window-vertically) (get-buffer-create " *Org todo*")) (org-switch-to-buffer-other-window " *Org todo*")) Now consider in place : (set-buffer (get-buffer-create " *Org todo*")) (unless expert (display-buffer " *Org todo*" '((display-buffer-below-selected) (window-height . fit-window-to-buffer)))) It will display this buffer below the currently selected window and fit him. Let's imagine the user wants in place to use : (add-to-list 'display-buffer-alist '(" *Org todo*" (display-buffer-in-side-window) (side . top))) Now the buffer display in a side window at top.