From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pierre Rouleau Newsgroups: gmane.emacs.help Subject: Re: Does code exist to check if a key sequence is valid for Emacs running in terminal mode? Date: Fri, 12 Jul 2024 11:05:23 -0400 Message-ID: References: Mime-Version: 1.0 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="27011"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs To: Yuri Khan Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 12 17:06:07 2024 Return-path: Envelope-to: geh-help-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 1sSHqZ-0006qP-8f for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 12 Jul 2024 17:06:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sSHqL-000789-BX; Fri, 12 Jul 2024 11:05:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sSHqH-0006tU-6M for help-gnu-emacs@gnu.org; Fri, 12 Jul 2024 11:05:49 -0400 Original-Received: from mail-ot1-x329.google.com ([2607:f8b0:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sSHqD-0000bz-O0 for help-gnu-emacs@gnu.org; Fri, 12 Jul 2024 11:05:48 -0400 Original-Received: by mail-ot1-x329.google.com with SMTP id 46e09a7af769-703775e4d5dso1028729a34.0 for ; Fri, 12 Jul 2024 08:05:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720796734; x=1721401534; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=42uDoFq9dZ/9Vnazn9Nkw7JJiHLiMike6HAeFayCvQM=; b=JFvapc50pCf8NsgRr2GXaIq+mHEovW3kp262a6qLuJi5mM7cIV+2c5xnVmt5qmqnDy R1QIC+/JOLQBScEErb0dBJ8rbKmTptQ/aBr8PU+eMF+t1+y24oWcI5utKAq85XUwSsEP VLySUps2CDVb7tmE8oFUvtocIilPfQpzrys8mmhPn9WaHqXS8N5ixsyKGSqE2GEkpzcJ nVv1pgC2TBLcvNyNcVao210Px75cToOOlCN107C6ONwMij2gZUXCEC/Ll6YrafCW7nKl aR+tCmWF4uw2VSMgSNh06QQiHJUE9+R6JVpeWffaxlD8S8tmXTqhHqgKBrdZPARPC3d/ /fIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720796734; x=1721401534; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=42uDoFq9dZ/9Vnazn9Nkw7JJiHLiMike6HAeFayCvQM=; b=M6C7L+QOYW1Zs8fdu2uMsfcH5DjCd+pFjJSffvXzHYBAwFCRE8HTZzC7shgumKwIOQ ICUbzJA4XkAGssep8ddNh2zY2GNlimWoSEQPX1CVO/rnVJ4XMAlY7t4ED/Qk1EYk8QPb U9BhmNlouOERXwilgwtsqt5yZvgpb3zoFs3vNx8ra6LO8oAD631YqIVhrUv0Pk6IFOn8 BrdGNvOFI/RVViJosCkiS6R4WhHMg5dFUOVP7zzJKSB0sBHDOj2A7bz6PZLVUGOdfcm4 Uu/Y4GPZ5koWeVG88QSYdJw07/KwMbAB9t1H/S/92a48Z/FfjUOuD6Fa6ydPqpMyLFqw i1Pw== X-Gm-Message-State: AOJu0YxaXpTMzZTcAwlcEc+NOZIuQDv/8G0M/A+/yA4m6BhqxM3RmqI/ M8olEiBBvD53tFhMNU27h+6pdyLIACfU3sd0fYTcJymRr6OoQdPCwnc1XLMN+WI7krcG13LWdzC wfR+8SAJvf3fl0ssG6L8iu+BBTWUSWQ== X-Google-Smtp-Source: AGHT+IFNdK26EwDK0/CwbsEazSk/jcksbC2BhshGZeBL6IdMm9dOlINDkjOMrpb4VrQ1ij5ACEfbF7F2SB+8oGbs3UY= X-Received: by 2002:a9d:6d02:0:b0:704:46da:5fa0 with SMTP id 46e09a7af769-70446da61e8mr10225243a34.10.1720796733903; Fri, 12 Jul 2024 08:05:33 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::329; envelope-from=prouleau001@gmail.com; helo=mail-ot1-x329.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147172 Archived-At: On Fri, Jul 12, 2024 at 10:58=E2=80=AFAM Yuri Khan = wrote: > On Fri, 12 Jul 2024 at 21:41, Pierre Rouleau > wrote: > > > The code can determine if Emacs is running a GUI mode or in a terminal > mode. > > In GUI mode it would assume that everything is possible. > > In terminal mode the issue is being able to distinguish > > whether the key sequence can be bound or not. > > Even that is in general not solvable. Given an Emacs daemon, you can > connect to it with a GUI client and a terminal-based client, and they > will coexist peacefully. > That's true. However, on macOS I found the only way I could run a daemon that would allow me to connect both GUI and terminal clients was to start a daemon from code that was built with GUI capability. And in my use case what I'm trying to do is to prevent generating run time warning messages saying there's a clash of global key bindings between 2 (or more) packages, when (possibly client) Emacs process executes something during initialisation. /Pierre