emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH] [BUG] Org 9.5: org-goto UI seems broken


From: Max Nikulin
Subject: Re: [PATCH] [BUG] Org 9.5: org-goto UI seems broken
Date: Thu, 14 Oct 2021 22:44:55 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

On 14/10/2021 17:16, Ihor Radchenko wrote:
Marco Wahl writes:

Since org-goto in main is still broken I'll commit the fix for org-goto
which kicks out the use of the macro org-no-popups (but not the macro
itself since it's used elsewhere AFAICS.)

Max, Ihor!  If you see the necessity of refinement please keep going!

I am inclined to think that org-no-popups may still be useful to
suppress pop-up-frames.  However, no so much for pop-up-windows.  Note
that I introduced pop-up-windows let-binding in org-no-popups in place
of overriding display-buffer-alist.  However, I did not fully understand
pop-up-windows does and the current let-binding actually changes
pop-up-windows value to nil (t is the Emacs default). I think we can
simply remove pop-up-windows binding from org-no-popups. Feel free to
commit this change. I am currently working on org-element-cache and do
not spend much time on other patches.

Today I am against dropping of `org-no-popups'. Since Ihor confirmed that he had no particular reason to add `pop-up-windows', the minimal change (that should be applied to the bugfix branch)

diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index 52fc09a06..5f2c29c42 100644
--- a/lisp/org-macs.el
+++ b/lisp/org-macs.el
@@ -209,7 +209,7 @@ because otherwise all these markers will point to nowhere."

 (defmacro org-no-popups (&rest body)
   "Suppress popup windows and evaluate BODY."
-  `(let (pop-up-frames pop-up-windows)
+  `(let (pop-up-frames)
      ,@body))

 ^L

I think, something should be done with `org-no-popups'. Assume a user who has (I have no idea concerning the goal though)

  (setq pop-up-frames t)
  (setq display-buffer-base-action
        '((display-buffer-reuse-window display-buffer-pop-up-frame)
          (reusable-frames . 0)))

e.g. https://list.orgmode.org/20200503033854.GA28741@singpolyma-beefy

With "emacs -Q" and above settings completion e.g. for "C-h f" does not cause creation of a new frame. Org help windows appear in new frames though. That is why `org-no-popups' should have more code.

Minimal patch works in the cases like https://list.orgmode.org/87h7ij12t8.fsf@localhost and the one raised in this thread. I hope it will not break https://list.orgmode.org/orgmode/871rdtupey.fsf@joshuao.com/T/#u as well.

In the meanwhile I found the following thread on window creation in Org and `display-buffer' machinery (accessibility concerns were mentioned besides other things):
https://list.orgmode.org/87eevw7jqk.fsf@gmail.com/T/#u
Jack Kamm. [RFC PATCH] Changes to pop-up source buffers. 2020-01-18 17:33

Unfortunately info "(elisp) Displaying Buffers" https://www.gnu.org/software/emacs/manual/html_node/elisp/Displaying-Buffers.html is a reference rather than a guide. I have not realized when `pop-up-frames' or its modern equivalent can be convenient. I have not tried Eric's setup yet.

BTW I think the name *Org Help* for the UI buffer could be better.

Do you have better ideas? Maybe something like *Org-goto Help*? If we
want to change it, we may want to do it now, before users actually use
*Org Help* name i.e. in display-buffer-alist. display-buffer-alist did
not affect *Org Help* before 399481bad, so we have low odds to break
anybody's config yet.

Are there use cases when "*Org Help*" is not specific enough and more than one help window should be shown simultaneously or they should be shown in different sides?

P.S. Example of complex window setup unrelated to Org:
info "(elisp) Frame Layouts with Side Windows"
https://www.gnu.org/software/emacs/manual/html_node/elisp/Frame-Layouts-with-Side-Windows.html




reply via email to

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