From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.bugs Subject: bug#6468: A couple of problem related to frame raising (partly w32) Date: Sun, 20 Jun 2010 14:21:25 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: dough.gmane.org 1277036944 11457 80.91.229.12 (20 Jun 2010 12:29:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 20 Jun 2010 12:29:04 +0000 (UTC) Cc: 6468@debbugs.gnu.org To: Juanma Barranquero Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 20 14:29:02 2010 connect(): No such file or directory Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OQJe0-0000Dd-R9 for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Jun 2010 14:29:01 +0200 Original-Received: from localhost ([127.0.0.1]:49863 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OQJdz-0001xC-S4 for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Jun 2010 08:28:59 -0400 Original-Received: from [140.186.70.92] (port=45409 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OQJdr-0001uq-KE for bug-gnu-emacs@gnu.org; Sun, 20 Jun 2010 08:28:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OQJdq-0008TW-Bb for bug-gnu-emacs@gnu.org; Sun, 20 Jun 2010 08:28:51 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50443) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OQJdq-0008TP-8f for bug-gnu-emacs@gnu.org; Sun, 20 Jun 2010 08:28:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OQJXG-0001KR-Br; Sun, 20 Jun 2010 08:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lennart Borgman Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Jun 2010 12:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6468 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6468-submit@debbugs.gnu.org id=B6468.12770365135100 (code B ref 6468); Sun, 20 Jun 2010 12:22:02 +0000 Original-Received: (at 6468) by debbugs.gnu.org; 20 Jun 2010 12:21:53 +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 1OQJX6-0001KD-9a for submit@debbugs.gnu.org; Sun, 20 Jun 2010 08:21:52 -0400 Original-Received: from mail-yw0-f172.google.com ([209.85.211.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OQJX4-0001K8-VM for 6468@debbugs.gnu.org; Sun, 20 Jun 2010 08:21:51 -0400 Original-Received: by ywh2 with SMTP id 2so2612864ywh.0 for <6468@debbugs.gnu.org>; Sun, 20 Jun 2010 05:21:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=McJ5yh3T9whj4g/brzfG5b5DzywVtBi07exclVVJEf4=; b=sIBScIz22FpBuI98YajwVA5Liy5lbgPCsXbDagRnRK43v9EU7mSyppL2RzDmWRpLqc VzEzlHBaRVmqzVdT3T+qtHUVwGe47EYLKmGa9T4Vqni3UbeBgzmMes4VoKAcmJZ6gR8H N8Yj6of2c0vqgvNRC/GDR29kbKrX7xJTUiahs= 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; b=c1Jh9zBWhmWjUWr1g6yhsrNDPNV+qRtefJ0Ayr86zITyhPZU21wMKeUS+ZeSs5kZ+u ZuuFQtHOb7qb6cxDuHKR3qFd8lxn8UAALZLvGrwBdG0ZRoyPfAbvRckeJSA8GI31168O xX0M1ZmO3l4rryem07pZV8tJTjCytXFBIiwJg= Original-Received: by 10.100.244.32 with SMTP id r32mr2761941anh.28.1277036505167; Sun, 20 Jun 2010 05:21:45 -0700 (PDT) Original-Received: by 10.100.154.15 with HTTP; Sun, 20 Jun 2010 05:21:25 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 20 Jun 2010 08:22:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:37903 Archived-At: On Sun, Jun 20, 2010 at 3:07 AM, Lennart Borgman wrote: >> >> Are you sure this isn't just Windows trying to keep Emacs from >> stealing the focus? You know, AllowSetForegroundWindow and that stuff. >> I've sometimes seen emacsclient call Emacs from a console (4NT) and >> Emacs not getting the focus because 4NT (and so emacsclient) just >> happened to lose the focus before calling AllowSetForegroundWindow. > > > No, I am not sure. And since the frame seems to be in a strange state > I am even more unsure. "Was there some bad system call that made the > OS upset so it refuses to do this?" > > I have seen such problem when dealing with low level functions. It can > be very frustrating. Maybe a lot of those bugs in Windows that led to > bad recovery now have been cured. I have know idea and it can really > take a long time to find out. > > I thought first when you mention AllowSetForegroundWindow "ah, that is > Firefox that does not give emacsclient this so it can't give it to > Emacs". But that can not be the case since if I server-raise-frame is > non-nil then Emacs comes to the foreground (but the whole of it, not > just the frame I want). > > And then I have been looking at which threads was involved. At least > it looks like the same threads. But maybe still there is an issue with > the threads that I do not understand. Perhaps only one thread has this > privelege and it is not given to the other? There is no transferring > of it in Emacs AFAICS. It happened again that it worked. Ah, fine, I thought and removed what I commented out. Then it stopped working. Any thoughts about what could be behind why Emacs behaves this way? What do you think we should do? My own guess is that there are some bad system calls in Emacs somewhere that causes Emacs to fail. But I am not sure where. From my own experiences I know that they do not have to be around the calls to SetForegroundWindow at all. Since both you and Eli thinks that it is a bad idea to check more system calls I would be glad for a suggestion what to do instead.