reddit / emacs

I'm switching to emacs from neovim

SnooPets20 · 2022-07-30 05:37
Hi, I'm very new to emacs and I'm having a hard time understanding it. I'll eventually learn things, but there's a couple of pet-peeves I have that I'd appreciate someone to clear up. First, emacs seems to litter my config folder with its own stuff. I want this folder to be backed up in my dotfiles repo, and I don't want extra stuff in it. Neovim for instance uses the config directory as "read only". It reads the configuration, and anything that it needs to save (like swap files, plugin data or even the plugins themselves) go into the `.local/share/neovim` directory. This is neat because it keeps the config tidy. Is there any way to make emacs do that? Second. Emacs vs Doom Emacs. I've seen people recommend Doom Emacs a lot. On the neovim world, we also have these distributions that come with a lot of things set up, like AstroVim, NVChad, Spacevim, Lunarvim and others. I'm generally against them, since I prefer to make my own config from scratch so I properly learn and understand my editor, which is the most important part of it all if I want to extend it (and I do). So, I discarded Doom Emacs. But I heard that it's not just a collection of configs and plugins. The Doom Emacs guys have actually improved emacs and optimized it to make it faster. This is something I would lose of course if I don't use Doom Emacs, but at the same time I don't want to have all of their configs, I want to make my own. Are these optimizations planned to be added to stock emacs? Are they good enough to be the main selling point for somebody? Third, about evil mode. I absolutely hate emacs keybindings. Everything is done with control, which is out of the way and it's really clunky. On the other hand, I absolutely adore vim's keybindings. Evil mode seems to work wonderfully, but my question is, do I still have to do things the "emacs way" even with evil mode installed? I've noticed that some things (like scrolling with C-u) don't work with evil mode, and emacs takes over in those cases. Is it possible to control emacs in its entirety with only vim keybindings? Since we're in the topic of scrolling, does emacs support smooth scrolling? And lastly, about it's "deamon" mode. Is it really necessary to have an emacs deamon running in the background at all times? Is it resource hungry? Why is this needed at all? Is emacs that bloated that it needs to be preloaded to work efficiently? It kinda irks me the wrong way. Other than that (in the meantime) I really do like what I'm seeing. The prospect of being able to do most of my work through emacs is exciting. It's like an even more extensible neovim, to ridiculous levels even. There's people using emacs as their window manager, that's just insane to me. Well, hopefully it's not too much of a pain for some experienced user to answer these questions. Thanks!
kigas2 · 2022-07-30 05:50
Im in the same situation as you but just a month ahead. Regarding evil mode its relatively easy to emulate vim bindings to the point where I personally dont notice for example C-u has a variable along the lines of evil-want-C-u-scroll. The only real time i had to switch to emacs mode was when a package doesnt support evil which is also pretty easy to patch yoursef
PhantomSeahorse · 2022-07-30 06:07
I just migrated many of my configurations into a separate file to declutter! You want to use the "Customize" functionalities like `M-x custom` or `M-x custom-group`. Put this at the beginning'ish part of your `init.el`: ``` (setq custom-file (concat user-emacs-directory "custom.el")) (load custom-file) ``` And now all the customizations will be dumped into this file instead!
PhantomSeahorse · 2022-07-30 06:10
Can't speak about Doom emacs's optimizations, but I have been using emacs with native compilation and it has been pretty snappy for me.
SnooPets20 · 2022-07-30 06:16
What do you mean by customizations?
PhantomSeahorse · 2022-07-30 06:26
Just what it sounds like. They are parameters that tweak how some mode looks/works. Some of them are simple stuff like font colors, etc., but they can get complicated too taking arbitrary elisp expressions. Type `M-x customize-face RET default` to see an example. I just reread your post and you seem to not want the config FOLDER to stay clean for git? In that case have you considered just using a ,gitignore file?
SnooPets20 · 2022-07-30 06:35
I want my config folder to contain just my configurations, nothing more. Currently, I have only written a couple of lines in my `init.el` file, but look at all the junk that appeared anyway: https://i.imgur.com/iWkua4F.png Even worse, the `init.el` file itself has extra junk too: https://i.imgur.com/iI6BNYU.png I do not want those extra lines either. Quite simply, I want the config folder to be clean, and my config files to be clean. My config files shouldn't contain anything that I haven't explicitly written, and all of those other files and folders should be stored somewhere else. For comparison, look at my config folder for neovim: https://i.imgur.com/DL1ajNl.png I've manually written every single one of those files. I know exactly what each ones contains, and none has a single line that I haven't written myself. That's how it should be. Now I can safely add this folder to my dotfiles repo, and all is good. Currently, I can't do the same with emacs, since all those other folders I don't mind keeping, and the modifications made to my config file would pollute my commit history too.
rockatanescu · 2022-07-30 06:56
>And lastly, about it's "deamon" mode. Is it really necessary to have an emacs deamon running in the background at all times? Is it resource hungry? Why is this needed at all? Is emacs that bloated that it needs to be preloaded to work efficiently? It kinda irks me the wrong way. I assume that the daemon mode was quite useful a while ago, as the startup time might have been considerable if you had a lot of packages installed and emacs had to load them at startup time. With today's computers it's pretty fast, especially if you're using native compilation. I think the main reason nowadays for using daemon mode is to store your session (your buffers or even whatever's in your kill ring). It's like using vim + tmux, but all built into the editor.
worthless-trash · 2022-07-30 07:25
Wait, is all this in your \~/.config directory, because that is WEIRD. It should likely be in your .emacs.d/ directory. I guess its possible to put it somewhere else though..
SnooPets20 · 2022-07-30 07:28
Yes, it's in .config. I don't want to pollute my home directory. Emacs supports loading my config from the .config directory, so I'll obviously prefer it. Why would anyone want otherwise is beyond me.
worthless-trash · 2022-07-30 07:35
Ah, so you've customized your init.el. In that case you seem to know your own answer, you can specify exactly where you want to load your configuration from, you can put the rest of the emacs loadable runtime wherever you want. Then you can just backup your customized config. Easy. (setq user-init-file "/home/yourname/.config/emacs/whatever") (setq user-emacs-directory "/home/yourname/someplaceyoudontcareabout") (setq default-directory "/the/dir/you-want/emacs/to-start/in") (setenv "HOME" "D:/my/home/directory") (load user-init-file) etc etc. Edit: TIL putting files you use for your runtime is polluting your home directory.
ir210 · 2022-07-30 07:36
That extra lines in your init file is what u/PhanthomSeahorse meant by customizations. Emacs and some of its packages need to put those files somewhere. Most of the times, there are variables that you can set to tell emacs or a package to write its file(s) somewhere else. I would do it the other way around, though. I would move my config somewhere else instead. My init.el will be very minimal. It's only job is to load my actual config file.
SnooPets20 · 2022-07-30 08:04
I didn't put anything in my init relating to config paths.
worthless-trash · 2022-07-30 08:39
I've never seen emacs use .config by default, that seems like something specific to your build or configuration, but it ain't like that in any version that iv'e seen. Edit: oooh i'm downvoted for telling the truth.
SasukeUchiha231 · 2022-07-30 10:01
Hey there! I am a relatively new emacs user as well, who used doom emacs and now have my own config. Honestly, the doom emacs optimizations are really nice. With a lot of plugins, it's startup time was around 1 s, while my config has a startup time of about 3s. If the startup time matters a lot to you, then you might want to consider doom emacs. The doom emacs optimizations don't really optimize the core emacs, it just optimizes how plugins and keybindings are loaded, so they would never get added to emacs itself. Also doom emacs has an excellent collection of plugins for most popular languages and use cases, so even if you don't use doom emacs, you can always refer to it for any plugin that you might want.
deaddyfreddy · 2022-07-30 10:25
> The Doom Emacs guys have actually improved emacs and optimized it to make it faster. doom is just a configuration, nothing more > And lastly, about it's "deamon" mode. Is it really necessary to have an emacs deamon running in the background at all times? no, but it's very handy to have quick access to the same instance of Emacs on your fingertips. You can open and close Emacs windows when needed, without loosing its state. I have a system-wide shortcut for `emacsclient -c -a ""`, so it opens a new Emacs window even if daemon wasn't started before (see `-a ""`). > Is it resource hungry? unless you have a hardware from the 00s - no, it's not > Is emacs that bloated that it needs to be preloaded to work efficiently? While Emacs contains a lot of built-in plugins, it doesn't load them in any way by default. So plain Emacs starts in a fraction of a second even without a daemon. When you add more plugins to your init.el, it can take more time depending on your configuration, so if it's done inefficiently - starting time could be seconds (from some people, especially on Windows, I've heard about dozens of seconds). But there are pretty cheap ways to optimize. I use `use-package` for both external and builtin packages, and `:defer` and `:after` helps here a lot. Some people use an alternative package manager named `straight.el` which uses some hacky ways to reduce loading time even more, but for me, it's just not worth it.
karthink · 2022-07-30 10:52
### Answers to specific questions: > First, emacs seems to litter my config folder with its own stuff. I want this folder to be backed up in my dotfiles repo, and I don't want extra stuff in it... Is there any way to make emacs do that? Look up the [no-littering](https://github.com/emacscollective/no-littering) package. To keep Emacs from writing to your init file, set the `custom-file` variable. > I've noticed that some things (like scrolling with C-u) don't work with evil mode, and emacs takes over in those cases. There's an evil-mode variable to change this, search for `evil-want-C-u`. > Is it possible to control emacs in its entirety with only vim keybindings? You might want to look into the [evil-collection](https://github.com/emacs-evil/evil-collection) package. > Since we're in the topic of scrolling, does emacs support smooth scrolling? Emacs 29 does. 28.x is the current stable version. ---- ### General issues: > So, I discarded Doom Emacs. But I heard that it's not just a collection of configs and plugins. The Doom Emacs guys have actually improved emacs and optimized it to make it faster. This is something I would lose of course if I don't use Doom Emacs, but at the same time I don't want to have all of their configs, I want to make my own. There are two common mindsets when switching to Emacs: 1. I want a full-fledged IDE/task management/knowledge management system that I can just start using without futzing about with config files, and 2. I want to stitch a computing environment around my needs and fashion it to fit me like a glove. Either is fine, but you can't have both at once. You seem to lean towards the latter, so I recommend checking out Doom Emacs to see what's possible, then slowly working your way through Emacs, one need at a time. I wouldn't worry about losing out on Doom Emacs specific optimizations at this stage. This is like worrying about basketball shoes before you know the rules of the game. > Are [Doom's] optimizations planned to be added to stock emacs? Are they good enough to be the main selling point for somebody? There's no plan to add these to Emacs that I'm aware of. Doom Emacs is opinionated, and there are good reasons for at least a few of Emacs' default settings. Doom used to disable bidirectional rendering for a minor speed boost, for instance. (I don't know if it still does.) > Third, about evil mode. I absolutely hate emacs keybindings. Everything is done with control, which is out of the way and it's really clunky. When switching software, it's natural to want to replicate exactly how things worked for you before. (This is most commonly seen with Windows users who switch to Linux and look for 1:1 replacements for Windows features.) Vim-style editing is very good, but consider that the keybinding paradigm developed by Emacs over the decades might have its merits too. [Keep an open mind](https://protesilaos.com/codelog/2019-12-20-vlog-switch-emacs/). > do I still have to do things the "emacs way" even with evil mode installed? See previous point. > And lastly, about it's "deamon" mode. Is it really necessary to have an emacs deamon running in the background at all times? See point about wanting to replicate Neovim in a 1:1 way. There are advantages to having a daemon that may not be immediately apparent to you. Emacs is a big ball of state, this is both a pro and a con. Using a daemon keeps the state around and lets you do some interesting things. > Is it resource hungry? Why is this needed at all? Is emacs that bloated that it needs to be preloaded to work efficiently? It's as resource hungry as your Emacs session. Whether your Emacs session takes 25 MB or 2 GB of memory is up to what you do with it. > It kinda irks me the wrong way. Again, you have to stop thinking about Emacs as a drop-in replacement for Neovim. It does things its own way. > It's like an even more extensible neovim, to ridiculous levels even. This is backwards. Or: other platforms are frustratingly rigid and in-extensible. I've watched the Neovim ecosystem slowly rediscover ideas (like Telescope) that have been part of Emacs' design for ages. Emacs was doing things in the 90s that IDEs and web browsers have since caught up to, and there are still design ideas in Emacs that they seem to be unaware of. > There's people using emacs as their window manager, that's just insane to me. > I prefer to make my own config from scratch so I properly learn and understand my editor, which is the most important part of it all if I want to extend it (and I do). On the flip side, Emacs also has historical design limitations that makes it a poor choice for many purposes -- a window manager is one of them. Developing a sense for what kinds of applications Emacs is a good platform for takes time. Read the manual(s), read the source code, learn elisp and use it to solve your Emacs problems. Turn your solutions into packages. Don't try to replicate how Neovim works in Emacs. The design is different, the design constraints are different. Emacs is its own thing. > Well, hopefully it's not too much of a pain for some experienced user to answer these questions. Thanks! All of these questions have been answered many times over, on this subreddit and elsewhere online. Many of these discussions have been extensive. Emacs also provides extensive documentation and the means to discover customization options. Please do more research before posting.
colemaker360 · 2022-07-30 11:32
I had some of the same concerns moving to my own config - I didn’t want to sacrifice any speed. Studying other project’s early-init.el got me quickly back to Doom speeds. - https://github.com/SystemCrafters/crafted-emacs/blob/master/early-init.el - https://github.com/purcell/emacs.d/blob/master/early-init.el - https://github.com/doomemacs/doomemacs/blob/develop/docs/faq.org#how-does-doom-start-up-so-quickly
deerpig · 2022-07-30 11:44
Very good reply! As Black Adder might say, that is a "feather in your cap."
redpillchokes · 2022-07-30 11:51
What I don't like about non vanilla emacs configuration like doom emacs is that if something goes wrong you'll have a hard time figuring it out since you didn't write the configuration.
hmeh922 · 2022-07-30 13:03
https://www.reddit.com/r/emacs/comments/cwse0x/xdg_config_home_support_lands_in_emacs_master/
thetemp_ · 2022-07-30 13:54
> emacs seems to litter my config folder with its own stuff. I want this folder to be backed up in my dotfiles repo, and I don't want extra stuff in it. So create a new folder, maybe "~/.config/myemacsconf/". And put all of your Emacs settings in a file that you place in that folder. Call it "myinit.el". In the "~/.config/emacs/init.el" file, put a line that reads: (load "~/.config/myemacsconf/myinit") Back up the "myemacsconf" folder in your dotfiles repo.
cradlemann · 2022-07-30 14:11
I put all non config files to `~/.cache/emacs` `~/.config/emacs/early-init.el`: (setq user-emacs-directory (expand-file-name "~/.cache/emacs/") package-user-dir (expand-file-name "packages" user-emacs-directory) url-history-file (expand-file-name "url/history" user-emacs-directory) custom-file (expand-file-name "custom.el" user-emacs-directory)) (load custom-file :noerror) ;; Native compilation settings (when (native-comp-available-p) ;; Set the right directory to store the native compilation cache (let ((path (expand-file-name "eln-cache/" user-emacs-directory))) (setq native-comp-eln-load-path (list path)) (setq native-compile-target-directory path)) ) Also I put all temp files into `/tmp/emacs<userid>/` directory (defconst emacs-tmp-dir (expand-file-name (format "emacs%d/" (user-uid)) temporary-file-directory)) (setq auto-save-file-name-transforms `((".*" ,emacs-tmp-dir t)) backup-directory-alist `((".*" . ,emacs-tmp-dir)) auto-save-timeout 3 auto-save-list-file-name nil auto-save-interval 0 auto-save-default t auto-save-list-file-prefix emacs-tmp-dir)
cradlemann · 2022-07-30 14:18
I use vanilla Emacs with nativecomp, pgtk features and evil-mode with use-package [config](https://github.com/Crandel/home/tree/master/.config/emacs). Start-up time is less than second, so no need for daemon-client configuration.
JDRiverRun · 2022-07-30 15:15
;;;;; keep custom out of this file (setq custom-file (locate-user-emacs-file "custom-vars.el"))` (load custom-file 'noerror 'nomessage)`
balatus · 2022-07-30 16:58
I've just realised how quick that still is. I've replaced an IDE with Emacs and it's orders of magnitude quicker to start up, and does a better job for my use case. I think the shift coming from a vi clone is that Emacs is an environment, not a text editor. It sounds like neovim is an editor which is trying to become an environment (I haven't used it though)
your_sweetpea · 2022-07-30 18:59
/u/karthink has a lot of great answers wrapped up in a somewhat unfriendly response, but I really do recommend you listen to them. As an addition: I made the switch from Vim to Emacs about 5 years ago and at the beginning I really wanted to keep using vim-like editing, but I can't help but feel it somewhat crippled my usage of emacs for quite some time. In the end, I finally made the switch to vanilla bindings when I also made the switch to Dvorak, since it destroyed my muscle memory for vim when I did so (and truthfully speaking, vim's layout is very focused on the QWERTY home row, it doesn't adapt well to Dvorak) It may seem unusual to say a set of keybinds will limit your ability to learn emacs, and if you intend to use emacs in the first way /u/karthink mentions then it probably won't be an issue, but if you use evil for a while you'll find that it tends to completely "take over" emacs and make the inner workings much more non-obvious in a number of ways. The default keybinds took some getting used to after probably 10 years of using Vim, but truthfully speaking they're not too bad and you're much "closer to the metal" in so many ways. Also, one of the most powerful features of emacs is the help system - familiarize yourself with it. I don't know exactly how it's bound in Doom, but in vanilla emacs `C-h` is the prefix for the help system -- `C-h k` allows you to input a key sequence and have it tell you exactly which function is bound to that key, with rich documentation and links that will allow you to jump directly to the definition of the function. `C-h v`, `C-h f`, and `C-h o` allow you to pull up the documentation of and jump to the definition of any variable, function, and symbol (symbols include variables, functions, and other things too, like faces, which are how text is styled in emacs). If you want to open the emacs manual, run `C-h i` and look through the topics there. It's a bit dry but it's a good resource. EDIT: `C-h ?` will show all of the available help options, as well. The ones I mentioned are just ones I find useful regularly.
tonicinhibition · 2022-07-30 19:26
Everything changed for me when I discovered `perspective.el`. I still use an Emacs server for when I fat finger and close everything, but now I have several sets of buffers, sized and set specifically for certain groups of tasks. I also have my daemon mode handled in the background by Linux shell scripts. It acts as a watchdog to kill/restart the Emacs server. All I have to do after I've made my coffee is type the letter `e` into a terminal and I'm in a full-fledged IDE tailored to my needs, and it loads faster than Vim! All of my TODO lists, personal Wikis and client work are pre-loaded.
SlowValue · 2022-07-30 20:26
> First, emacs seems to litter my config folder with its own stuff. I want this folder to be backed up in my dotfiles repo, and I don't want extra stuff in it. In [Emacs documentation is a description how Emacs finds its inif file location](https://www.gnu.org/software/emacs/manual/html_node/emacs/Find-Init.html). Besides that I suspect you operating system and file system supports `smybolic links`, use them for your very custom setup wishes ....
CulturMultur · 2022-07-30 20:30
I also switched from vim to Emacs and that was very good move, I enjoy Emacs much more than I ever enjoyed vim. I'll answer your questions how I deal with it: 1. I keep my Emacs config as regular Org Roam note, i.e. file at \~/Documents/Notes/My-Emacs-Configuration.org. Then I have a file \~/.config/emacs/early-init.el which is symlink to a file in my dot files repository. Actually, after starting using Emacs, Emacs configuration is the only dot file I ever needed. Here's the content of early-init, the important part is that it tangles "emacs-lisp" source code blocks from Org Roam note into \~/.config/emacs/init.el at startup and I never touch it myself. &#x200B; ;;; early-init --- Code executed very early. ;;; Commentary: ;;; Code: (message "Loading early-init.el") ;(getenv "LIBRARY_PATH") (defun my-append-env-var (var-name value) "Append VALUE to the beginning of current value of env variable VAR-NAME." (setenv var-name (if (getenv var-name) (format "%s:%s" value (getenv var-name)) value))) (let ((gccjitpath "/opt/homebrew/lib/gcc/11:/opt/homebrew/lib")) (mapc (lambda (var-name) (my-append-env-var var-name gccjitpath)) '("LIBRARY_PATH" "LD_LIBRARY_PATH" "PATH"))) (tool-bar-mode -1) ;; Hide tool bar (scroll-bar-mode -1) ;; Hide scroll bar (fringe-mode '(1 . 1)) (setq frame-resize-pixelwise t) ;; allows maximising for the full-screen (setq frame-title-format "Emacs – %b") (setq vc-follow-symlinks t) (require 'org) (org-babel-tangle-file "~/Documents/Notes/My-Emacs-Configuration.org" (expand-file-name "init.el" user-emacs-directory) "emacs-lisp") ;;; early-init.el ends here. 2. I started my Emacs journey with Spacemacs but it wasn't good since it's not actually Emacs - you need to learn entirely new stuff on top of Emacs stuff. In the end I gave up and settled with IntelliJ IDEA for Scala development. In five years I returned to Emacs, but started from very simple [Castlemacs](https://github.com/freetonik/castlemacs) distribution, learning the meaning of each line, copying to my config only settings I needed, mostly related to configuring Emacs to behave properly on macOS. I don't bother with Doom Emacs, my startup time of 3 seconds doesn't bother me. &#x200B; 3. I started the same - with Evil, without it I wouldn't be able to switch to Emacs. But over time I found that actually vim's modal editing doesn't make huge difference, especially if working with Lisps. When I write Clojure and want to go one char forward, moving to Normal mode, then `l` and then back to Insert mode is many more keystrokes and cognitive load then `C-f`. Then I found Meow Mode and switched to it from Evil. The advantage is that you configure your modal mode yourself, at your preference. Another killer feature is that I almost always used visual selection in vim, so, `vwwwwwwd` instead of and never things like `7dw` because after like 3 or 4 items it's hard to count in advance where to stop the motion. Meow makes this by default. Also, Evil actually breaks key mapping in Emacs, regular commands for setting keybindings don't work as Evil overrides them, so I was using general.el and specify Evil mode, didn't like it. With Meow I know what keybinding is used for what and can control it. Now I'm starting to use vanilla keybindings of Emacs more and more and considering turning off Meow Mode by default. Emacs keybings are really good actually, once you gave them a chance, especially if remapping Caps Lock to Control. Most used are C-f, C-b, M-f, M-b, C-n, C-p, C-a, C-b, M-s, M-t. Note, that they mostly also work in macOS, so you can use them in macOS applications like Safari - right in this text area on Reddit I'm using Emacs keybindings. With vim keybindings it's nowhere near the adoption. &#x200B; 4. Daemon mode. I use GUI version, emacs-mac-port, with configured server mode. I rarely close Emacs, and all new files coming from elsewhere are opened in the same Emacs frame. I don't bother whether I have daemon or not.
dpoggio · 2022-07-30 20:31
Just about daemon mode. Some people wants to use Emacs as vim, nano or so. They wonder around in a terminal and then shoot emacs to edit some file. They complain about Emacs not being good at this. Emacs is not supposed to be good at that. The true power in emacs is: you don’t need to close it. I may have the same Emacs session up for like a month.
00-11 · 2022-07-30 20:36
This.
anuctal · 2022-07-30 21:05
Why did you decide to switch to Emacs?
SnooPets20 · 2022-07-30 21:19
I want an editor with a proper GUI. Neovim is great, but it has severe limitation due to running in a terminal, and mor complex stuff like the dap gui feel kinda hacky and break often. Plus, emacs would let me do a ton more stuff on top of just text editing. Being able to replace multiple programs with a single one, that has my own configuration and keybindings sounds very appealing.
lastnamebird · 2022-07-30 21:24
You don’t reboot your computer for a month? What OS do you run? I’m currently using Arch so I’m addicted to updating constantly. But would interested in moving away from this behavior if possible.
HM0880 · 2022-07-30 23:01
+1 for keeping Emacs open. My Emacs start-up time is a few seconds; I usually open one "main" instance every time I boot my desktop or laptop, and I'll occasionally open another instance of Emacs to test an `init.el` tweak.
HM0880 · 2022-07-30 23:03
Great reply. What are some examples of design ideas that Emacs has that other programs don't yet have?
dpoggio · 2022-07-30 23:39
My personal desktop runs a very customized Ubuntu, my servers are running OpenSUSE and FreeBSD. If you reboot a lot because you are addicted to it, switching to another OS isn’t likely to solve your problem though.
lastnamebird · 2022-07-30 23:56
It is the rolling update aspect of Arch Linux that results in rebooting. Obviously not doing it just for kicks. How do you like OpenSUSE?
guygastineau · 2022-07-31 00:26
You don't have to reboot arch that often. I often have an uptime of weeks on my laptop.
renzmann · 2022-07-31 00:28
You mentioned the telescope thing - I’m in a similar boat as OP and was recently wondering what the most common emacs-y version of fzf/telescope would be. Googling stuff (any stuff for emacs) usually gets me to 4-5 options for most things and it can be hard to tell what’s the most robust; do you have a recommendation?
lastnamebird · 2022-07-31 00:51
In the last month alone, the `linux` package has has 7 updates. And that doesn't include other packages where it would be smart to reboot after they are updated. I know that you don't have to update that often but to me it is a benefit of using a rolling distribution.
dpoggio · 2022-07-31 02:00
OpenSUSE is stable (Leap), well thought, and YaST makes it easy to configure easy to configure. But if you like the light and user centric aspects of Arch, then OpenSUSE may seem bloated and too user friendly to you.
karthink · 2022-07-31 02:02
Here's a very incomplete list I could recollect in a few minutes: - The [everything-is-a-buffer paradigm](https://www.masteringemacs.org/article/why-emacs-has-buffers): Gives you consistent editing across the entire environment for free, along with treats like `wdired` and `wgrep`. - GUI-agnostic design: Emacs tries very hard to work the same on a terminal emulator and in a X window GUI, see the emacs-devel archives for the amount of effort that goes into this. - The kill-ring: Clipboard managers are pale imitations. - A fully dynamic environment ([Rebooting is Dying](https://steve-yegge.blogspot.com/2007/01/pinocchio-problem.html)), - Introspection down to the C code - Function advice: Combine with the above two features to [change any behavior](https://www.youtube.com/watch?v=UP2dFk5_ytY) live. - A true Keyboard macro system that isn't limited to editing text (Feature shared with Vim) - Text properties - [Human-readable data structure serialization](https://nullprogram.com/blog/2013/12/30/), especially closures - [Recursive editing](https://www.gnu.org/software/emacs/manual/html_node/emacs/Recursive-Edit.html) - The mark+point system, plus primary and secondary selections: Turn off `transient-mark-mode` sometime and explore the possibilities. - DWIM behavior and prefix arguments - Digit arguments and registers (Feaure shared with Vim) - [The Comint system](https://www.masteringemacs.org/article/comint-writing-command-interpreter): Create a shell-UI for any I/O process in minutes (With thanks to Mickey Peterson, Steve Yegge and Chris Wellons for writing about these lucidly.) ---- #### With caveats: - Not all of these make sense for all other platforms, and there are platforms that implement one or two of these well. Microsoft Office has an extensive kmacro system, for example. - Many Emacs packages themselves don't respect these ideas, sometimes with good reason. For example, Magit/Transient disabled buffer navigation in Transient pop-ups until recently. It's off by default today as well. - Emacs is behind other modern platforms in _many_ aspects too: + No real type system, + Rudimentary garbage collection, + No multithreading (the emacs event loop has a "GIL") + Limited image and graphics capabilities, no GPU support. - There are sometimes good reasons to ignore some of these features for security reasons. Sandboxing is good in a browser but would limit my Emacs usage significantly. - Emacs has copied ideas from elsewhere just as other platforms have copied from Emacs (or independently reinvented years later). This is a good thing. Ex: Multiple Cursors, Yasnippet, LSP clients, the `map` and `seq` libraries.
codefake · 2022-07-31 02:06
Absolutely nailed it. Bravo sir.
anuctal · 2022-07-31 04:25
Great! Thank you for the answer.
_viz_ · 2022-07-31 04:27
>The everything-is-a-buffer paradigm: Gives you consistent editing across the entire environment for free, along with treats like wdired and wgrep. Unfortunately, Emacs missed out on "literally-everything-is-a-buffer" paradigm: tab-line, tab-bar, header-line, mode-line are opaque objects that do not have editable text, this is in contrast with systems/editors like Acme and Oberon where _literally_ every text that you see is editable and "executable". This gives way to some really interesting things which are in some way similar to the M-x shell experience (output -> input) and in other ways superior to the minibuffer history. Instead of searching for the command in the history like a mad man, you just stash the most used commands in the "tag window" (kind of like the mode-line) and click on it to run it again. >no GPU support. Glamor exists for Xorg I suppose.
_viz_ · 2022-07-31 04:29
> karthink has a lot of great answers wrapped up in a somewhat unfriendly response, but I really do recommend you listen to them. How is it unfriendly? Does every comment need to talk about the weather, their children, and thank their ancestry for this beautiful world before proceeding to the meat of the matter (like you see in the recipe websites and obnoxious youtubers)?
_viz_ · 2022-07-31 04:42
Backup and auto-save files are not supposed to live in a tmpfs. You lose out on viewing previous revisions of the file, and recovery of unsaved changes when Emacs dies a unnatural death.
cradlemann · 2022-07-31 05:36
Yes, I know. I prefer to save history in git and cleanup all this backups after reboot. Have 0 problems since 2016.
_viz_ · 2022-07-31 06:37
I suppose random, sudden power cuts arent a thing where you live. You're lucky.
Schievel1 · 2022-07-31 08:41
You should really give doom a chance. I went from vanilla eMacs to doom because they really are doing a wonderful job. Your vim keybindings will be there and set up so good, it’s like it’s vim. You even have most of the commands you type in with : in vim. C-u works also. It also adds much much of discoverability. I found so many good things though doom, which I just wouldn’t have known about without it. In emacs things are never set in stone. Doom gives you only sane defaults, if you don’t like what one functions is doing for example, you can define your own function and load it after that package that defines the original function. It will then just overwrite that function and use yours. Lastly you can switch to vanilla emacs later on, if you really want. I just think the learning curve for doom is already pretty steep, vanilla emacs is even harder.
worthless-trash · 2022-07-31 11:26
For those following along, the part from the diff. Here, u/file{\~/} stands for your home file, if it exists, specifies how to initialize Emacs for you. If the directory u/var{xdghome}/.config/emacs exists, Emacs uses {@var{xdghome}/.config/emacs/init.el} as the init file There we go. So making the directory makes the behavior change.
ir210 · 2022-07-31 13:54
If your search gives you helm, ivy (counsel), and vertico (consult), then you can pick any of those.
stayclassytally · 2022-07-31 14:16
I’m one of those insane people who use Emacs as a window manager, so I’ll throw in my two cents. As other have stated, for most computing uses , you may never need to leave eMacs. Emacs X Window Manager (EXWM) takes this philosophy to its logical conclusion. Imagine being about to script just about any and all tasks and interactions on your PC in a single unified interface and language. While it’s taken me a while to get my config in good shape, I now feel my WM fits like a glove. I can manage WM state, my personal knowledge base and my IDE all as one entity and extend it as needed. It’s not for everyone and it’s not without its quirks (line-mode and char-mode trip me up during use sometimes) but I’ve found it to be a good investment of my time from this end of things.
cradlemann · 2022-07-31 16:26
I use only laptops, so powercuts not a problem at all
HM0880 · 2022-07-31 17:54
Thanks! Everything-is-a-buffer and GUI-agnostic are two of my favorite features. Is "no GPU" support a limitation for a text editor? With modern hardware, Emacs uses far less RAM than VS Code or any web browser. What use-cases could GPU support provide without pushing Emacs to require ever-more high-end computing power?
your_sweetpea · 2022-07-31 18:30
Nope, but I think there's a case of two perspectives here: karthink has presumably been around the subreddit and used emacs for quite some time and his response, with its "do more research before posting" etc etc is perfectly reasonable from that perspective, but from OP's perspective they're just getting into a new thing and a clear experienced member of the community is giving them a response that comes off as admonishing them IMO, which doesn't feel good. I would say it's probably similar to the experience of going to the grocery store and making the joke "didn't ring up? does that mean i get it for free?" or something like that. To you, that's understandably a funny joke, but from the cashier's perspective it's a joke they've heard dozens upon dozens of times.
tangonov · 2022-08-02 02:17
It's not enough to have a different way to list search results, however. If you want the Telescope experience you need a fuzzy completion. I have been enjoying [fussy](https://github.com/jojojames/fussy)