|
From: | Max Nikulin |
Subject: | Re: [PATCH] [BUG] Org 9.5: org-goto UI seems broken |
Date: | Sun, 17 Oct 2021 23:35:41 +0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 |
On 16/10/2021 13:52, Ihor Radchenko wrote:
Max Nikulin writes:It seems, each case of `org-no-popups' may require specific code. I have tried to take some code related to completion. It overrides display-buffer-base-action, but something more is required for pop-up-frames.I think you went too far. display-buffer-base-action is mostly for user to specify. We should not override it. If user needs adjustments for *Org Help*, it is always possible using a custom function inside display-buffer-base-action. I do not think that we need to do this job for the user. From my perspective, there is no need to prevent users from shooting their own leg (we are in Emacs after all). The cases we may need to interfere are: (1) when some user customisations are mostly ok, except they affect Org's usability, and the user has no easy way to fix it; (2) when some customisation is very common and we significantly help many users by supporting such customisation in Org itself. I think pop-up-windows customisation qualifies for "(1)". Not display-buffer-base-action.
I may be wrong but from https://www.gnu.org/software/emacs/manual/html_node/elisp/Displaying-Buffers.html "Displaying a Buffer in a Suitable Window" I have an impression that the purpose of `display-buffer-base-action' is e.g. to say "please, show every buffer in a new frame". However there are certainly small buffers (e.g. "*Completion*") that do not deserve own frames, so it is responsibility of `display-buffer' caller to pass an argument that overrides *default* action. User may still customize `display-buffer-alist' to override `display-buffer' argument. Notice that I left `display-buffer-overriding-action' (highest priority variable) untouched.
There are another type of buffers, e.g. "*Backtrace*". New frame is created for them but on quit from debugger they disappear from the screen (actually they become iconified) till next error.
I believe, Org should provide similar hints ("show this small window below this buffer" for org-goto help, "hide this window on quit" for edit src) with priority in between of `display-buffer-base-action' and `display-buffer-alist'. Since `org-no-popups' is used in both cases and due to API related to `display-buffer', it is impossible to just fix `org-no-popups'. Some new macros or functions should be introduced.
So (setq display-buffer-base-action '((display-buffer-reuse-window display-buffer-pop-up-frame) (reusable-frames . 0))) should not be considered as shooting a foot.
[Prev in Thread] | Current Thread | [Next in Thread] |