From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: tomas@tuxteam.de Newsgroups: gmane.emacs.devel Subject: Re: xterm [menu] key definition Date: Wed, 25 Aug 2021 09:06:40 +0200 Message-ID: <20210825070640.GB11313@tuxteam.de> References: <20210819024728.kgnf6jmpakqdto4p.ref@Ergus> <20210819024728.kgnf6jmpakqdto4p@Ergus> <87mtp71i4s.fsf@mail.linkov.net> <20210824081906.lg2qt4z2snhaxnjv@Ergus> <20210824083433.GC17209@tuxteam.de> <20210824091741.heeyge3xhufujkd7@Ergus> <20210824110014.GA28734@tuxteam.de> <20210824153003.d5oakoawkqwke2yb@Ergus> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Pd0ReVV5GZGQvF3a" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40109"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/1.5.21 (2010-09-15) Cc: emacs-devel@gnu.org To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 25 09:08:06 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mIn13-000AFe-2C for ged-emacs-devel@m.gmane-mx.org; Wed, 25 Aug 2021 09:08:05 +0200 Original-Received: from localhost ([::1]:37478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mIn12-0008Up-4G for ged-emacs-devel@m.gmane-mx.org; Wed, 25 Aug 2021 03:08:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55302) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mImzm-0005vR-PJ for emacs-devel@gnu.org; Wed, 25 Aug 2021 03:06:47 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:39950) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.90_1) (envelope-from ) id 1mImzk-0004Tj-AO for emacs-devel@gnu.org; Wed, 25 Aug 2021 03:06:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=Y4x9hh4CfeE20hoIIXCc9+zSLvH2Wni+McDg/vZhlAw=; b=LxJpP/xfic36KZO92pdVMPepwqSJlho9KBiLPozZDzIlCkjM7iaIHW8sFSPzSXDQZjUtwooZj1H8SR+dyXNqJD4P2rrtxUUvscSzlS8lNl15+6F+LZudqlb5l0ud0HJDIDJIDfFFBATKyPRYJ1WM4bDU4kMzi38w1f0PdfjXUTkttoK0fm/hrTpb/LakkE0BjfyNYypvxCmIjKbXNXcoufjz5txoCK9k0/gC8TZWygw872ywoB1VHiS0rMMGBnTDeg4KdIIdnuqlT1vNKtveLgLPcZ0MTZKdN1ILy4DrBrgBNi9w2Q//EOOm4ZE7ioGFxlc8XeRQJHbnTVLFqRm03Q==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1mImzg-0003TI-RZ; Wed, 25 Aug 2021 09:06:40 +0200 Content-Disposition: inline In-Reply-To: <20210824153003.d5oakoawkqwke2yb@Ergus> Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:272943 Archived-At: --Pd0ReVV5GZGQvF3a Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 24, 2021 at 05:30:03PM +0200, Ergus wrote: [...] > Hi! >=20 > Thanks for the link! Of course we can emulate anything in xterm. The > question is what xterm does by default? and why we bound the menu > sequence to [print] instead of [menu] if emacs internally uses [menu] > for execute-extended-command? [...] > If xterm assumes it is a VT220; then we must assume the same when using > it by default (until we implement a more complex API to ask > xterm... (but that may be inefficient and probably don't worth it for > such a detail). I wouldn't expect an "xterm API". The "API" are the escape sequences :) The best one can do, I guess, is try to convince each one of the pseudo terminal implementors to use the same escape sequence for each of the non-standard keys. Perhaps there already /are/ ANSI (or some other standards body!) escape sequences. Perhaps not. > Sometimes emacs assumes there is a [menu] key but then in xterm the same > key is interpreted as [print] by emacs. So a very comfortable key (for > those who have it) that we can't use consistently. When you say "emacs assumes" you are referring to some "GUI guts"? > Part of my intention is to minimize the "special" customization required > when using xterm+emacs (either in Xdefaults or in init.el); any fancy > more specific customization can be made latter by the user when he gets > familiar with the rest of the environment (GNU/Linux, xterm, emacs, > Elisp, the command line interface, the OS configuration system...) for > new users it is like getting into Narnia the fist week/month. The lowest common denominator would be to assume that there is no "print" (aka PrintSc) key, same for "menu", more so for "windows". > I expect that most of the emacs features work and behave as similar as > possible when using the xterm, tty or gui without customization, > everything out of the box. That's because you have only seen one keyboard [2] :) BTW, just out of kicks, I tried the same experiment with the Linux terminal (no need for the cat, just hexdump will do, btw), and it also doesn't translate "print" into any escape sequence. So this isn't limited to X terminal emulators. If you want consistency across the terminal emulators *and* you want print (and/or menu...) *and* you want it out of the box, you better start sending config [1] patches to all the term emulators out there :-) Cheers [1] https://en.wikipedia.org/wiki/ANSI_escape_code [2] not meant personally: we are just witnessing a curious "inversion". At the time those terminal emulators were designed, there was a *huge* variety of keyboards and few emulators, these days it's the other way around. PC has won, and if Microsoft says "we wanna have one key, because Apple also haz one", then everyone has a Windows key. Actually they got two, because Apple had two). [3] if the implementors were as wise as xterm's and put those tidbits into some config, that is - t --Pd0ReVV5GZGQvF3a Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAmEl7AAACgkQBcgs9XrR2kZRiwCeOzNt33F0gIc0xow1TTUnKqxk HaoAmQHG8jcQYnyXjqMetN+L6hdypKzm =GM59 -----END PGP SIGNATURE----- --Pd0ReVV5GZGQvF3a--