emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Max Nikulin <manikulin@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] [BUG] Org 9.5: org-goto UI seems broken
Date: Wed, 06 Oct 2021 00:32:43 +0800	[thread overview]
Message-ID: <87ee8zxwic.fsf@localhost> (raw)
In-Reply-To: <sjholf$7v4$1@ciao.gmane.io>

[-- Attachment #1: Type: text/plain, Size: 835 bytes --]

Max Nikulin <manikulin@gmail.com> writes:

> Thank you, Ihor. I am a user of alternative `org-goto' interface. I have 
> tried default one having a couple of windows in the frame (indirect 
> buffer for subtree, indirect for src block). It seems, previous window 
> configuration is restored correctly when `org-goto' is finished.
>
> Curiously `org-no-popup' was introduced namely for `org-goto`

Thanks for the testing and digging the old commits.

I tried come up with the reason why org-no-popup was used in the initial
implementation. I think, the reason is avoiding situation like what you
may see after running
(let ((pop-up-frames t)) (funcall-interactively #'org-goto))
So, removing the macro completely is not a good idea.

I have updated the patch that should work without dropping the macro.
See the attached.

Best,
Ihor


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org-goto-Fix-window-broken-arrangement-after-399481b.patch --]
[-- Type: text/x-diff, Size: 1983 bytes --]

From 438c476066e897b1fc3d758fd48712c1846cd845 Mon Sep 17 00:00:00 2001
Message-Id: <438c476066e897b1fc3d758fd48712c1846cd845.1633451289.git.yantar92@gmail.com>
From: Ihor Radchenko <yantar92@gmail.com>
Date: Tue, 5 Oct 2021 20:37:02 +0800
Subject: [PATCH] org-goto: Fix window broken arrangement after 399481bad

* lisp/org-goto.el (org-goto-location): Make sure that `org-on-popups'
macro does not suppress the *Org Help* window pop-up.

Fixes https://list.orgmode.org/e169a2f9-72b1-02bb-96c1-6e7368f646da@gmail.com/T/#t
---
 lisp/org-goto.el | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/lisp/org-goto.el b/lisp/org-goto.el
index 0a3470f54..cd832d72c 100644
--- a/lisp/org-goto.el
+++ b/lisp/org-goto.el
@@ -217,15 +217,16 @@ (defun org-goto-location (&optional _buf help)
 	  (condition-case nil
 	      (make-indirect-buffer (current-buffer) "*org-goto*" t)
 	    (error (make-indirect-buffer (current-buffer) "*org-goto*" t))))
-	 (let (temp-buffer-show-function temp-buffer-show-hook)
-	   (with-output-to-temp-buffer "*Org Help*"
-	     (princ (format help (if org-goto-auto-isearch
-				     "  Just type for auto-isearch."
-				   "  n/p/f/b/u to navigate, q to quit.")))))
-	 (org-fit-window-to-buffer (get-buffer-window "*Org Help*"))
-	 (org-overview)
-	 (setq buffer-read-only t)
-	 (if (and (boundp 'org-goto-start-pos)
+         (let ((pop-up-windows t))
+	   (let (temp-buffer-show-function temp-buffer-show-hook)
+	     (with-output-to-temp-buffer "*Org Help*"
+	       (princ (format help (if org-goto-auto-isearch
+				       "  Just type for auto-isearch."
+				     "  n/p/f/b/u to navigate, q to quit.")))))
+	   (org-fit-window-to-buffer (get-buffer-window "*Org Help*")))
+         (org-overview)
+         (setq buffer-read-only t)
+         (if (and (boundp 'org-goto-start-pos)
 		  (integer-or-marker-p org-goto-start-pos))
 	     (progn (goto-char org-goto-start-pos)
 		    (when (org-invisible-p)
-- 
2.32.0


  reply	other threads:[~2021-10-05 17:27 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-05  6:31 [BUG] Org 9.5: org-goto UI seems broken Adam Porter
2021-10-05 11:35 ` Max Nikulin
2021-10-05 12:45   ` [PATCH] " Ihor Radchenko
2021-10-05 12:52     ` Adam Porter
2021-10-05 14:49     ` Max Nikulin
2021-10-05 16:32       ` Ihor Radchenko [this message]
2021-10-07 16:14         ` Max Nikulin
2021-10-08 10:22           ` Marco Wahl
2021-10-12 14:59             ` Max Nikulin
2021-10-12 20:58               ` Marco Wahl
2021-10-13  1:35                 ` Ihor Radchenko
2021-10-13  9:44                   ` Marco Wahl
2021-10-13 12:23                     ` Max Nikulin
2021-10-13 12:35                       ` Eric S Fraga
2021-10-14  9:54                         ` Marco Wahl
2021-10-14 10:16                           ` Ihor Radchenko
2021-10-14 15:44                             ` Max Nikulin
2021-10-15 16:37                               ` Max Nikulin
2021-10-16  6:52                                 ` Ihor Radchenko
2021-10-17 16:35                                   ` Max Nikulin
2021-10-18  9:25                                     ` Eric S Fraga
2021-10-18 16:53                                       ` Max Nikulin
2021-10-19  7:45                                         ` Eric S Fraga
2021-10-05 12:48   ` Adam Porter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ee8zxwic.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=manikulin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).