From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daphne Preston-Kendal Newsgroups: gmane.emacs.bugs Subject: bug#47291: [PATCH] Auto-detect ns-appearance of frames and call a hook when it changes Date: Fri, 8 Oct 2021 10:24:16 +0200 Message-ID: <32D4CA88-145B-4519-A372-3E8B56A36441@nonceword.org> References: <1B39376A-B108-41FD-87EE-52D68E8F7256@nonceword.org> <87blb9hhiw.fsf@rfc20.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13996"; mail-complaints-to="usenet@ciao.gmane.io" To: 47291@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 08 10:25:17 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mYlBt-0003PT-6k for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 08 Oct 2021 10:25:17 +0200 Original-Received: from localhost ([::1]:59692 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYlBr-0000U0-8F for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 08 Oct 2021 04:25:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYlBe-0000SO-9K for bug-gnu-emacs@gnu.org; Fri, 08 Oct 2021 04:25:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37499) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYlBe-0000gV-1x for bug-gnu-emacs@gnu.org; Fri, 08 Oct 2021 04:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mYlBd-0008IZ-UK for bug-gnu-emacs@gnu.org; Fri, 08 Oct 2021 04:25:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daphne Preston-Kendal Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Oct 2021 08:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47291 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 47291-submit@debbugs.gnu.org id=B47291.163368146531850 (code B ref 47291); Fri, 08 Oct 2021 08:25:01 +0000 Original-Received: (at 47291) by debbugs.gnu.org; 8 Oct 2021 08:24:25 +0000 Original-Received: from localhost ([127.0.0.1]:49045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYlB3-0008He-Lt for submit@debbugs.gnu.org; Fri, 08 Oct 2021 04:24:25 -0400 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:47911) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYlB2-0008HR-KP for 47291@debbugs.gnu.org; Fri, 08 Oct 2021 04:24:25 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 223A05C00E0 for <47291@debbugs.gnu.org>; Fri, 8 Oct 2021 04:24:19 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 08 Oct 2021 04:24:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=yEVkF1p6ONd4XXu31tUjkNxKtcFya5CNAvBr2DDNa h0=; b=XVhESKL0Mi/HtDmp1zToNBWihWqVgCxCWcZbtb+Nxded/y9IXrJNK7cEg OK+HwFF5MNu8rzFj/PJrCtT2ZFUPeE6DNmhFRSD2InGH3htpZujsQb+AER9wgUpw LEiB0+EKsbf8MqNFiaHGERiaQXJgCyM5V2kzV4R/RDb9JPLPq2Vd7WquPB9krZpx KP1Q9drc0w83H0auA5I28ISEBRHjZBvFtGiUcIRvFIXG+c5Zur3tUpuNITX6vUwj mRHYrouUe66/OS3LAIeKVepLmFQ6GC0SYfAh/78i9NE18YwiiD4zgsR3B+nznz7E Q2jcDWawrk4tmT58nEpeQnAuA5Zeg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddttddgtddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhtgfgggfuffhfvfgjkffosehtqh hmtdhhtdejnecuhfhrohhmpeffrghphhhnvgcurfhrvghsthhonhdqmfgvnhgurghluceo ughpkhesnhhonhgtvgifohhrugdrohhrgheqnecuggftrfgrthhtvghrnhephfetueektd fgveefhedvheekhfdtffeiieeugfefueevtdeljeduueevgeetheegnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughpkhesnhhonhgtvgifoh hrugdrohhrgh X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA for <47291@debbugs.gnu.org>; Fri, 8 Oct 2021 04:24:18 -0400 (EDT) In-Reply-To: X-Mailer: Apple Mail (2.3654.120.0.1.13) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:216697 Archived-At: On 18 May 2021, at 20:03, Daphne Preston-Kendal = wrote: > Is it possible to do that within the framework of what dynamic-setting > provides? Sorry if this is obvious, I=E2=80=99m just not familiar with = this > bit of Emacs. Since there have been no answers since May, I=E2=80=99d like to suggest/ request that my patch be merged in more or less as it is. If there is an OS-portable mechanism for detecting light/dark switches somewhere in a Lisp library, like dynamic-setting.el, then the patch I provide here can still work as the underlying C implementation, and we can bridge them together at the Lisp level later. An analogy for this approach would be how the Lisp-level interprogram-{cut,paste}-function settings bridge to underlying ns-get-selection and ns-own-selection functions on Mac OS, but to other things on free OSes. I=E2=80=99d really like to see this in Emacs 28 if possible! Daphne