375 points · by mbork_pl · 3y ago · 197 comments
Also, every buffer is a blender of modes. Want a new feature or some handy functionality? Activate a mode.
My only argument against Emacs used to be its sluggishness, but that's no longer a thing with native compilation. So now I'm pretty sure Emacs has spoiled me, and I'll never be able to enjoy another text editor again.
I started using tiling window managers a few years ago. These took a little configuring. I always had one monitor with an emacs session, and then another with an internet browser, and a terminal running tmux, which again needed a bit of configuring.
It took me wayyy too long to finally try EXWM[0]. Suddenly, I have that uniformity and consistent experience everywhere, and only a single configuration language to learn and use to get things how I like them.
If you like both emacs and tiling window managers, I strongly recommend it. My only major gripe is that the single threadedness can be bothersome on occasion, when certain commands can render it unresponsive. But it is still well worth it for me.
Odds are you'll find a few different issues specific to your workflow, but hopefully they'd be infrequent or easy enough to solve or workaround.
Conceptually speaking, it remains (despite various flaws and warts) one of very, very few well thought out pieces of non-trivial software. For decades, emacs was pretty much the only program with a search function that didn't suck. Emacs is still the only program I know pf with a decent, branching, undo system and proper, non-alzheimered copy-and-paste. Vim has branching undo system, and a clipboard that can hold more than one item, but both work poorly (e.g. in emacs it's ergonomic to cycle through clipboard history or pull a clipboard item by textual content, in vim it really isn't). Emacs is also remains far more deeply extensible and self documenting than anything else I can think of.
But... everything.
> Somebody who is used to some really handy refactoring, autocomplete, and auto formatting tools
Those aren't really differentiators anymore. They're available everywhere (even vim/emacs). LSPs have made the choice of thing for editing pretty irrelevant.
There's also the debugger adapter protocol, which has worked surprisingly well. Though I do still miss intellij's conditional breakpoints occasionally, it's rare that that's necessary, but they're surprisingly useful when you need them.
So, with emacs, you'd have everything you listed, and everything else you hear people talk about with emacs. Emacs will pretty much do anything. At the cost of higher initial set up effort, and config maintenance.
- Superior search. Emacs has a better search. It offers way too many different ways for searching things - locally, remotely, recursively, partially, contextually, dynamically, etc. With filtering the results and sifting through and editing at the same time.
- Fine-grained window control. Emacs has some amazing window manipulation capacities. You can precisely control how, where, and what gets to show up on the screen, without having to constantly move things around, drag and resize with the mouse.
- Unmatched extensibility. Can you use Google-Translate to find a word (that you forgot) sitting on the tip of your tongue, then lookup its synonyms in Merriam-Webster, pick one, then check its definition and learn its etymology from Wiktionary? All without having to type a single search query in the browser, using just a few handy keyboard shortcuts, no mouse, no context switching? I just did, and didn't even have to switch the keyboard layout for another lang, I let Emacs handle that.
There's maybe one single thing that specialized IDEs sometimes do better than Emacs, that people often rave about and what earns the label "it just works". That would be intellisense and completions. But, these days, using lsp, and having sufficient knowledge of Emacs-lisp you can build your own, superior completion framework. Company, Corfu and Capf are incredibly good.
Disclaimer, I used Jetbrains products for many years and still sometimes fire up Android Studio (mainly to check how something works).
Others have/will answer the question directly, I'll note that you don't actually have to choose for some features. I've seen people using JetBrains to do the refactoring while using emacs for all of their editing (keeps their entire workflow consistent between projects that can all be done in emacs).
I never could make it work when I was using vim style key bindings because the vim emulation modes in every programs end up being slightly different.
IMO, it's strictly worse than JetBrains for refactoring/autocomplete since JB has really nailed that stuff.
However, it's really useful as a compliment, specifically for git interactions (magit) programmer notes + run configurations (org-mode) and all kinds of minor tools. TRAMP is very useful if you'd like to edit remote files, and I find undo-tree priceless when debugging things that have multiple possible failure modes.
I learned Emacs at 300 baud, so I'm very used to its ability to perfectly support predictable type-ahead.
Also, it was a terrible for Emacs to make "line-move-visual" be true by default, because it ruins keyboard macros.
Xah Lee disagrees and thinks line-move-visual is great, and rants and raves about it, but his arguments don't convince me. However it was a nice try, and I admire his dedicated Emacs fanaticism, even if we don't agree on the (important!) details.
He didn't address the problem that line-move-visual ruins the usability and determinism of keyboard macros, and I think keyboard macros are so important that fucking them up (especially in the service of making Emacs act more like Microsoft Word, which wasn't designed to support keyboard macros) makes Emacs unusable. I strongly agree with the late Marc Crispin's classic flame and followup discussion on the subject. (Search for "M-X fart-noisily-with-spray".)
http://xahlee.info/emacs/emacs/emacs_line_move_visual.html
>This page discuss a new feature in emacs 23.1, that pressing the down arrow key moves cursor to the next line as seen on the screen, not by EOL (end of line character), controlled by the variable line-move-visual.
>[ Mark Crispin ] [ https://en.wikipedia.org/wiki/Mark_Crispin ], inventor of the email IMAP protocol, one of the earliest user of emacs (before Richard Stallman), posted a message on newsgroup comp.emacs, aggressively attacking a emacs 23.1 change about how the key C-n or arrow keys move the cursor across lines. The thread now has over 110 messages. The original thread is here comp.emacs, some later messages are posted to gnu.emacs.help.
>In his opinion, emacs should not have changed this fundamental behavior. Here are some of my responses in the thread, summarizing why i think it is a good change.
He quoted both Mark's flame on comp.emacs and mine on hn:
http://xahlee.info/emacs/misc/Don_Hopkins_Mark_Crispin_rants...
>Rants on Emacs Visual Lines by Don Hopkins and Mark Crispin
>by Don Hopkins, 2013-12-21
>The wrong people have been drunkenly driving Emacs into the ditch for the past decade or so, and they're really screwed it up in so many ways, usually trying to be way too clever and solve problems that really aren't worth solving.
>They made “line-move-visual” the default, which in the service of making Emacs behave more like Microsoft Word, it makes ^N and ^P across wrapped lines stay on the same line and move to the part of the same line that is wrapped above or below the cursor, totally breaking type-ahead predictability and keyboard macros. That totally pissed of the late and long time Emacs user Marc Crispin, and he explains why it's such a terrible idea that breaks keyboard macros: http://compgroups.net/comp.emacs/line-move-visual/274792
>It totally breaks keyboard macros, one of the most important things about Emacs. It definitely should not have been made the default, since keyboard macros are a way of life for real emacs hackers. I totally agree with Marc's take on the problem, and I am terribly disappointed that RMS let somebody get away with changing it that way, and making that horrible mode the default.
>They just can't stop trying to make it more like Microsoft Word, while failing to actually achieve that goal, and only succeeding in inflicting half-assed solutions with harmful unpredictable side-effects on the users.
[...]
http://xahlee.info/emacs/misc/Mark_Crispin_emacs_line_wrap_r...
>From: Mark Crispin, To: comp.lang.emacs
>What mindless cretin thought that it should be a good idea to make line-move-visual be the default in emacs 23? I just found out about this charming "improvement" in the worst possible way. Investigation determined that a "routine" software update had just installed emacs 23 and gave me this "improvement".
>People wonder why everybody hasn't dumped proprietary desktop software. This is an example why. Emacs' line behavior has well over 30 years of history, and some bagbiter goes and changes it BY DEFAULT.
>Add all the cute new features you want. But leave the goddamn defaults alone.
>If you want to have your own playpen where you twiddle defaults to your hearts content, have at it. But don't pretend that you produce software for a production environment, and stop telling the Linux distributions that they should "upgrade" to your "improved" versions. People doing real work depend upon those distributions.
>It does no good to say "read the release notes" when the affected users don't get the release notes and don't even know that a new release happened. It is also unreasonable to expect users to subscribe to every obscure newsgroup, forum, and wiki to hear about changes that will turn their expectations upside down.
>Yes, I fixed my .emacs file. And I'm putting in the same change to all the .emacs files on all the dozens of other machines I use, even though they still have emacs 22, because otherwise this unpleasant surprise will repeat itself over and over again.
>Grr.
[...]
>From: Mark Crispin, To: comp.lang.emacs
>They made the wrong decision. Changes to default behavior are a bad idea. Changes to default behavior of the most basic functionality are an extremely bad idea.
>I don't care if M-X fart-noisily-with-spray changes its default scent from skunk to lemon. But I damn well do care about the most basic operations: all CTRL single letter and ESC single letter. After 33+ years of using emacs, I expect these to be reliable and not suddenly change.
>I wasted hours trying to figure out what the hell was wrong with my file, or my terminal emulator window, or my system. The fact that the problem went away on a different system added further confusion. It was only when I did ESC <n> CTRL/N and saw that it moved me the wrong number of lines, but only on one system, that I realized that emacs changed. And that's when I did ESC X describe-key CTRL/N and read about line-mode-visual, although it did not mention that this was now the default.
>Surprise. Grr.
This is the best summary of what the original Macintosh was all about and why Macintsoh enthusiasts back then loved System 6 and upwards.
(They didn't call them keybindings though. Keyboard shortcuts. (Ironicly a longer word. (yes)))
Unfortunately, Steve Jobs didn't care about Lisp or Smalltalk, and he hated Hypercard, and he took the company's product lines in a consumerist direction, which is why Apple has "app stores" nowadays instead of a thriving ecosystem of tiny Lisp programs that compose well with each other.
I suspect the reason that the Lisa was not Lisp or Smalltalk based is due to speed and cost of memory.
There was a common hardware. It ran Star, Lisp or Smalltalk - but not at the same time. Each were whole operating systems.
[0]: Unfortunately in most third party web browsers and Electron apps (Chrome, Firefox, Slack, etc) most of these shortcuts don't work for some reason.
[1]: https://developer.apple.com/library/archive/documentation/Co...
A few things I'd like to have is keymap collisions handling, but as anything in emacs, i can always code it with enough time :)
Comments like this make a long time Vim lover like me very curious, but I guess not curious enough to try it. Maybe one day.
What both Emacs and Vim have in common is an intimidating learning curve. You can't just dip your toe in. You gotta jump in head first, sink for awhile and then hopefully learn to swim. Only then will you know if you like it.
You kinda can, these days.
One of the main issues is that Emacs is, out of the box, the most complete toolbox you'll ever see, while at the same time being very incomplete. You have an email client, spreadsheet, unit converter, ASCII drawing, debugger, file explorer and so on and so forth. Meanwhile, you open a Python file and you are lacking a bunch of stuff that the likes of VSCode have out of the box.
So the solution is to customize, and that takes an inordinate amount of time.
Thankfully, some other people have solved this for us:
Spacemacs has VI commands by default - and I don't mean just the simplest keybindings like some VI emulators do, it's using evil-mode and it's pretty good. It can also be used in 'holy' mode (Emacs keybindings).
There's also(the one I use):
https://github.com/doomemacs/doomemacs
Either of these will get you a much more modern Emacs experience out of the box. You may need to add packages (it wouldn't be feasible to add all packages that everyone could possibly want), but they make it easy. Even though Emacs now comes with a package manager, it doesn't have any opinion on how you configure things. Both Spacemacs and Doom Emacs are opinionated, and that's a good thing.
Sure, you still need to learn concepts and keybindings. Thankfully, there's no shortage of tutorials, and Emacs own built-in documentation is very good. It also has a built-in tutorial, which is how I learned.
It became so bad I switched to a Doom derivative (CentaurEmacs) and while it did improve the speed, it merely reduced it from "almost impossible to work with" to "noticeably and annoyingly laggy fairly often".
I gave up on Emacs after trying to make it work for a loooong time. Carefully and slowly making my way through NeoVim in the last 6 or so months now, and it's much easier to work with and configure, not to mention 99.9% of everything is instant (the only time it lagged was opening a source file of 1.7M size and I suspect the slowness came from the LSP server and not NeoVim itself).
Emacs seems to be carried by nostalgia from folks that love to tinker with their tools more than they like to actually get any job done. A bit of a toxic statement, surely, but I'm pretty salty still and I haven't seen any objective evidence to make me look at Emacs and its fans more charitably. For anything and everything the answer always is "hack it for the 6328th time to make it even more your own!"
No thanks. I actually have a job to do.
Another thing that Emacs and Vim have in common is Vim keybindings.[1] You can pick Emacs keybindings up at your own pace. From one vimmer to another, if you want to try out Emacs, I highly recommend doing it with Evil.
If you have many years of experience with vim, evil-mode allows you to keep a lot of that and add good stuff from emacs.
Although I am not a fun of vim I ended up using one of those when I needed to switch between VScode on Mac and Windows on a daily basis due to uniformity of keybindings. My only wish is for Vim not to use Ctrl key at all. Then difference between Mac and PC keyboards will not affect muscle memory at all.
doom emacs. press spacebar to get a menu of things you can do and you also get a bunch of vim stuff for free. I don't use emacs as a daily driver but I still use it exclusively for the magit mode for git.
a caveat that you should be aware of is that you do need to learn a bit about emacs. what's a frame/buffer and how to kill them but that's not too bad.
It doesn't work well with full-screen programs, or ones that use escape sequences. Sadly there's no away around that besides keeping a list of those programs. Unix programs have never needed to say to the OS "I am a fullscreen program" due to how little a traditional shell actually interacts with a programs.
Emacs is my login shell now. I feel however that other, more pure attempts at this like the Canon Cat and Plan 9's text editor were smothered by the Mac/Windows interface of GUI programs which rarely interact. A more evolved shell never had the chance to arise.
Here's my shell script for vimterm.sh:
vim -c 'call Tmux()'
And here's the relevant function from my .vimrc: function! Tmux()
vsplit
terminal
set nonumber
wincmd j
q
wincmd l
terminal
set nonumber
wincmd j
q
endfunBasically, I'm using one instance of vim as a session manager to run other programs in, including vim itself. You can pass ctrl-w to a nested vim instance by pressing
ctrl-w .But now that I use Emacs "shell-mode" I hardly ever use Screen/TMux anymore. I don't even use Bash anymore, I switch my default shell to Dash, because I don't need Bash's tab-complation in Shell-mode. I use Emacs's tab completion instead.
eshell, at least in the past, is quick to involve ansi-term (M-x ansi-term) when launching a program that requires it. I recall being able to run Emacs inside of Emacs circa 2008, not sure if things have changed since then.
Eat is an terminal emulator supporting eshell, written in elisp. It also supports full screen programs. It claims vterm is 1.5x faster, though, but that eat doesn't flicker while vterm does.
I haven't noticed vterm flickering, or maybe I just don't notice?
Wrapping one's head around the difference is IMHO the first step into grasping why emacs sticks around after all these decades.
Every text editor I know of makes its edits to an in-memory copy of the file. If interactive edit commands operated directly on the file, the Save command would make no sense.
Emacs calls the in-memory copy a buffer. (VSCode calls it an editor.)
It's a subtle difference, but I think emacs's decision to call them "buffers" (though it makes the editor a space-alien by modern standards, that much harder to learn) makes more clear that the user should have no expectation that any of the buffers ever get backed to long-term storage. Once one wraps one's head around that, a lot of things get much easier (including and especially writing document editing functions; where most systems would have you store blobs of text in string variables, emacs really wants you to pop up temporary buffers and manipulate them like any other buffer, with the added benefit that if a function fails mid-execution, the regular buffer editing tools make it easy to inspect the failed state).
It is a direct manipulation interface based around interacting with text. The buffer is where it happens. "Files" or "documents" can be in those buffers. But so can textual sessions of many other kinds.
This subtle difference becomes relevant for example when working with multiple views on the same buffer. In VS Code, those views are only getting synced when it's a file on space. But open a new editor without an associated file, and every new view on that content, will become an independent copy.
ps. I write the ocasional emacs post at https://xenodium.com
Thanks for sharing your content too!
he's also behind dash.el (clojure fp builtins for emacs)
I'm pretty sure when he wrote all of that stuff that he'd only been using Emacs for around a year. The benefit of someone that talented, or groks Emacs immediately, and is familiar enough with the outside-ecosystem to know what he wants to borrow, I suppose.
Does anyone know of a good source of "programming vocabulary" made to add to spellcheckers?
One of the more utilitarian examples is the use of Indirect buffers. You can, for example, create an indirect clone buffer of a file, narrow some portion of text in the original buffer, and in the cloned buffer, move the cursor to a different location. And then work with two buffers as if they're related to completely different files - narrowing, widening, selecting and deleting things. And when you save, the changes from multiple places get reflected in the same file. The total bananas about this stuff is that you can change the major mode of the indirect buffer. That for example, lets you edit comments in e.g., python code containing json snippets having highlighting, syntax checking, etc. for json, as if the underlying file is not .py, but .json.
This is straightforward when you just think of buffers as being source files in your IDE, but it's not limited to that - you can also complete from a dired buffer, or your compiler output buffer, or your REPL. So you can get a filename to expand, even though no source code file actually contains that filename. If instead of dired and compile-mode you were using a separate file manager, and a separate terminal window to compile, you'd have text in three separate programs and no expectation that the text editor in your IDE would be able to see the other two.
So sometimes I'll prepare one buffer with a list of lines that are basically meant to provide input to a macro for editing another buffer and have the macro constantly jump back and forth between them. (E.g., move to a spot in the "edit" buffer, jump over to the "input" buffer, kill the next line, jump back to the "edit", yank that line, etc.)
C-x r k
Switch to the scratch buffer (think there's a missing RET at the end) C-x b *scr C-I
"Yank" the "rectangle" saved in the first command C-x r y
Moves to the start of the buffer and sets a "mark" M-<
Literals that are entered at the start of the buffer (+
Move to the end of the buffer M->
Another literal )
Executes the buffer (or at least the LISP expression at the cursor). Note the scratch buffer allows you to type arbitrary LISP stuff and execute it with C-j. C-j
So, suppose the initial buffer contained 1
1
2
3
Then the scratch buffer would get turned into (+1
1
2
3 )
And when executed this would add the list of numbers and look like this: (+
1
1
2
3)
7In vanilla emacs you need a RET, but I bet that like many people, OP's using a mechanism that will just select the matching item if there's a unique match, rather than the built-in buffer selection mechanism.
I use ido (with flx-ido for fuzzy completions), and it works for me as stated: C-i in the minibuffer runs `ido-complete`, which selects the unique completion if there's only one. (By default, that is, this is emacs and so of course there's a variable `ido-confirm-unique-completion` that you can set to customize this behavior.)
M-x calc-grab-rectangle RET V R +It's far too common that the interface an IDE gives you for something like adding a watchpoint is "type an expression into this small area in a dialog box, using a restricted subset of my text-editing features".
I sometimes think the main attraction of print-style debugging is that it doesn't do that to you.
for extra fun, it combines well with multiple-cursors or visual-regexp-steroids, at which point bulk renaming is basically a game.
(grep-apply-setting
'grep-find-command
"rg --no-heading ")whenever I get into netrw I always have to lookup its special bindings to create/rename. I'm jealous :P
It's amazing how Emacs utilizes buffers to offer a very powerful and consistent user interface.
I think some other compelling examples are compilation-mode and magit.
Org mode has custom templates for capturing org agenda items. I've made a "TODO code comment" capture template that I can execute on TODO comments. Once executed the template creates org-mode entries which are added to the calendar and link to the comments file and line number.
(defun capture-comment-line (&optional line)
(let ((c
(save-excursion
(save-window-excursion
(switch-to-buffer (plist-get org-capture-plist :original-buffer))
comment-start)
)))
(while (string-prefix-p c line)
(setq line (string-remove-prefix c line)))
(comment-string-strip line t t)
))
(setq org-capture-templates
'(("C" "TODO code comment" entry (file+headline "~/org/brain/code.org" "Tasks")
"\* %(capture-comment-line \"%i\")\n %a"
)))Well, I recently encountered a situation where "everything is a buffer" was not good. I had a Common Lisp SLY REPL buffer open and was testing out INSPECT[3]. This puts the REPL in a state where after printing some text it waits for key presses but that's not obvious and I'm using evil mode so q (for quit) just starts recording a macro and I can't enter insert mode because Emacs thinks the buffer is read only. I could only kill the buffer and start anew (while avoiding INSPECT -- turns out SLY has nice inspection functionality of its own but I shouldn't have to know to avoid running some function in the REPL!).
Surely there are some workarounds or bugfixes to be had but the whole REPL-is-a-buffer feels very rough around the edges.
[1]: https://news.ycombinator.com/item?id=34380373 [2]: https://news.ycombinator.com/item?id=34375137 [3]: Specifically: (inspect *)
You still have to right-click on it, then select from the list, then click again. You cannot bind any keyboard key for that specific action, you cannot replace it with a spellcheck engine you like, you can't search and replace multiple things based on regexp, no multiple cursors, no vim-like navigation, you can't change things in nested dirs without going inside, etc., etc.
What's the point of your comment here, I honestly don't understand. It's as if we were discussing femtosecond laser (or plasma blade) capsulotomies (eye surgeries), and you'd be like "one French fella invented a method for this shit sometime in 18th century using nothing but a sharp blade..."
Acme does similar things letting you manipulate the tag line, or body of a given window.
"Everything is a file" can be a nice interface even at the widget/application level.
"Everything is a buffer" in Emacs likely enjoys the same benefits (and predates Plan 9 and Acme)
Maybe I try again in my next vacation, when I will get some free time.
Seems to be that Wdired is just a hack that represents file and directory metadata in a textual format (in a buffer in Emacs parlance). It's not obvious to anyone that editing a filename in this buffer actually goes to the file system and changes the name of the file. It's even less obvious that removing rows removes files or directories. It actually sounds rather dangerous to use.
This is not functionality that emerges from some elegant design of Emacs, it seems it's just a hack.
Second, it doesn't actually make any changes to the file system until you hit the key combo to commit them. And the files aren't deleted immediately, even when you do commit; they're just flagged for deletion in the standard Dired interface. You'll have to hit a button to actually "expunge" them from there, and that asks for confirmation again before doing so.
Think of Wdired more as a convenient way to build up a transaction of FS changes.
And since everything is a buffer, undo works just fine until you commit it. Or you can load up fresh Dired view of the original metadata in another buffer and ediff them to verify your changes before you commit. :-)
For example, 雈, code point #x96c8, the chinese-ctlaub input sequence is missing. I'd like to update chinese-ctlaub with the reading "woon4".
See https://humanum.arts.cuhk.edu.hk/Lexis/lexi-mf/search.php?wo...
Here is the emacs lisp configuration.
1
2
3
4 ;; --- create readings table
5
6 ;; #!/bin/sh
7 ;; M='path_to/unidata/Unihan_Readings.awk'
8 ;; X='path_to/unidata/Unihan_Readings.txt'
9 ;; Y='./uni-unihan-readings.el'
10 ;; awk -f "$M" "$X" > "$Y"
11
12
13 ;; --- readings table to load
14
15 ;; (defvar readings-table
16 ;; (make-char-table 'readings-table nil)
17 ;; "Char table of definitions for East Asian characters.")
18 ;; (aset readings-table #x340C "a tribe of savages in South China")
19 ;; (aset readings-table #x3416 "㐖毒, an old name for India")
20
21 ;; --- keybindings to locate definition or key sequence
22
23 (load "~/lib/emacs/x/Unihan_Readings.el")
24
25 (defun x/define-char ()
26 (interactive)
27 (message "%s" (aref readings-table (following-char))))
28
29 (defun xb/quail-show-key ()
30 "Always apply quail-show-key to chinese-ctlaub input method."
31 (interactive)
32 (if (string= current-input-method "chinese-ctlaub")
33 (quail-show-key)
34 (progn
35 (set-input-method "chinese-ctlaub")
36 (quail-show-key)
37 (toggle-input-method))))
38
39 (defun xxb/quail-show-key ()
40 "Always apply quail-show-key to chinese-py-b5 input method."
41 (interactive)
42 (if (string= current-input-method "chinese-py-b5")
43 (quail-show-key)
44 (progn
45 (set-input-method "chinese-py-b5")
46 (quail-show-key)
47 (toggle-input-method))))
48
49 (add-hook 'text-mode-hook
50 (lambda ()
51 (define-key text-mode-map (kbd "<f1> <up>") 'x/define-char)
52 (define-key text-mode-map (kbd "<f1> <right>") 'xb/quail-show-key)
53 (define-key text-mode-map (kbd "<f1> <left>") 'xxb/quail-show-key)))
54
55 ;; (setq view-mode-hook nil)
56 (add-hook 'view-mode-hook
57 (lambda ()
58 (define-key view-mode-map "w" 'x/define-char)
59 (define-key view-mode-map "a" 'xxb/quail-show-key)
60 (define-key view-mode-map "d" 'xb/quail-show-key)))
61
62 (dolist (charset '(kana han symbol cjk-misc bopomofo))
63 (set-fontset-font
64 "fontset-default"
65 charset (font-spec :family "BabelStone Han" :size 28)))Whenever I had a question or felt like whatever I'm doing is taking too long or does require repetition, or simply annoyed me for any reason, I would add a new item to that list.
Slowly I learned Org-Capture, which allowed me to add items to the list much faster and without switching contexts. My list kept growing, and that forced me to learn more efficient ways of finding stuff - e.g., Org-Agenda, scheduling, deadlines, etc.
Some items, over time, have become irrelevant so I learned how to archive them. Some problems required basic knowledge of Emacs-Lisp, so I started using Org-Babel to have source blocks where I would write and play around with tiny (and sometimes bigger) elisp snippets. That lead me to the discovery of indirect buffers and I realized how amazing they are.
That single .org file had become a very important part of my life. I started using it for other things, not just to learn Emacs and Org-Mode. By the time I discovered Org-Roam and jumped into Zettelkasten, I was doing pretty much almost everything I do on the computer, in Emacs. Today I write code, check email, browse articles and blogposts, manage all my files, read books, extract subtitles from videos (to take notes), and keep my personal journal - I do all that in Emacs. And it all started with a simple .org file.
Eventually, this approach become my personal philosophy, my absolute recipe for any problem in my life - If you need to solve something, start with a simple list.
Would you rather spend the next weekend learning Emacs, or a React library no one will ever use again in 6 months?
In this case I would use Text Extractor (part of M$ PowerToys) and Google Translate.
I always take these kinds of statements with a grain of salt. Please don't get me wrong, perhaps, you had objective reasons to move from Emacs. Maybe you thought they were objective reasons, even though they weren't as such. I spoke to many "former Emacs users", and in most cases, it usually turns out that either: the person had shallow exposure or limited knowledge, or they've never attempted to learn modern Emacs packages and how they can interoperate. In most cases, they've never written a single Emacs package to solve their personal use cases, let alone publish one for the public.
I'm not saying that Emacs cannot reduce productivity. Oh, no, it very well can. And very often it drags you into the rabbit hole of "improving your workflow". It can be extremely frustrating, even for someone "after years of using Emacs" to attempt to fix a simple problem as the desired placement for a window. The complexity of choice can be exhausting. Especially, at moments when you're "in the zone" of trying to solve an unrelated problem. Emacs can get in the way. And most people just can't find the discipline to continue. Often they'd give up, without even trying. And the "novelty bias" of using different IDE creates an illusion that they have wasted time with Emacs.
The truth is - learning Emacs is a journey. You just need to keep going. And at some point, you may realize that there's simply nothing better than Emacs out there that can simplify your workflow and increase your productivity when dealing with textual information.
- Emacs has a better search. It offers way too many different ways for searching things - locally, remotely, recursively, partially, contextually, dynamically, etc. With filtering the results and sifting through and editing at the same time.
- It has some amazing window manipulation capacities. You can precisely control how, where, and what gets to show up on the screen, without having to constantly move things around, drag and resize with the mouse.
- Its extensibility simply cannot be matched. I just can't imagine anyone building let's say an InteliJ plugin, with a command that calls a function defined in a different plugin but also redefines some specific calls in that function to its internal, private methods. In Emacs, I can pick a function defined (for example) in Magit, look at the source code, and tell it to redirect its internal, private calls to my own substitute, whenever it gets called.
Emacs not only improves productivity. It brings joy to the process of writing. Writing just anything - text, math formulas, or code. But getting to that point is not quick or straightforward.
And of course, just like anything, Emacs is not a universally guaranteed tool to make you more productive or happy. Some people just "don't get it", and that's quite all right. But for many, there isn't a better alternative. You can offer a myriad of other tools claiming that the combination of them makes you insanely productive, and to that, I would say: "great, I'll delegate some calls to them from within Emacs..."
You may say it's purely anecdotal. Even label me a confirmation bias gull. But let me tell you my "anecdote". I've been programming for over two decades, and until around 2013, I was just like you. I've never seen anyone using Emacs. I've heard about it. I read some news on the Internet but have never seen it in the wild. And one day, I took a flight from New York to San Francisco. My next-seat guy opened a laptop and started typing things in Emacs. I just couldn't help it. I pretended to be asleep and kept peeking. After forty minutes of that lame game, I simply couldn't hold it anymore and started asking questions. Until that point in my career, I haven't seen anyone coding like that guy - without googling things; without StackOverlfow; without constantly jumping between documentation, terminal console, utility apps, and the editor. It was all in one place. It was clean and strangely ascetic - no toolbars or menu, no icons, no progress bars, no multitude of numbers indicating different things. Another thing that fascinated me was how easily he manipulated window panes using only the keyboard. Clearly, he was "in the zone" - it seemed as if he had zero context switching. That was very different from how I wrote code and most of my colleagues as well. And he wasn't using some esoteric, little-known language. He was writing in Golang. I didn't know it; still, it wasn't some completely alien thing to me.
That flight, though, wasn't enough to inspire me to try Emacs. Soon enough, I forgot about it. Three months later, I made a jump in my career. At my new job, there were a handful of Emacs users. I learned many new things from them (unrelated to Emacs). And that's when I installed Emacs on my machine for the first time. It still would take me another two years to transition. A year later, I got a great offer and bounced again. Better salary, a better workplace, a more prominent company, different kinds of challenges, tougher team - plainly an upgrade from every perspective. In this team, I had more than two dozen developers using Emacs. And that turned out to be a reoccurring pattern for me. With every new team, the more experienced and seasoned developers in it - the chance for more Emacsers would increase. In my current team, most of the devs (more than a few dozen) use Emacs. We have exactly one person using Neovim (there were two, but one left), one VSCode, and a single IntelliJ person. There are probably more non-emacs people here, but in the groups of my immediate proximity, there's an uncontested Emacs majority.
No, I'm not saying that non-Emacs users are lesser and that every self-esteemed coder absolutely has (at least) to try Emacs. Or that it is guaranteed that Emacs would make you a better programmer. No, no. I'm not saying that. It's just, ... In my (of course, totally subjective) empirical experience, programmers using Emacs generally tend to be very good at what they do.
> I don't understand why you're arguing that McDonald's isn't the best
So you see? It's just like Einstein said - "... it is not always right." For you, McDonald's may feel "right" and might be "the best." Albeit, for me, it is not. Our "real worlds" - yours and mine, differ. Today they do. Tomorrow, that may change.