reddit / emacs

Brew installed eMacs on Mac, meta refuses to work.

New-Yogurt-61 · 2022-11-10 22:20
M-x just comes out as an “approximately equal” sign (when using option). Command-x does nothing. (Can’t even quit :() Anyone have a clue what’s going on or how to fix? A non-home brew eMacs bin I installed worked fine fwiw. Thanks so much for any help. It’s always the onion of learning issues when coming back to it. UPDATE: I did an install with —cask so I could try running it outside the terminal. And that FIXED it. So it is indeed something with the term as some suggested, but the meta checkbox didn’t fix it. I’m very happy right now, although I’m sure soon enough I’ll be complaining about how to get windows opening where I want, etc. thanks!
disavowed10 · 2022-11-10 22:57
I wonder if it’s anything to do with the Terminal setting for using the option key as meta? It’s a check mark in preferences somewhere (not at laptop rn).
New-Yogurt-61 · 2022-11-10 23:00
Hmmm. Intrigued. If you can point me to the right spot when you’re at your laptop that would be great.
0x1337C0D3 · 2022-11-10 23:22
You can usually emulate meta by pressing the escape key. Apple uses option as a modifier to type symbols and diacritics. There may be some way to disable that in your keyboard settings.
New-Yogurt-61 · 2022-11-10 23:41
I’ve tried my laptop keyboard and programmable board. Also the Mac installer non-home brew eMacs doesn’t have this issue. So it seems either build or config related. (Or runtime options).
fixedfree · 2022-11-10 23:49
My go to: ‘brew install --cask emacs’
AngryFilament · 2022-11-10 23:57
Try emacs mac port - https://github.com/railwaycat/homebrew-emacsmacport/releases
graduale · 2022-11-11 00:23
Check the values of `ns-command-modifier`, `ns-control-modifier`, and `ns-option-modifier`?
CJ6_ · 2022-11-11 00:26
Terminal > Settings > Keyboard > Use Option as Meta key
New-Yogurt-61 · 2022-11-11 01:15
Thanks. Found it, was excited, but sadly no difference.
New-Yogurt-61 · 2022-11-11 01:17
Was excited but then saw “Apple Silicon build no longer available for Big Sur and earlier (Because only Monterey and newer supports virtual machine on Apple Silicon)”. I’m on a Big Sur MacBook Air m1.
tapesales · 2022-11-11 01:34
Hey, I ran into this issue recently. It's inserting stupid symbols right? I think there is a bug where if you plug in some external keyboards the meta keys get messed up (left and right are switched, or something like that). Here's how I fixed it, with added redundancy since I couldnt be bothered figuring out which port-specific commands I should use: (setq mac-command-modifier 'super ns-command-modifier 'super mac-option-modifier 'meta ns-option-modifier 'meta mac-right-option-modifier 'meta ns-right-option-modifier 'meta) I use emacs-mac-app from MacPorts, which is emacs-mac by Mituharu. Hope this works for you. Was a pain in the arse to figure out what was going on.
tapesales · 2022-11-11 01:36
Try the macports version, I've found it to be more stable: https://ports.macports.org/port/emacs-mac-app/
Psionikus · 2022-11-11 03:28
Not the fastest solution, but the one that will make your life significantly better on Mac, install Nix. Use home manager to obtain binaries in your home environment. Use the emacs-overlay for obtaining Emacs. The other package management solutions on Mac are both not that great and will add nothing to your career. My suggestion may sound callous, but it is by far the lower pain path for obtaining and maintaining software on this Mac and your next.
AngryFilament · 2022-11-11 03:30
Alas! I am running Monterey, so I completely forgot about the OS requirement. Fwiw I found the mac port does indeed solve most of the QoL issues I was having with vanilla - something to look forward to if or when you choose to upgrade.
tapesales · 2022-11-11 09:29
Interesting. How is the package selection compared to MacPorts or brew?
New-Yogurt-61 · 2022-11-11 16:19
Intrigued, but this description went a bit over my head. Have a link for a more newbie setup process? If there is a nice way to run a Unix flavor on the side please let me know. I plan to install WSL on windows for the windows side of this setup, but wanted my Mac working first (more important).
Psionikus · 2022-11-12 10:30
For Nix, the default installation on Darwin should be straightforward. Afterwards, you can run commands like `nix shell nixpkgs#cowsay` and magically you get a shell with cowsay in it. Very handy for obtaining a temporary Emacs for instance. With Nix installed on Mac, you will have access to a huge number of packages, more than any non-Nix distro of Linux. The way it works on Mac is extremely similar to NixOS, so it fits the "Unix flavor" description pretty well regardless of how you mean that. Second, you want to do the home manager installation, again following the most basic setup you can get up and running with. Definitely use flakes if the instructions say one way or another. It's a way better life. Third, go follow Emacs overlay instructions to add Emacs to your home manager. It's easy after you get this going to switch versions of Emacs or run multiple alongside each other. Finally, you can take some cues for setting up vterm etc by looking at [posimacs](https://github.com/positron-solutions/posimacs). Ignore the elisp. Just grab the Nix expressions one by one that look interesting. **Nix is an investment.** It's yet another expression language, completely dedicated to declaring packages. There are lots of crash courses and tutorials. It's kind of like elisp, but pure and lazy. The lazy part makes the most difference because the expressions can look like infinite recursion while just thunking away at evaluation time and yielding a result. Definitely the kind of journey you want to manage in org mode to avoid bitrot while starting out.
Psionikus · 2022-11-12 10:32
https://search.nixos.org/packages Over 80,000 they say now. I think that number is absurd. In any case, when I find software that doesn't exist, it's fast to package it myself, and I don't need to wait on upstream. Instead of being off on an island where you're only working with other Mac users, you can live in a shared ecosystem with some of the best devops people on Earth. Nix tends to react faster and better to upsets in the Mac system behavior because it's easy for an expression to modify all dependents instead of maintainers going through package by package.