From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#8885: 24.0.50; Temporary failure with `select-frame-by-name' on Windows Date: Fri, 17 Jun 2011 23:57:03 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1308347919 14070 80.91.229.12 (17 Jun 2011 21:58:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 17 Jun 2011 21:58:39 +0000 (UTC) Cc: 8885@debbugs.gnu.org To: nyc4bos@aol.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 17 23:58:34 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QXh3h-000129-MY for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Jun 2011 23:58:33 +0200 Original-Received: from localhost ([::1]:34874 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXh3g-00069U-QR for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Jun 2011 17:58:32 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:53910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXh3I-00066D-7T for bug-gnu-emacs@gnu.org; Fri, 17 Jun 2011 17:58:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QXh3D-0004c8-Ed for bug-gnu-emacs@gnu.org; Fri, 17 Jun 2011 17:58:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41914) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXh3D-0004c0-7b for bug-gnu-emacs@gnu.org; Fri, 17 Jun 2011 17:58:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QXh3C-00015p-7P; Fri, 17 Jun 2011 17:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Jun 2011 21:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8885-submit@debbugs.gnu.org id=B8885.13083478714185 (code B ref 8885); Fri, 17 Jun 2011 21:58:02 +0000 Original-Received: (at 8885) by debbugs.gnu.org; 17 Jun 2011 21:57:51 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QXh31-00015R-3P for submit@debbugs.gnu.org; Fri, 17 Jun 2011 17:57:51 -0400 Original-Received: from mail-pv0-f172.google.com ([74.125.83.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QXh2z-00015F-CU for 8885@debbugs.gnu.org; Fri, 17 Jun 2011 17:57:50 -0400 Original-Received: by pvh18 with SMTP id 18so2221141pvh.3 for <8885@debbugs.gnu.org>; Fri, 17 Jun 2011 14:57:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=cPk7ZIrhfX0tsThe5X10dlQ3ABGPTuWOZFWi/UN7y6c=; b=GkIxyF0Hp60gMfL93FZ3GxkFhWmG1sp2BYklzjaxYQ6DH0PrcFuZAXO8PXAf84yQjN ImABmsDpddkmgQZ5rSRzvX8+Sor97m6C6KiesALYEKjUA0wY2KuuCJhp+AgAxDYCDP5g FRNsTRw3PY4PluM5VxrRcTy6QWiRk7c/y7z2s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=hRYpMU/6bu4gvXiazXp6U9PW2IJIg8WI7Vopb29ZX6UDD+ZnTzWxZg946A5pqnJqlW F474dRMjZ6ujyp8Mw499otKAZO0Fdna4oW4CEmGsvgl+qlbRVieUIb1FF3BngagrUvE6 48w5LoxdWoIDgNpxzmKbW/iLsCUm6KKf7FuWE= Original-Received: by 10.142.166.19 with SMTP id o19mr411799wfe.436.1308347863163; Fri, 17 Jun 2011 14:57:43 -0700 (PDT) Original-Received: by 10.142.134.11 with HTTP; Fri, 17 Jun 2011 14:57:03 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 17 Jun 2011 17:58:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:47277 Archived-At: > 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. =C2=A0 =C2=A0 Juanma