Emacs, how it all started (for me)

(xvw.lol)

60 points | by nukifw 3 days ago ago

21 comments

  • fileeditview 39 minutes ago ago

    A bit of advice to people that have the urge to try Emacs.

    Do not use a distribution. Yes I know.. you have read that before and then you used Doom or Spacemacs anyways. That's me in the past. And it never worked out for me. I always ended up trying to configure things and the whole setup was too complex for me, so I failed.

    Over the last 10 years I have been a heavy (n)vim user but I tried Emacs multiple times. Always a distro. It never worked out. Now over the last year I was trying Emacs with a vanilla setup and configured everything from scratch. With the AIs this is super simple because they can help you get out of config trouble.

    The experience was way better than before. After my one year experience I have switched back to neovim but I still have become a fan of Emacs and I have adapted my nvim config. Stuff like dired, magit, compile-mode I have found equivalent nvim plugins and use them now.

    • widdershins 19 minutes ago ago

      Agreed. Work through the Emacs tutorial to find out how vanilla editing works. Then look at buffer management, window management (Emacs 'windows' are actually more like frames in other apps) and simple tooling like search. Then start to tweak some settings in your config, find the bare minimum of packages you need to scratch your worst itches (for me: Vertico, Corfu, Avy and Dumb Jump). Finally, figure out tree-sitter modes, project/projectile mode and a couple of other foundations.

      It will be a struggle. It was around 2 months before I felt remotely comfortable in Emacs. And nearly a year before I really felt at home. It's a long road, but gradually you mold the editor to yourself so tightly that you'll never be able to go back. The remarkable thing is that the progression never stops. The tool just keeps getting sharper and sharper.

      • fileeditview 9 minutes ago ago

        Yep. I also forgot one important point. If you come from vim, like myself, you should probably use evil-mode right from the start and then just get used to a few important Emacs shortcuts over time and use them additionally to your evil keymaps.

        No one will ever convince me that there is something better than vim mode for editing text (or comparable modal editors).

  • bitwize 3 days ago ago

    It was always like that before about 10 years ago. You're getting your feet wet in programming, learning about free alternatives, and you learn that all the world's legendary hackers become proficient in one of either vi (vim) or Emacs. So you dig in and you find that, as your awareness of programming languages grows, Emacs is a "good-enough" solution for working in nearly all of them. (Vim is too, but maybe a bit less so in 1995 when I was starting out.) And if you want to program effectively cross-language, there's nothing you can do but lock the fuck in and learn your editor's idiosyncrasies, shortcuts, and programming/customization features.

    These days we're all spoiled by Visual Studio Code, Zed, even things like Geany and Notepad++. So it makes less sense for neophytes to start with something as ancient and idiosyncratic as Emacs, and Emacs does not enjoy nearly the prominence or mindshare it had decades ago. (Though I understand its absolute user base has grown.)

    • greggroth 3 days ago ago

      I used vim for about 15 years and emacs for the last 6 or 7 and never has it been easier to emacs. For years it was searching Google, blog posts and manuals for "how do I do X in emacs?" and now it's trivial to ask AI. I always have a Copilot session open in my emacs config so it can tell me how my emacs does something and can update my config for me.

      • neutronicus an hour ago ago

        > I always have a Copilot session open in my emacs config

        Using gptel? Or something else?

    • cmrdporcupine an hour ago ago

      For me what I found was that on early 90s telnet-accessible Unix systems the only pre-installed or easily installed editor that actually let me use... luxuries... like arrow keys and backspace was emacs. Vi was always there but modal editing repulses me and it also didn't work with arrow keys and the like. (I've never understood the fixation with avoiding them in favour of repurposing letter keys, something that is just a holdover from the very anemic terminal keyboard that vi was first developed on.)

      Emacs was literally the sanest option unless you could bribe the sysadmin into installing "joe" or similar. ("pico" and "nano" came later).

      The other thing is back in the day emacs was often a good option for running clients to connect to things like IRC or MUDs or MOOs, and even Gopher and the early web. It was also an excellent news and mail reader!

      And so I used emacs as a general text editor and MOO and IRC client long before I ever used it for writing source code really (for which it was also obviously very good).

      • bregma 15 minutes ago ago

        > I've never understood the fixation with avoiding them in favour of repurposing letter keys, something that is just a holdover from the very anemic terminal keyboard that vi was first developed on.

        It's a holdover from the days when people used to type without looking at their keyboards or waste time and effort taking their fingers off the home row to find and stab around with some kind of multi-axis valuator device sitting on their desk somewhere.

  • lanycrost 2 days ago ago

    I moved to nvim from vim and it's seems me to easy and handy for everyday use. While emacs like rocket since :D

    • iLemming a day ago ago

      Emacs is most definitely not a rocket science. The problem with people trying Emacs is that they approach it just like any other text editor, instead of understanding the grand, core principle of it - Emacs is first and foremost a Lisp interpreter with a built-in text editor and not the other way around. Therefore it makes much better sense if you approach it from a Lisp perspective. Alas, many, perhaps most, beginners try it after hearing how "powerful this Emacs thingy is", and try to learn "editor features", instead of focusing on the Lisp side of things. Some even admit that they don't like Lisp and don't understand it and plan to never deal with it. Most posts of "abandonment" and "I switch to VSCode after decades of Emacs use", after closer examination, reveal that the person perhaps never even written any elisp code - at most, they'd just [almost] blindly copy&paste existing snippets into their configs.

      • jr_isidore 20 hours ago ago

        No one, including yourself, approached emacs from a Lisp perspective.

        • vkazanov an hour ago ago

          I did.

          After learning the key bindings, I actually found a library book on a pre-CLisp dialect of lisp by some finnish authors and wrote a tool i later used to write my thesis in electrical engineering.

          The tool was parsing my matlab files and generated latex, which i then made into the final pdf, complete with formulaes and calculations.

          So instead of writing a decent thesis, i learned about makefiles, latex, emacs lisp and the fact that parsers are very interesting.

          Also, Lisp felt sooooooo out of this world after pascal, C, Cpp.

          Surely, i did not work a single day as an electric engineer.

          PS I keep looking for this book to this very day

        • iLemming an hour ago ago

          And that's why it cost me two-three years of wasted experience. Looking back, I wish I had focused more on understanding Elisp, learning edebug and the built-in profiler. My bona fide Emacs journey began only after I started writing Elisp without fear.

      • saltcured 40 minutes ago ago

        Heh. In the early 1990s, I got initiated to the basic Emacs key bindings and editing UI via JOVE for a Scheme programming class. JOVE didn't have elisp behind it, instead being light enough that scores of students could all be running their own editor session and Scheme interpreter processes on the same memory-starved, multi-user server.

        I'd already known Common Lisp from a prior class, which mostly used some Mac based REPL. Shortly after, I had real Emacs and various CL and Scheme runtimes on my Linux PC. Scheme was my obsession at the time. A lot of my pathway into CS was puzzling over what it would take to implement a Scheme runtime. But, I felt no desire to get into the bizarre-to-me elisp dialect. It just felt gross.

        Probably because of early years using shared terminal server rooms and hosts, I also learned that over-customization just became a pain when I had to move between environments. I ran the Emacs that came bundled with my Linux distro, with the extensions that came packaged along with it. Mostly I just tried to have Xresources to get my preferred color scheme and text fonts.

        From all of this, I'm nearly some kind of old school Unix fundamentalist. I've never wanted an IDE. Or rather, my IDE has always been the host OS, shell prompt, filesystem state, and other terminals. I use adjacent shells to run builds, tests, debuggers, version control, etc. Emacs is just my editor. I've never, ever wanted any editor to subsume my OS, window management, and these other tools.

        My favorite interface feature is creating several "frames" (separate X windows) viewing into the same buffers. Sometimes several files side by side, and sometimes several editing viewports on the same file. I also use the X based menus to find many esoteric features or session settings for which I would never memorize the command names.

        But, when I am forced to run Emacs in text terminal mode, I revert to thinking of it like JOVE. I'd rather open multiple terminals (and SSH connections, when remote) and have each one run its own ephemeral Emacs instance with one buffer for a brief foray into one file. Somehow, I've never had the urge to fire up an Emacs server to share state between these. I just find my way back to a proper graphical Emacs when I want that kind of complex editing session.

        The only Emacs modes I use are for syntax highlighting and auto-indentation. I also never wanted Emacs "windowing", i.e. text terminal muxing. For me, learning to kill accidental window splits was roughly the same need as learning how to exit/abort out of accidentally launched vi. Repulsed, I head for the exit!

        My favorite editing features are just search, find-replace, and find-replace-regexp. But search is mostly just a fast-scroll to me, jumping forward or back to text I know is there. If I'm really searching, I more likely mouse over to a terminal window and run find and/or grep from a shell. My favorite advanced editing feature is buffer-compare (Ediff), which I use for merging changes between two files in side-by-side frames.

        Oh, and I despise the GNU infos-style help system too. I much prefer manpages, or secondarily reading docs in a web browser.

  • tempfile 2 hours ago ago

    I've been trying emacs for a while. People keep saying it's self-discovering and I have no idea what they mean. Am I missing part of the manual? I google stuff when I don't understand, like any other piece of software. I've never managed to successfully use the help system to find anything.

    • tikhonj 2 hours ago ago

      The neat thing with Emacs is that the core concepts of the system are all first-class programming entities with their own documentation. So if you want to know what your current mode does, you can use C-h m to get a bunch of information including commands, key-bindings and links to code. If you have a key command, you can use C-h k, enter the keys, and you'll see exactly what function that command runs. You can get info about functions with C-h f and variables with C-h v; coupled with some kind of fuzzy-find-autocomplete (which, unfortunately, isn't set up by default), it's usually pretty quick to find the functions and config options that are relevant to whatever you're trying to do.

      I still use web searches to look up Emacs things occasionally, but the built-in help commands are still useful because they're naturally tied to (and organized by) the core code entities that power Emacs.

    • jerf 36 minutes ago ago

      It's self discovering... once you figure out how to use its very eclectic by modern standards mechanisms for discovery. No sarcasm. Learning how to use it is a skill you have to actively acquire. This is more a criticism of emacs than of you.

      That said, I've been using it for... uhh... about 30 years now, and I've honestly never picked this skill up myself very much. I can only use it minimally. Just googling is fine, and as others have commented today (although maybe in that other thread about emacs), AI makes it even easier because it can just straight up write the modifications for you if you need them.

    • iLemming 36 minutes ago ago

      > I have no idea what they mean

      Emacs can "describe" anything contextually. Describe current mode, character at point, specific command, any variable, etc. With Wilfred/helpful it gives you even more stuff. If you're not sure what's the exact symbol/command/mode name you're looking for, there are 'apropos' set of commands. Also, absolutely learn Info and how to navigate it - it's enormously descriptive and very useful - it beats googling stuff up, because a) it works offline b) it gives you more accurate info about your current system.

    • matthew-craig 2 hours ago ago

      Having a good completion package (e.g. `vertico` + `unordered`) goes a long way to finding stuff. I regularly find new functions and variables by calling describe-function and describe-command and just searching/auto-completing my way to what I need. It gets even better with the `helpful` package which improves the layout/features of help pages a lot.

    • hollerith an hour ago ago

      I learned Emacs before search engines and can develop Emacs software while disconnected from the internet. My point is that Emacs is more self-documenting than most things.