Ihor Radchenko <yanta...@gmail.com> writes:

> dal-bla...@onenetbeyond.org writes:
>
>> I just inspected the git version.
>>
>> Is the macro 'org-no-popups' setting _'pop-up-windows' to nil_ and is
>> only used by 'org-switch-to-buffer-other-window' that call
>> 'switch-to-buffer-other-window' which in turn, 
>> set _'pop-up-windows' to t_ ?
>>
>> Also 'pop-up-windows', 'pop-up-frame' are announced to be « provided
>> mainly for backward compatibility and should not be used in new code ».
>
> You are right. org-no-popups was more widely used in the past. It is
> probably time to obsolete it and eventually remove it.
>
> AFAIU, org-no-popups is a legacy function introduced very long time ago.
> Is it left there mostly to keep the working code working.

I have reviewed all the uses of `org-switch-to-buffer-other-window' -
the only user of `org-no-popups' and it looks like the only reason we
don't use `switch-to-buffer-other-window' is let-binding `pop-up-frames'
to nil. Let-binding `pop-up-windows' is not effective because
`switch-to-buffer-other-window' binds (pop-up-windows t).

Considering that switching to popup frame is not Emacs default, it can
only happen when users deliberately changed display-buffer-alist in
their config. Disrespecting user settings is not something nice to do on
Org side.

I conclude that `org-no-popups' and `org-switch-to-buffer-other-window'
should not be used in Org mode.

Fixed, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=78dc58508

Other issues raised in this thread need more thought.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to