As someone who lives in org, this is the way. I'm still shell bound for a lot of things, but M-x shell is far superior, there's just no contest. Only thing that is annoying is stupid things like git diff that think they know better than you and want to do their own paging resulting in "WARNING: terminal is not fully functional". Thankfully I use EGG, but when I forget (and other things do it too), it's annoying.
(setenv "EDITOR" "/usr/bin/emacsclient -c")
If you do that, it should cause any child processes (e.g.: vterm) to inherit the replaced EDITOR variable and properly open new editor frames instead of trying to do a terminal takeover. (defun open-term-here ()
"open st in `default-directory`"
(interactive)
(call-process-shell-command
(concat "st bash -c \"cd "
default-directory
" && exec zsh\"")
nil 0)) (defun tmux-here ()
(interactive)
(if (not (eq (getenv "TMUX") ""))
(shell-command (format "tmux new-window -c %s" default-directory))
(error "Not inside a tmux session.")))
I know, I know, tmux is slow and should never be used. I like it, OK.I run emacs as a daemon, but it doesn't have to be. You can also run `(server-mode)` from any emacs process. A nice snippet for the init.el is: `(or (server-running-p) (server-mode))` which works whether you run the daemon or not.
But definitely out of the box with a stock emacs install it seems too interested in doing a bunch of stuff that gets in the way.
My EDITOR has been just regular "emacs" for years now.
That is a fair point, though not really fitting my workflow. (Also, my Emacs needs ~20 seconds to start, and I tend to have Emacs uptime of several days or sometimes even weeks.)
> I cannot stand using multiple frames on a non-daemon Emacs due to it not always being obvious when I close just a frame and when I close the whole process.
This is strange. In my Emacs, C-x 5 0 on the last frame results in "Attempt to delete the sole visible or iconified frame". (And I have `(setq confirm-kill-emacs #'yes-or-no-p)` in my init.el anyway.)
This is useful for segregating groups of work related to a set of files but I would be interested if there's anything for arbitrary unsaved buffers in general.
I’m by no means a package maniac, and I lazyload with use-package almost entirely, but a cold start still takes a second or two. To me, a choice between a second or two and instantly is a no brainer.
`alias ec="emacsclient -s console -a '' -nw -r"`
It doesn't start a new doom workspace /most/ of the time. Sometimes i'll get a new one if i've got multiple editors opening up the same file, I think. But the `-s` flag starts a console server that at least keeps those out of my main emacs window (I use the gui version from emacs-plus)