This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-27
Channels
- # announcements (8)
- # babashka (2)
- # calva (21)
- # clojure (30)
- # clojure-europe (4)
- # conjure (1)
- # core-logic (5)
- # data-science (1)
- # emacs (10)
- # hyperfiddle (1)
- # introduce-yourself (1)
- # luminus (62)
- # meander (23)
- # nbb (26)
- # off-topic (9)
- # reitit (2)
- # spacemacs (2)
- # squint (65)
- # tools-build (4)
- # tools-deps (17)
- # xtdb (20)
Today i learned that i should be running an Emacs server and just launching a client to connect to it. Via this video: https://youtu.be/s0ed8Da3mjE
Not sure if 'should', but I do use it. A fast-starting .emacs.d allows being liberal with how often you quit / restart it. I have the habit of doing a few restarts a day for avoiding accumulating useless (potentially problematic) state. I use the server as launched from a GUI app, mainly for scripting the GUI app. Also, occasionally, for editing files from iTerm.
I've been an emacs user for 30+ years. I don't do this. I can see how under certain usage patterns it might make sense, but it definitely doesn't work for the way I use it. I tend to work on different tasks on different desktops. I keep the emacs for that task open for the life of the task, perhaps restarting every now and then if I feel I'm accumulating too much cruft or want to pick up updates.
> I use the server as launched from a GUI app, mainly for scripting the GUI app. which GUI app? Is it a linux package?
> perhaps restarting every now and then if I feel I'm accumulating too much cruft or want to pick up updates. Yea, if it's leads to more oddity orthogonal to the task at hand, then it's not worth the 4 seconds it takes emacs to power up and get me back to where i was.
> which GUI app? Is it a linux package? it's simply emacs packaged as a macos .app which has a native os integration, etc. Contrariwise, a pure binary can only run in the terminal, so it's a less rich experience
I run the server by starting emacs with emacs --daemon
and have a few keybindings in my .zshrc
like
bindkey -s "^x^f" $'^aemacsclient -c -nw '
because I kept trying to find a file in emacs from the shell prompt accidentally by hitting the keyboard shortcut. I use dabbrev-expand
a lot (out of a long ingrained habbit) which works better if you don't close the buffers in your project so dabbrev can complete existing function names, etc ... I like the workflow of opening files in the terminal for quickly editing things or using magit with things like this:
alias magit="emacsclient -nw -c -e '(magit-status)'"
but I also like having a gui emacs with all the same buffers and repl connections open in the same process. I tend to only restart emacs when I reboot the machine.also ... I set export EDITOR='emacsclient -nw -c'
which makes life better when using terminal programs like git or mutt 😉
I also used to float around emacs daemon and connect to it on-demand, but from some moment on I just close the laptop lid and go 😂