From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Jonas Bernoulli Newsgroups: gmane.emacs.devel Subject: Re: Let mode-line packages distinguish the selected-window Date: Sun, 27 Oct 2019 19:08:41 +0100 Message-ID: <87ftjerrh2.fsf@bernoul.li> References: <87blu3pqyc.fsf@bernoul.li> <877e4r5mu6.fsf@bernoul.li> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="37633"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: mu4e 1.1.0; emacs 27.0.50 Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 27 19:10:59 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iOn0E-0009e8-Ir for ged-emacs-devel@m.gmane.org; Sun, 27 Oct 2019 19:10:58 +0100 Original-Received: from localhost ([::1]:46428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOn0C-0001fj-09 for ged-emacs-devel@m.gmane.org; Sun, 27 Oct 2019 14:10:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33620) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOmy7-0001Yl-5M for emacs-devel@gnu.org; Sun, 27 Oct 2019 14:08:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOmy6-0001oP-4w for emacs-devel@gnu.org; Sun, 27 Oct 2019 14:08:46 -0400 Original-Received: from mail.hostpark.net ([212.243.197.30]:47954) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOmy5-0001mg-VM for emacs-devel@gnu.org; Sun, 27 Oct 2019 14:08:46 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id 9D17D165DD; Sun, 27 Oct 2019 19:08:41 +0100 (CET) X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Original-Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail0.hostpark.net [127.0.0.1]) (amavisd-new, port 10124) with ESMTP id LaOGjWpQXTLt; Sun, 27 Oct 2019 19:08:41 +0100 (CET) Original-Received: from p2 (212-51-149-230.fiber7.init7.net [212.51.149.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPSA id 2EA0616109; Sun, 27 Oct 2019 19:08:41 +0100 (CET) In-reply-to: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 212.243.197.30 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:241523 Archived-At: Stefan Monnier writes: >> That's very promising indeed. The minibuffer window needs to be handled >> a bit differently, I think: >> >> (defun moody--set-active-window (_) >> (let ((win (selected-window))) >> (unless (minibuffer-window-active-p win) >> (setq moody--active-window win)))) >> >> (add-hook 'pre-redisplay-functions #'moody--set-active-window) > > I don't understand what this is about. From this all I can see is that > moody--active-window will always be nil, so it's clearly not quite > right ;-) You are mistaken. moody--active-window is NEVER set to nil.