GNU bug report logs - #8885
24.0.50; Temporary failure with `select-frame-by-name' on Windows

Previous Next

Packages: emacs, w32;

Reported by: nyc4bos <at> aol.com

Date: Fri, 17 Jun 2011 18:23:02 UTC

Severity: minor

Merged with 7658

Found in version 24.0.50

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juanma Barranquero <lekktu <at> gmail.com>
To: nyc4bos <at> aol.com
Cc: 8885 <at> debbugs.gnu.org
Subject: bug#8885: 24.0.50; Temporary failure with `select-frame-by-name' on Windows
Date: Fri, 17 Jun 2011 23:57:03 +0200
> AllowSetForegroundWindow failed with w32 error 5: Access is denied.
>
> This error appears to occur when Emacs is "busy" (for example when in the
> middle of loading a large .el file, etc) and executing the emacsclient
> `--eval' command from a Windows command prompt.

I cannot reproduce it, and currently the return value of
AllowSetForegroundWindow is not checked.

But, according to
http://msdn.microsoft.com/en-us/library/ms632668(VS.85).aspx the
function will fail if the calling process cannot set the foreground
window.

So it's possible that you're invoking emacsclient at at moment when
it's unable to set the foreground window, for example if the
foreground lock timeout has not expired.

All in all, trying to make emacsclient give focus to emacs is never
going to be 100% reliable.

    Juanma




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

Previous Next


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