4 ms·
I'm really happy to see Emacs move faster, and especially the integration of package management since version 25. The old beast is still kicking! For what it's
by AceJohnny2 8y ago
I'm really happy to see Emacs move faster, and especially the integration of package management since version 25. The old beast is still kicking!
For what it's worth, I've actually been using on macOS the Mituharu branch [1], available in MacPorts as "emacs-mac-app". This version adds the [s]essential[/s] smooth-scrolling feature, and just in general seems to be slightly better integrated into macOS (except that it doesn't define the standard macOS keybindings, which I had to create manually. Ironic)
[1] https://bitbucket.org/mituharu/emacs-mac/ https://bitbucket.org/mituharu/emacs-mac/
- AceJohnny2 8y agoSince it was painful to do, here's what I put in my .emacs to bring back macOS Cmd-keybindings in Mituharu's Emacs: ; Configure shortcuts if we're using Mituharu's Mac port of Emacs (when (eq window-system 'mac) (progn (message "Setting emacs-mac keybindings") (setq mac-option-modifier 'meta) ;supposedly setting this to 'nil gives them back to OS X, but that didn't work for me (setq mac-command-modifier 'super) (global-set-key (kbd "s-q") 'save-buffers-kill-emacs) ;I hate ⌘-w killing a window, too close to alt-w (copy). Deactivated ;(global-set-key (kbd "s-w" 'delete-frame) (global-set-key (kbd "s-a") 'mark-whole-buffer) (global-set-key (kbd "s-s") 'save-buffer) (global-set-key (kbd "s-d") 'isearch-repeat-backward) (global-set-key (kbd "s-f") 'isearch-forward) (global-set-key (kbd "s-g") 'isearch-repeat-forward) (global-set-key (kbd "s-z") 'undo) (global-set-key (kbd "s-x") 'kill-region) (global-set-key (kbd "s-c") 'kill-ring-save) ;ns has ns-copy-including-secondary, on mac- port, kill-ring-save works the same (global-set-key (kbd "s-v") 'yank) (global-set-key (kbd "s-y") 'yank) ;ns-paste-secondary (global-set-key (kbd "s-u") 'revert-buffer) ;(global-set-key (kbd "s-o") 'ns-open-file-using-panel) ;no good alternative ;(global-set-key (kbd "s-p") 'ns-print-buffer) ;no good alternative ;(global-set-key (kbd "s-h") 'ns-do-hide-emacs) ;done by default (global-set-key (kbd "s-j") 'exchange-point-and-mark) (global-set-key (kbd "s-k") 'kill-this-buffer) (global-set-key (kbd "s-l") 'goto-line) (global-set-key (kbd "s-n") 'make-frame) (global-set-key (kbd "s-m") 'iconify-frame) (global-set-key (kbd "s-`") 'other-frame) (global-set-key (kbd "s-,") 'customize) (global-set-key (kbd "s-'") 'next-multiframe-window) ) )
- deleted 8y ago[deleted]
- roryokane 8y agoIf you use Spacemacs, it can define a similar set of keybindings for you with its ‘osx’ layer (https://github.com/syl20bnr/spacemacs/tree/master/layers/%2Bos/osx https://github.com/syl20bnr/spacemacs/tree/master/layers/%2B...). To enable that layer, open your Spacemacs dotfile with ‘SPC f e d’, then add ‘osx’ to the list within the ‘dotspacemacs-configuration-layers’ variable.
- caiob 8y agoIs MacPorts still a thing?
- ddavis 8y agoI used Mitsuharu Yamamoto's emacs-mac distribution for some time (due to a suggestion I saw here on HN a while ago), but the upstream nextstep build (from the main GNU Emacs repository) actually feels a bit smoother/snappier to me, so I switched back a couple of months ago.
- manish_gill 8y agoEmacs is the one environment that I've been a fan of from afar. I recognize the brilliance and power of it, but a few things have always kept me away from using it on the Mac. And I've put in serious attempts, including going emacs-only, then a custom evil mode, then spacemacs - - The server mode compatibility with the way Mac applications are set up. I'd ideally want an emacs server running in the background, and a client app open/close seamlessly whenever I'd like. What actually ends up happening is that I close the client windows but the app never "quits". So it's a zombie icon always hanging around my cmd+tab list. - "Windows" (or Frames?) have generally not worked seamlessly for me. I've to always put in hacks in my config to ensure the emacs windows work like other apps do for mac. They're either too small and then size up when config is applied (which has some latency so it's noticeable when it happens), or they don't work at all. - Font rendering. There is some minute rendering difference in the way the same fonts that renders on Vim/iTerm/Macvim/Sublime/VSCode/IntelliJ, but it's the worse by far on my emacs. :( - All of these complaints are for the GUI mode tbh, which I prefer to use since I like to keep my terminal separate from my editor. Terminal-only emacs is something I tried a few years ago and I remember getting annoyed by keybinding issues etc. Maybe all of the above are old issues that are no longer present, or maybe I was doing things the wrong way. It just never felt like it was a seamlessly integrated application on the Mac. I hope that has changed or will change. :)
- bobbylarrybobby 8y agoIssue #1 was annoying for me, so I hacked together the following solution: write an emacs function that detects situations where you feel emacs should quit (e.g., no windows left) and have it kill itself and the server when this happens. Then, write a launch agent to poll if the server is running and start it if not (pgrep is cheap enough that you can do this every few seconds). Finally, write an Automator app that will be your launch point for emacs, which receives files and opens them using the server. It’s an annoying fix but when done right it feels exactly like emacs is a native app.
- snazz 8y agoIf you could package it up nicely, maybe one of the Emacs distributions would consider upstreaming your solution. I doubt that the pure-GNU Emacs maintainers would be too happy about it considering RMS’s choice to remove Mac- and Windows- specific API usages since they gave the nonfree OSs an “advantage”.
- andbberger 8y agospacemacs
- na85 8y agoAll I need is a way to call elisp functions from the touch bar.
- roryokane 8y agoYou can define custom touch bar buttons with BetterTouchTool (https://folivora.ai/ https://folivora.ai/), and configure them to run a custom shell script. There is probably some way to call Emacs functions via shell script. However, be warned, BTT’s interface is messy and the buttons it creates don’t look right unless you manually adjust the styling yourself. Also, macOS won’t show BTT’s buttons unless you either allow BTT to take over your whole Touch Bar, hiding Apple’s global buttons, or you expand the BTT toolbar beforehand, which must be closed before you next try to press the Esc key.
- roryokane 8y agoTo install that “emacs-mac” branch of Emacs with the Homebrew package manager, see the instructions on https://github.com/railwaycat/homebrew-emacsmacport https://github.com/railwaycat/homebrew-emacsmacport. Homebrew’s built-in formula directory doesn’t include that version of Emacs, so that linked repo is a “tap” that defines a formula for it. From the README of that repo, these were the only commands I needed to run: brew tap railwaycat/emacsmacport brew cask install emacs-mac