GNU bug report logs - #1681
23.0.60; list-processes - please reset focus to original frame when done

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Tue, 23 Dec 2008 16:50:02 UTC

Severity: normal

Done: "Drew Adams" <drew.adams <at> oracle.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: 1681 <at> debbugs.gnu.org
Cc: Drew Adams <drew.adams <at> oracle.com>
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
> 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





This bug report was last modified 12 years and 291 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.