|
From: | Juri Linkov |
Subject: | bug#38164: quit-restore-window doesn't restore point in man |
Date: | Fri, 15 Nov 2019 01:13:46 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) |
>> (progn >> (man "XYZ") >> (read-string "--> ")) >> >> 'read-string' activates the minibuffer, but asynchronous Man-bgproc-sentinel >> later calls 'quit-restore-window' that selects its previous window, >> ignoring the fact that now the selected window was in the minibuffer. >> So we need an exception for the case of active minibuffer. > > So what you want is probably (twice) > > (when (and (window-live-p (nth 2 quit-restore)) > (not (eq (selected-window) (minibuffer-window)))) > (select-window (nth 2 quit-restore)))) > > But note that quitting the minibuffer will restore the previous window > configuration and thus undo that selection and all other changes done > by 'quit-restore-window' anyway. Is it possible to not restore the previous window configuration when quitting the minibuffer?
[Prev in Thread] | Current Thread | [Next in Thread] |