reddit / emacs

Why does Emacs have so poor integration on macOS?

Dry_Bunch5867 · 2022-05-12 08:09
For example, I can't see Emacs when alt-tabbing between apps. That is not present on Windows for example. Although on some Linux DEs, e.g. Plasma there is the [pixelated-logo bug](https://bugs.kde.org/show_bug.cgi?id=351055) when alt-tabbing. Also there are some weird graphics glitches from time to time in Emacs that I never experienced on Linux. On macOS I see them all the time. One of them is like Emacs stutters the rendering and than flashes and then it is back. And I am on M1 processor - no other commonly used application has this problem. Also, the file permission problems arise when using HELM, etc. Is there really so few people using Emacs on macOS? Do most of them just use Vim with plugins to achieve what Emacs offer and that is why there is not enough push to solve these issues in the source code of Emacs? Or I do miss something else?
7890yuiop · 2022-05-12 08:16
Which of the MacOS builds of Emacs are you using?
MhvxvLvJrg · 2022-05-12 08:19
Try https://github.com/jimeh/emacs-builds
Dry_Bunch5867 · 2022-05-12 08:24
Version 27.2.50 (9.0) via Homebrew: ➜ ~ brew info emacs-plus@27 >d12frosted/emacs-plus/emacs-plus@27: stable 27.2, HEAD /opt/homebrew/Cellar/emacs-plus@27/HEAD-d7f4cc0 (4,009 files, 110.4MB) \* Built from source on 2022-02-21 at 20:33:46 From: https://github.com/d12frosted/homebrew-emacs-plus/blob/HEAD/Formula/emacs-plus@27.rb
Similar35P · 2022-05-12 08:33
Try emacs-mac, it works perfectly on my m1.
blue1_ · 2022-05-12 08:34
Been using emacs on MacOS for ages (still on Intel, though). Never had any problem. Using https://emacsformacosx.com/
mmiri-ifuru · 2022-05-12 08:34
I find it amazing that anything has any integration with macOS. It's a closed OS which actively discourages opensource development unless apple are paid a commission.
wakatara · 2022-05-12 08:55
I am not sure that's entirely fair. While I'm not a fan of how osx continues to tie up and knit it's ecosystem in a tighter and tighter walled garden (admittedly with spectacular integration), let's face it... emacs is trying to be an operating system of its own much of the time... =p I think the problem is emacs needs a project much like neovim where it gets updated for the modern era. I know that sounds hertically, but I am surprised at how much more neocvim has made vim great simply by aggressively refactoring and integrating Lua as a first class citizen. (for example, would we really use eLisp if we didn't have to?... =\] ). (btw, for the OP, I use the d12frosted 29 something on my machine and most of the integration is fine. The bigger issues on how to get emacs itself to integrate with the other things in the OS. Other apps do not have this problem. This is on emacs in my opinion... much as I love it...).
jimehgeek · 2022-05-12 08:56
The screen flickering stuff was a known bug with Emacs 27.x, and I had it myself every now and then. Emacs missing from the app switcher however is a bit less common, but possible with some builds when launching via Finder/Spotlight/Dock. However I don’t think this is normally an issue with emacs-plus builds. I’d suggest you try running `/Applications/Emacs.app/Contents/MacOS/Emacs` in a terminal, it might give you a running instance that behaves correctly. Overall though for a solution to your issues, I would suggest you try installing a fresh Emacs 28.x or 29.x version from emacs-plus. The project is well maintained, so when in doubt it’s always a good idea to get yourself a fresh build. If you still encounter the issue, do browse emacs-plus' issues on GitHub, and open an issue if needed. They’re generally very responsive :)
wakatara · 2022-05-12 09:00
I believe Stallman has commented on how much of a rewrite effort it would be to even have emacs properly support Wayland of of XWindows. I'd suggest emacs needs an initiative like neovim which I feel has really revitalized vim's usage and usability (I'm impressed tbh.). Good question though... would emacs be anything without the lisp ecosystem of packages that surrounds it? In other words, are we all just really using it as a conduit for the ecosystem or does it have merit on its own?
jimehgeek · 2022-05-12 09:03
I’m the author of the emacs-builds project linked above. Unfortunately I don’t have M1 builds available right now due to GitHub Actions not having Apple Silicon based runners available yet. But the Intel builds I do offer should still run fine on a M1 machine under Rosetta2. Alternatively, the build script is linked to from the readme, and that works on M1 machines from what I’ve been told. Though it seems due to it bundling things into a self-contained app, it can’t be run without signing the app via a paid Apple Developer account. Hence I tend to point people towards emacs-plus if they want a native M1 build that’s compiled on their machine.
akho_ · 2022-05-12 09:04
Let me put my hardcore free software advocate hat on. No, it's not on Emacs. It's entirely on you, for using and advocating the use of a non-free OS. You are absolutely free to start a fork updating Emacs for the “modern era”; I suggest you consult with Apple first — they may have other priorities and would profit more from your free labor elsewhere.
flexibeast · 2022-05-12 09:16
> for example, would we really use eLisp if we didn't have to? Well .... *i* would, even though i think Lua is a great language, and would be happily use it if i had to.
Dry_Bunch5867 · 2022-05-12 09:36
I question that myself too. Because I use evil mode and not the original keybindings. I quite like the org mode, but it's not something I have to have, e.g. Obsidian or Joplin with Vi mode on are both a nice replacement for 99% of things I do in Org mode. Emacs is nice for it's text manipulation capabilities but personally I don't do those much. Most of the time I am just writing some simple things or browsing web or programming in VS Code of Goland. Emacs as an IDE is far inferior to VS Code or Goland, for example.
oantolin · 2022-05-12 09:46
People focus too much on superficial annoying quirks of Emacs Lisp and underestimate how featureful it is. Lua is nice language but it lacks some important features of Emacs Lisp that are key to its use as an extension language for an editor: dynamically scoped variables, the advice system, buffer local variables (more specifically, the ability to make any variable buffer local whether the person who declared the variable wanted it to be buffer local or not) and `interactive` (the ability to concisely say "here is how you call this function from code and here is how the user experiences it as a command"). It might be relatively easy to add equivalent features to Lua but equivalents might not be as syntactically convenient. Macros are also great. I wouldnt consider them necessary for an extension language, but they sure do reduce boilerplate. Lua "has" these: you can use Fennel instead. :P Also unnecessary but very nice: Emacs Lisp is expression-based (again Fennel fixes this lack in Lua).
worthless-trash · 2022-05-12 09:51
I think you've made up your mind ! You dont need emacs, use something that suits your needs.
phatrogue · 2022-05-12 10:34
I have been using https://aquamacs.org for several years and am happy with it. I usually use the default Emacs packages on my Linux machines.
SlowValue · 2022-05-12 10:48
> would we really use eLisp if we didn't have to? yes, many of us would use it. Because it is, while not perfect, an amazing language, which suits its area of application really well and better than most other languages.
wakatara · 2022-05-12 11:01
Strangely, I'm the opposite. I use org-mode and org-roam and org-super-agenda in very extensible ways, but do not use it as an IDE vs VS Code and, well... neovim now that lua has made it a pretty spectacular IDE (in fact, it's stealing idea from emacs like a very similar magit plugin). Also, I use it for things like the ledger mode (which has integrated reports and basically runs all my accounting), literate-calc-mode, and since I'm trying to be a little less "org-mode", the excellent taskpaper mode these days. Org-journal as well and the integrated gpg support.
wakatara · 2022-05-12 11:02
I use emacs-plus@29 and do not have any of the problems you seem to be indicating you had (besides the lack of integration with the OS).
InternalImpact2 · 2022-05-12 11:38
Emacs needs to go back to lisp, abandon de swiss army knife mindset, and being then the most popular sw using lisp, push the cart to maintain the GUI part of the lisp ecosystem, that is not dead, but needs help
phanboy4 · 2022-05-12 12:45
macOS is a closed-source operating system and platform. Emacs/FSF has a longstanding policy around treating nonfree operating systems as explicit second class citizens, to drive people who like emacs to free operating systems like Linux. There are people who maintain emacs-mac patches but they aren't allowed to e.g. merge or implement functionality that is macOS specific unless Linux or free OSes have that feature too.
MhvxvLvJrg · 2022-05-12 13:48
Too bad that they don’t provide native compiled builds. I’ve tried and ‘eln-cashe’ dir is not created.
FrozenOnPluto · 2022-05-12 14:05
Update to a newer build? and one that has Mac integration built in? (not saying that one doesn't, but there are a lot of various Mac builds and recipies, some super vanilla, some with native comp, some with better integration, etc). But you really want latest version, there is a lot of goodness added lately :) (27.2 is about a year or so old.. which normally is fine, but 28.x added so much goodness!)
aimebertrand · 2022-05-12 14:51
I second that. I am on 28.1 of the emacs-mac build on M1. Works beautifully and is integrated like a 1st class citizen. Check out: https://github.com/railwaycat/homebrew-emacsmacport
tomratboy · 2022-05-12 14:52
`brew tap railwaycat/emacsmacport` `brew install --cask emacs-mac` Never had any issues like you described (M1 MBA on Monterey). I also use helm and helm-display-in-new-frame and the only issues occur when using multiple monitors, where the frame will sometimes open at the bottom off the screen.
_viz_ · 2022-05-12 15:07
Emacs intentionally does not support features that makes it "perform better" in a proprietary platform if those features cannot be implemented in a free OS.
jacmoe · 2022-05-12 15:07
You are missing that Emacs is written in Emacs Lisp, except for a tiny core in C. We, as users, are given the very same language, which means we can do anything, including a fully featured VIM simulator (EVIL). VIM can't do that, no matter how aggressively it is refactored. It is a fundamental design difference.
takutekato · 2022-05-12 15:34
Although I admire Neovim greatly for having built-in LSP and Tree sitter; but IMO, an editor for modern era without official GUI?
mmiri-ifuru · 2022-05-12 15:48
Give as good as you get. Go FSF!
MhvxvLvJrg · 2022-05-12 16:45
Oops, sorry for misleading info. Didn’t pay attention to the M1 thing.
VitalyAnkh · 2022-05-12 17:34
"We are noble macOS users, and why you emacs developers don't serve us well?"
Dry_Bunch5867 · 2022-05-12 18:11
I haven't had an Intel macOS. On AS it is buggy though.
thr33body · 2022-05-12 18:48
I'm also using an M1 and am not having any issues. Much better integration than windows IMO but I also mainly use org-mode so YMMV.
_viz_ · 2022-05-13 02:45
Fennel is just a poor experience. Apart from dealing with fennel quirks, you also have to deal with Lua weirdness! Maybe I did not read the documentation properly but I wasn't able to find the equivalent of &rest in fennel/lua.
Dangerous-Bath-3976 · 2022-05-13 06:00
It depends on how you use Emacs. All programmers would get a better experience using tmux and running Emacs via --daemon in the terminal.
oantolin · 2022-05-13 09:17
I haven't used fennel very much, so I don't remember how you do &rest there. In Lua the syntax is `...` in the parameter list and then in the body of the function `arg` is a table containing those extra arguments. The first search result for "Lua varargs" I found is oddly not the documentation but the Programming in Lua book, [section 5.2](https://www.lua.org/pil/5.2.html). I can easily believe using Fennel is a poor experience, that tends to happen with transpilers.
_viz_ · 2022-05-13 10:05
Yes, IIRC I did find the documentation with a bit of effort but putting it to practise proved to be a major PITA. I was baffled since functions like apply were nowhere to be found so I quickly gave up. We (I was helping someone else then) found this article and concluded that Fennel was a poor choice: https://benaiah.me/posts/everything-you-didnt-want-to-know-about-lua-multivals/ and this is what I wrote to them > ... as a standalone value is just the first element and TBF, I don't even understand what I meant that. Perhaps, I never did.
Dry_Bunch5867 · 2022-05-13 14:47
Why would a computer game programmer or even a web developer be using Emacs in the terminal. It doesn't make any sense. Terminal will limit graphical stuff to the 80s level. You should try refactoring capabilities of IntelliJ family of products. You can't do that in Emacs.
wakatara · 2022-05-14 04:06
Weirdly, I am really enjoying neovim in the terminal with a bunch of plugins that make it gui-esque. I've actuall ymoved off using VS Code (which is saying something since it was what I was using previously). neovim in the terminal (see NVChad and similar IDE-out-of-the-box intiatives) is scarily great. Esp if you know the basic vim keybindings. Kinda a convert at the mo. Really looking forward to seeing how they make it even better (since pretty early days still).
Dangerous-Bath-3976 · 2022-05-15 23:32
I think you haven't seen a modern 24 bit colour terminal with good fonts then....
Dry_Bunch5867 · 2022-05-16 07:23
What does the number of colors have to do with the inherent limitations of TUI. GUI can work even on monochrome monitors with just black and white. In Emacs, every element has the same width. You can't have a 1px line, than 3px element and than another element that is 2px wide - everything is 10px wide and that's it. Emacs is like Minecraft - blocky. in GUIs you can finetune the design to be pixel perfect of what you want, you can change it in real time with mouse or shortcuts. Emacs is a blocky monster that is great for some things but a very backwards thing in many other things. If you are a die hard fan of Emacs you won't accept the truth - am I right? CLI and TUI for life, right? GUI is bad because it's unpredictable and hard to control, right? You hate when you don't have control over things, right?