From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Perry Smith Newsgroups: gmane.emacs.help Subject: Re: Question: meta key works in terminal but in emacs Date: Sat, 11 Apr 2020 19:34:32 -0500 Message-ID: <85ABA33E-EB67-4A70-A5F6-755960842B2D@easesoftware.com> References: Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="121103"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Zhe Li Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 12 02:35:43 2020 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 1jNQb8-000VNY-S4 for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 12 Apr 2020 02:35:42 +0200 Original-Received: from localhost ([::1]:57604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNQb7-0000DZ-U1 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 11 Apr 2020 20:35:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40534) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNQan-0000Bg-6Y for help-gnu-emacs@gnu.org; Sat, 11 Apr 2020 20:35:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jNQal-0003uf-A6 for help-gnu-emacs@gnu.org; Sat, 11 Apr 2020 20:35:20 -0400 Original-Received: from dragonfly.birch.relay.mailchannels.net ([23.83.209.51]:35863) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jNQak-0003hf-TR for help-gnu-emacs@gnu.org; Sat, 11 Apr 2020 20:35:19 -0400 X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id A6BD3100B63; Sun, 12 Apr 2020 00:34:35 +0000 (UTC) Original-Received: from mi3-ss4.a2hosting.com (100-96-6-13.trex.outbound.svc.cluster.local [100.96.6.13]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id CFB48100D0A; Sun, 12 Apr 2020 00:34:34 +0000 (UTC) X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com Original-Received: from mi3-ss4.a2hosting.com (mi3-ss4.a2hosting.com [68.66.200.199]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.6); Sun, 12 Apr 2020 00:34:35 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com X-MailChannels-Auth-Id: a2hosting X-Obese-Ski: 0d5144e44ace443d_1586651675444_2304049500 X-MC-Loop-Signature: 1586651675444:411462795 X-MC-Ingress-Time: 1586651675444 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=easesoftware.com; s=default; h=References:To:Cc:In-Reply-To:Date:Subject: Mime-Version:Content-Type:Message-Id:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ECL1Dh4B2Ga7Tf4USAX3mlQBMNu2IhtC5p7yZNdeJT4=; b=I22iYpyBzFv08h3uqs6p3bl9H 35wXqOxDQZHWCUVLs0o+ZpNOPeltfcRftNS2mrF2ZzENiqDm8LeYdgm7QR2sMUW38eJmzw9oMghzD f0/KHB6tBQ0OgT5/V6Z3jTuE9SaNw0S/aGvfThg9hkwaLTfyETXz2oO3Mvhnl7VzRH+CbbmC7TF3l G3bS+RgUUubORhxOvcrwVA2g2oDy8wrEUKn4blWox8oAGcZqbNIlNe2m3EbeJ9AbwRgs1kzgLOSk6 uXR7Aw0I+/gtA3RRBBfttUvGJYawXAAR+sFvb4EfM8d7g7FIX/m+O56N2X4fD4P89tT+/0KY1MRuh sBMufUX3w==; Original-Received: from mobile-166-176-123-51.mycingular.net ([166.176.123.51]:51804 helo=macbook-pro.localdomain) by mi3-ss4.a2hosting.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1jNQa1-005xsi-OC; Sat, 11 Apr 2020 20:34:33 -0400 In-Reply-To: X-Mailer: Apple Mail (2.3608.80.23.2.2) X-AuthUser: pedz+easesoftware.com@mi3-ss4.a2hosting.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 23.83.209.51 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.help:122797 Archived-At: > On Apr 11, 2020, at 6:47 PM, Zhe Li wrote: >=20 > Hi there, >=20 > I recently installed emacs-mac-port and spacemacs with brew casket. I = want > to set the option key to meta. I did so on terminal preference and now = the > option key works as meta on terminal. But the option key doesn't work = in > emacs. When I type option+v it comes out as check marks. So the option = key > in emacs is still option/alt key. My system is macOS 10.13. Any idea = why > that is the case? I don=E2=80=99t know those two ports. I use EmacsForMacOS: https://emacsformacosx.com I use to build my own emacs. As I recall, I tried the brew but didn=E2=80= =99t like it but that is just a vague memory. I *think* everything that follows still applies but obviously I=E2=80=99m = not sure. You have three places to muck with things and you kinda have to mess with them to find out what works best for you. First is Apple =3D> System Preferences =3D> Keyboard. Lower right is =E2=80=9Cmodifier keys=E2=80=9D. (But don=E2=80=99t change them yet! = :-). Notice at the top is a pull down for each keyboard that you have. For me, I have my native Mac laptop keyboard as well as a wireless non-Apple keyboard. Second, as you mention, Terminal =3D> Preferences =3D> Keyboard is a checkbox for =E2=80=9CUse Option as Meta key=E2=80=9D. The magic that you might be missing is inside Emacs is a whole set of variables such as ns-control-modifier which has an alias of=20 mac-control-modifier. There are others=E2=80=A6 If you do M-x customize-group =E2=80=9Cns=E2=80=9D you will see the = whole set of them. Note that I am using emacs as a Mac windows client and not inside = Terminal. I much prefer the GUI mode even though I=E2=80=99m not really a GUI = person. One thing I would suggest is to use (in Terminal) `od -cx` =E2=80=A6 = then type some keys such as option+F and hit return and see what the keyboard is = actually sending. The reason I mention the GUI mode is in that mode, emacs is receiving key events and not a sequence of characters. Some options, like the options in Terminal, won=E2=80=99t have any effect on emacs in = GUI mode. My system is at 10.15 but I=E2=80=99m 99% sure all of the things above = were in 10.13. Good luck!