From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andrea Cardaci Newsgroups: gmane.emacs.devel Subject: Re: Zoom: a window management minor mode -- best practices and questions Date: Thu, 10 May 2018 10:11:47 +0000 Message-ID: References: <83muxioten.fsf@gnu.org> <5AEAB616.4040900@gmx.at> <5AF29C9D.4090902@gmx.at> <5AF3E64A.7080508@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1525947003 16877 195.159.176.226 (10 May 2018 10:10:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 10 May 2018 10:10:03 +0000 (UTC) Cc: Eli Zaretskii , Emacs developers To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 10 12:09:59 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fGiWM-0004FD-Ov for ged-emacs-devel@m.gmane.org; Thu, 10 May 2018 12:09:58 +0200 Original-Received: from localhost ([::1]:32882 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGiYR-0005FA-SE for ged-emacs-devel@m.gmane.org; Thu, 10 May 2018 06:12:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52237) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGiYK-0005F4-Pc for emacs-devel@gnu.org; Thu, 10 May 2018 06:12:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGiYK-00027j-1Q for emacs-devel@gnu.org; Thu, 10 May 2018 06:12:00 -0400 Original-Received: from mail-qt0-x22e.google.com ([2607:f8b0:400d:c0d::22e]:33245) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGiYI-000273-Px; Thu, 10 May 2018 06:11:58 -0400 Original-Received: by mail-qt0-x22e.google.com with SMTP id e8-v6so1809244qth.0; Thu, 10 May 2018 03:11:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7Zt3ObWkFdSaUang5hDG5lahB7/bTdQHzfpr7qAjJbo=; b=qh/e6iQg94LwkVjnD2EKTG9WenWGeS6UrcBj0hha4TqmzYqKppjiB8Rm0+QJ2oqO1A xh5qhXfKU39/Rd9FnKHdo6n6eK5rlyHIDGjSbjveLzcL1gwn/Tgw5OgZu8mZEx2vcgEO J0B6Tvr3PpXEKn26NgN3Hrt74T4SKcv9xpEMT/rSTq/9MmB/ARZNhO5WRNh9MvVzffNJ wreakV9WUAZfjNkwv+yATDa12jcISm5gCI1WX0EiLBYxjJNPLlSdj4PILeMAcGQFckSX v5QyRUvLmcUwnxKjLt3wYBziYblwxcQkmQ8igmPHLGfVouVwSl0gF/IglcMbALB6hm2v l4HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7Zt3ObWkFdSaUang5hDG5lahB7/bTdQHzfpr7qAjJbo=; b=eo8a7VfirNWM83REJvXP6r1QMKOtj8JyMzO8bUagXdHZ7iaYXzLkcr+hiRFjfxdm5V R90iVVzhkJ9UuOoyCH0iBFMz1ohKpLmYuizY1VVdYs34Ugg71k3rVKt3c48rehzcmgx3 SxlDdyfXjgfo9glMvdsfwqlTg+wDjzmj/AFoUNaNM9B0jBO7sj0eAmD4GXux3lF7DeL0 L0rD6bQlCES7+96eoetgY+BbEQMuBV//pSZjzn2/6oJSj9XQp+Hbp+5w9uJjOq9ngi2h cRRHdTcrloedRvE58ukaCqg1STDNWfij4WGqlZA1gKTAiknklUcY3dqHyVd53Nhq79kB PcSQ== X-Gm-Message-State: ALKqPwe6Uuz67QEltmaOsQQSEJoHsZ2T28RH/4yLa9vX7r4yFxckWS6B 7rmKzTlbC/jcAN7N4XAPMtpWhL+zhh/IQkcBaZo= X-Google-Smtp-Source: AB8JxZrsVjp0cF8Dqp/fGe0ePNh+4UwWWiLPZ4JegmSi0dF93+7f43R/y0tDz/Kf+NJQ5rVdEtRJNNoAmiSCz6LXrX4= X-Received: by 2002:a0c:bd25:: with SMTP id m37-v6mr572104qvg.209.1525947118120; Thu, 10 May 2018 03:11:58 -0700 (PDT) In-Reply-To: <5AF3E64A.7080508@gmx.at> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::22e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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:225191 Archived-At: > But 'set-window-buffer' calls both 'buffer-list-update-hook' and > 'window-configuration-change-hook' so what are you missing? I hook `pre-redisplay-function` only and perform the update only when the following expression changes: (format "%s%s" (window-list) track-mouse) So any event that causes `pre-redisplay-function` to be called but doesn't change the expression won't trigger the update. If I simply save the selected window/buffer then, for example, a simple window split (`C-x 2`) is not recognized because it does cause a redisplay but it doesn't change the selected window/buffer.