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

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

bug#1681: 23.0.60; list-processes - please reset focus to original frame


From: martin rudalics
Subject: bug#1681: 23.0.60; list-processes - please reset focus to original frame when done
Date: Sun, 04 Jan 2009 20:35:22 +0100
User-agent: Thunderbird 2.0.0.16 (Windows/20080708)

> Please change `list-processes' so that it calls
> `select-frame-set-input-focus' at the end to move focus back to the
> frame that previously had the focus.
>
> This is a general problem. Perhaps a general fix could be found.
>
> It is at least a problem for functions that might display a buffer for
> the first time, and especially those that then ask for user input
> (e.g. `yes-or-no-p'). `list-processes' is a poster child for this kind
> of function, and it has the added annoyance of being called
> automatically by `C-x C-c'.

We might be able to make such behavior customizable for the case where
Emacs asks for user input.  Meanwhile you could try using a workaround
like

(defvar my-selected-frame nil)

(add-hook 'temp-buffer-setup-hook
          (lambda ()
            (setq my-selected-frame (selected-frame))))

(add-hook 'post-command-hook
          (lambda ()
            (when my-selected-frame
              (select-frame-set-input-focus my-selected-frame)
              (setq my-selected-frame nil))))

martin







reply via email to

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