Emacs 26.3
lists.gnu.org
lists.gnu.org
Emacs had been my work horse since 2002 and never disappointed. In the meantime tried many ide only vim and emacs stayed with me. Sometimes do use nano and sublime text but then back to either emacs or vi.
All those shiny IDE based on electron, Java or C++ are just too slow to be productive be it VScode, atom or eclipse or visual studio or kdevelop. I am forced to use them due to tooling support for some framework. But I avoid them as much as possible once I have configured emacs to work with the language or sdk or framework or library in question.
Don't care about your platform, desktop (I'm typically working over SSH in the cloud, so why bother?) or any of that hooplah.
Just waiting for everybody else to catch up.
The problem is that the 'stable/master' branch of Spacemacs is incredibly outdated. I found myself needing fixes or improvements that existed in 'develop' so often that I migrated over to that branch. The idea of regularly cutting stable releases just isn't done within that project so if I'm recommending Spacemacs to new users I have to give them installation instructions that aren't provided by the documentation. Also, to get more up to date documentation I need to go to the layers docs in the GitHub repo and that can be hard to track down.
Every fresh install I've setup there has just been... so many problems with melpa and pulling down packages. Most of the time I have to repeatedly delete the package cache and restart Emacs until Spacemacs successfully pulls down packages - usually using the insecure flag so that packages aren't downloaded over HTTPS.
It's just... not as a polished as installing VSCode and a bunch of extensions. Spacemacs can require a lot of work and patience and I've just had too many things break with it over time.
I also frequently wonder how I'd introduce spacemacs to someone who hasn't used vim or emacs... I used vim for a very long time, so to me it's great that my knowledge carries over. I just don't know if it makes complete sense to say to someone "vim has better bindings than emacs, so even though this is emacs, you should learn these vim binds". Plus then they should probably still know at least the basics of emacs for screens where evil fails you, or for if they ever have to use emacs on another machine, or for when an emacs bind is better ("C-x h" seems better than ggVG to me).
i really _want_ to use it. I love vim's modal editing, but extending vim is a pain in the butt, and I'd love to use lisp to tweak my editor.
But, I absolutely can not recommend spacemacs right now.
Installation process is broken crap (at least on the mac) and you end up having to deal with meta-this-that-the-other way too often for simple (non-advanced) vim commands.
I do use `:e` and `:w` pretty often, so I'm grateful those work. I suppose I would've felt very differently if I'd ran into issues with them early on. I don't actually use `:q` from spacemacs since with emacs you often leave open all your visited files. If I do want to get rid of something, I tend to do `SPC b d` for buffer delete.
>installation doesn't work
I think on my GNU/Linux machine the installation worked for me. I first started switching to the develop branch because of a bug in one of the layers I enabled that was fixed in develop.
>insecure downloads
I definitely haven't made this change that people are mentioning.
Is there a nice how-to for setting up emacs with evil mode and a reasonable set of defaults that don’t require endless tweaking?
Being able to remotely open my editor (either from a terminal, or with X11 forwarding) with all the files I have open, exactly where I left off is incredibly useful.
A few years ago, I started using one daemon per project with server-use-tcp, each with a slightly different theme so I can easily tell them apart.
(posted from emacs-w3m)
Other big benefit is starting emacsclient is basically instant, so opening a file from a webbrowser or whatever is super fast (some folks have 30 second or longer emacs startup times).
Only real downside is it really sucks bringing back your state when emacs crashes and you have hundreds of buffers open for multiple projects across 20-30 emacs clients.
I have see this many times and never understood how startup time could be an issue. I startup Spacemacs at the beginning of the day, and close it when I leave. 10 second of startup time is nothing.
Then again it may be the case that part of the cycle is seeing if the package management system of your custom distro (be it spacemacs, doom, or whatever) picks up and configures the new packages correctly.
Some modes also support limited refactoring tools[2], but that's not quite as common.
[1] https://www.gnu.org/software/emacs/manual/html_node/emacs/Xr...
[2] https://github.com/clojure-emacs/clj-refactor.el, https://github.com/Wilfred/emacs-refactor, https://www.emacswiki.org/emacs/SemanticRefactor
It's a great time to be alive
Happy sigh...those were the days :-)
It's hard to beat an IDE on a large, disorganised codebase though, I'd lie if I said I only use Emacs and never reach out for an IDE.
It's not as sophisticated as an IDE, but it works with practically any language and is easy to customize.
I find it often quicker than an IDE..
What they usually can't do is the more involved stuff, like refactoring, because there is no company who pays people to implement these for emacs/vim.
It's true that funding is important. CIDER has benefited from this system: https://www.clojuriststogether.org/projects/
After learning vim, I couldn't stand using nano. It seemed like the worst of both worlds. No efficient keybindings like vim, and no mouse support like other conventional text-areas.
Hearing/reading you say that you sometimes use nano made me curious of why and now I see that there seems to actually be quite a few features. I see it has macros, autocomplete, mouse support, autoindent, multiple buffers, editing keybindings to e.g. delete word-wise, linting support, etc.
I never knew... and totally misjudged it as a very basic text editor.
It's still basic when compared with vim or emacs, but now I hold it in far higher regard than Windows Notepad at least.
I kind of feel like that time many years ago I found out that sed had more than just s///.
I run emacs-plus macOS variant, which one are you running?
brew install emacs
brew install emacs --HEAD
brew install emacs --with-cocoa --with-imagemagick@6 --HEAD
brew install emacs --with-librsvg --with-cocoa --with-imagemagick@6 --HEAD
brew install emacs --with-gnutls --with-librsvg --with-
cocoa --with-imagemagick@6 --HEAD
brew install emacs --devel --with-cocoa --with-gnutls --with-librsvg --with-imagemagick
brew install emacs --HEAD --use-git-head
brew install emacs-plus --HEADWith Emacs that means Ensime, and Emacs becomes just as slow as VSCode+Metals or IntelliJ.
ACME's plumber is very cool, and allows very easy customization of how some things work. Much easier than these things typically are in Emacs. But this behavior is implementable in Emacs (I wish it were standard), and lots of things that are hard-coded in ACME are fully customizable in Emacs.
Interestingly, the first Emacs "plumber" which I have found after you wrote it literally uses Acme's plumber: https://github.com/alcah/sink.el
I wish Emacs had 9P support though.
If anyone is aware of a better way, especially for emacs users, I'd appreciate it. Is this something where docker or snapd might fit in well?
Obviously you can use emacs-prelude [2] or spacemacs [3] in the beginning and as you get familiar write your own init.el or packages to make it work the way you want.
I have yet to see anything like tramp allowing seemless work on file over ssh, org-mode, ledger-mode, ERC in any other editor except may be some in vi.
Indeed magit is better than any tool you will find for managing git repository. I can go on and on. You have to give it a try to see it for yourself, it pays for its learning curve over the time you use it.
Initially those parentheses looks awkward, but once you get around it with understanding lisp, you will not want to go back.
[1] https://github.com/jorgenschaefer/elpy
> Microsoft Language Server is nice but use it for things you can not find a package in elpa or melpa.
That's overly restrictive. I use company as my capf provider and hook company into lsp, it's a nice unified interface and it never gets in my way.
What I'm looking for is a mechanism to manage the dependencies of extensions. For example, the elpy readme clearly says, "pip install jedi rope flake8 autopep8 yapf black".
It is basically emacs over ssh (although there are more possibilities)
You can install emacs on one machine, then use tramp for all the rest.
It's also great for machines that can't run emacs, for example you can edit config files on iot devices.
Other interesting things: picture mode, artist mode, pong, fireplace.
my tip for the day:
(global-set-key "\M-+" 'text-scale-increase)
(global-set-key "\M--" 'text-scale-decrease)
(global-set-key "\M-=" (lambda () (interactive) (text-scale-set 0)))sounds your problem is more fragmentation rather than too many servers. Adding another package manager/virtual environment manager on top of that might just be more headaches.
function em() {
emacsclient -nw "$@"
}
so that I can call "em" with any necessary arguments and start an emacs session without having to wait. Works for me (though depending on the language I might still prefer vim).Incidentally, my emacs font face is also the same, so I am also getting a bunch of ^L in emacs C-h n.
That emacs displays form feeds as the Control character ^L (which it is) is also normal, and if you just curled the file confirms that it’s just a plain old text file.
> This release is mainly a maintenance release, which contains a new GPG key for GNU ELPA packages.
It was a few months before I started editing my config files, first to get rid of the start up message, then to handle some org exports, then to do a little python programming.
Your config file grows as your use of emacs expands. I now use it for programming, task management, email, calendar, accessing remote files, git, and occasionally a little note taking.
The worst thing you can do with emacs, when starting, is to look at other peoples .emacs files. It's just intimidating
Just open emacs with no customizations.
You can do everything with a tiny handful of commands, many of which you already know: c-F for forward char, c-B for backwards char, c-P for previous line, c-N for next line. It's modeless so if you type you'll see your keystrokes. Run the tutorial to learn a few more (c-H t -- c-H is "help").
One difference in emacs compared to many other editors is that search is so lightweight that it's trivial to use search to move the cursor around. So actual "cursor movement" is less common.
I was pair programming with a colleague who's been using Emacs about as long as I have (since 1978) and the other day he learned a new command. "I can't believe I survived with this command", he said, but really, he had done just fine.
For the fellow Vimmer, I suggest Doom Emacs. I'm using it to type this message now! Yes, it's a distribution with many batteries included, but you can eliminate what you don't need. It's quite flexible, and the dev is very responsive.
I recently dropped Vim and going with vanilla Emacs. I reconfigured my current Emacs/evil-mode config and took out everything evil related.
For the next few days I painstakingly worked through the keys. By the end of the week, I had enough. I felt too slow and my hands started aching ironically. My current Linux environment relies on me to easily switch between windows with HJKL and other shortcuts I've instituted over the years. Also, I work on two different keyboards. Both work fine with evil-mode, but one required some serious rebinding just to use vanilla Emacs.
I returned to evil mode and feel right at home. I did take some things with me, such as C-a/e for moving to the beginning and end of a line and C-d and C-k for deleting characters and lines, respectively.
I'd love to hear from Vim and Emacs users on why they preferred Emacs' bindings over Vim's, if that ever happened.
Org mode is good, but most Emacs mail clients are pretty meh. The primary advantage is getting to use the same interface to everything and being able to customize everything easily. With the relatively small volume of email that I process, it's just too much work to keep all of the configuration working for mail in Emacs. Magit is cool, I think you'll enjoy it.
If you happen to be using bash, "set -o vi" was a godsend for me.
bind 'set show-mode-in-prompt on'If you intend to do a lot of customization to your editor, or expect IDE-like features, I feel that emacs is the superior choice.
elisp is a OK scripting language. Rather quickly I could read and understand the internals of emacs packages (and of some of the emacs internals itself!), despite having basically no experience with lisp. Self-documentation and explorability is truly incredible.
I never really looked into VimL, but my understanding is that it is really not as good.
I still prefer vim bindings, so I use evil-mode on my "vanilla" emacs and vim bindings in spacemacs (well, "hybrid" bindings to be exact).
So my personal take:
- vim for sysadmin, being able to run a fast minimal editor behaving the same on multiple machines
- emacs for development, where having a "tailor-made" editor with lot of config/customization is important
Have you tried TRAMP? It's not just something that lets you have your Emacs config on remote machines: it brings the remote filesystem to your machine. (It's a little like sshfs except more powerful and much more convenient.)
There's highly recommended pre-configured packages like Spacemacs or Doom-Emacs that ship with vi-key support enabled by default, allowing you to keep much of your muscle memory.
- Get used to type "emacs file.txt" instead of "vim file.txt" in your console.
- Have a function in emacs that opens the current file in vim for those moments where you just want your trusted environment. Writing it by yourself is a good focused learning experience.
This way you'll decide (and balance) how much you want to learn every day, and little by little you'll find yourself using that function less and less.
Overcoming 20 years of vi muscle memory is hard. You just have to go 100% emacs and eat the reduction in productivity for a few days/weeks.
I'm getting there...
I really love spacemacs but I just genuinely don't have time to screw around with my editor constantly, so I ported the bindings I found essential from spacemacs, turned on VS Code's vim emulation, and it's actually been a pretty good experience. It's not perfect, but it's good enough.
Alternatively, could somebody convince the author of the railwaycat port (Emacs with better macOS integration) to get a version 27 out soon?
You might as well look at the thread js2-mode was revoked[0] and ergoemacs' article[1].
> Alternatively, could somebody convince the author of the railwaycat port (Emacs with better macOS integration) to get a version 27 out soon?
Er... I would like to point out that it's not 'railwaycat' port but more of Mitsuharu Yamamoto's port[2], and AFAIK he has claimed that he has no interest in maintaing an emacs27 version.
[0] https://lists.gnu.org/archive/html/emacs-devel/2009-08/msg00... [1] http://ergoemacs.org/misc/emacs_javascript_mode_war.html [2] https://bitbucket.org/mituharu/emacs-mac
I couldn't remember the name of Yamamoto, which is why I said the author of the railwaycat port, where the latter is mostly packaging if I understand it correctly. But Yamamoto is doing most of the heavy lifting yes, and I'm thankful for it.
No chance of quickly writing a script to automate something in the editor, because it takes so much time that it's not worth it for quick editor code snippets.
Other editor users simply have no concept of how easy it is to whip up some quick script to perform some task in emacs.
I don't want to start a flamewar, but I moved most things I was doing in Emacs to Textadept a while back because I found Textadept more convenient. That's not to say TA does everything you can do in Emacs, but it replaced all of the scripting I was doing with Emacs.
You have the full power of Lua inside TA. Emacs always has a lag when I start it up, whereas TA is instant. I slowly built up functionality inside TA to the point that I realized I could replace everything I was doing in Emacs.
It's so small and lightweight that, just for fun, I wrote a "web browser" inside TA. It calls out to lynx and loads a readable text version of the page. I use a keyboard shortcut to open links. I have functions for searching the web, I can search YouTube and open the videos in VLC, and so on. This was a practical thing to do: I can use TA as a browser on really old laptops.
It maybe isn't for everyone, but in Emacs when I was doing this[1] to duplicate a line:
C-a C-SPACE C-n M-w C-y
I asked why I wasn't using a better text editor. In TA, it's C-d. Just as Emacs is an interface for Emacs Lisp, TA is an interface for Lua, and with a lot less overhead.
[1] https://stackoverflow.com/questions/88399/how-do-i-duplicate...
As for your C-d example, it's a trivial function in emacs which I too wrote many years ago and bound to C-d, so it's not a compelling example, because it can be added trivially in emacs too.
Agree with everything except "trivially". Emacs is a house of cards. Pretty much every shortcut is already taken, so then you have to figure out what's already bound to C-d, and how your change is going to interact with everything else you do. For one binding it doesn't matter, but doing that kind of customization over and over gets annoying, causes the init file to balloon, and slows the startup time.
Take a look at Atom[0]: you can almost think it's a bit underpowered Emacs that uses CoffeeScript(JS) instead of Elisp.
It uses the same mental model as Emacs; the init file is a CoffeeScript file, not a JSON file with packages (like VSCode).
[0] atom.io
I'm not sure what you're asking; Emacs also exposes a set of APIs. If you're asking if Atom's init file is written as a generic programming language (unlike VSCode which uses JSON), yes it is.
If you're asking if Atom's API is sufficient enough to implement radical modes (like js2-mode in Emacs), AFAIK yes. Atom by default doesn't have a terminal or a browser; but there are several packages to do them. However I'm not too familiar with the Atom's API surface; I've never used Atom as a primary editor, but more of a backup editor for when I'm recompiling Emacs/reinstalling Emacs packages, ... so I'm not sure about the last sentence.
Also I never really thought of writing scripts for editing in emacs thanks for the brain shift that clicked for me.
I very often write few lines of temporary commands if I have to do some mass editing which can be automated.
With vscode I'd have to do it in python or something outside of the editor which is much less convenient than an emacs script which can work on a file as a buffer.
> This release is mainly a maintenance release, which contains a new GPG key for GNU ELPA packages.
Have to test if 26.3 without the jit is more stable.
Do people recommend the use of emacs over vim on servers? (Mainly editing server config files and reading long logs) Any good plugins to enhance its use for this use case?
I have pretty much ignored emacs for the last 15 years when I felt it didn't act as snappy as vim.
what is the "plus" in emacs-plus?
I used to have code in my config files to try and handle different paths, etc. when I was in windows vs linux and now I don't have to worry about that anymore.
YMMV
I haven't yet tried WSL (I run Windows on a work issued laptop), so my emacs sessions run in a Linux VM to get acceptable performance.
I am relieved, though, that it's not just me.
Git is definitely slower in Windows
http://git.savannah.gnu.org/cgit/emacs.git/tree/nt/INSTALL.W...
As with most things in that realm, the hard part is getting all the dependencies (libpng, etc) but (a) since msys2 switched to pacman that looks a ton easier (b) AFAIK building with those graphical libraries is a nice-to-have for w3m support, so if it's a hassle you can skip it
Just be forewarned that [again, last I checked] msys has a bad interaction if your machine is a member of an Active Directory domain, but you are road-warrior-ing and it is unable to reach the domain controller; one of my more popular SO answers: https://stackoverflow.com/questions/929495/why-is-mingw-very...