bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#38164: quit-restore-window doesn't restore point in man


From: Juri Linkov
Subject: bug#38164: quit-restore-window doesn't restore point in man
Date: Wed, 13 Nov 2019 23:29:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>> @@ -1469,8 +1469,10 @@ Man-bgproc-sentinel
>>
>>         (when delete-buff
>>           (if (window-live-p (get-buffer-window Man-buffer t))
>> -            (quit-restore-window
>> -             (get-buffer-window Man-buffer t) 'kill)
>> +            (progn
>> +              (quit-restore-window
>> +               (get-buffer-window Man-buffer t) 'kill)
>> +              (select-window (old-selected-window)))
>>             (kill-buffer Man-buffer)))
>
> I'm completely lost now.  Can you tell me in a detailed fashion what
> goes wrong here?  Is the window stored in (nth 2 quit-restore) the
> wrong window right from the outset?  Or is it in a sense falsified by
> what happens later during minibuffer interaction?

(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.





reply via email to

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