1. 56

  2. 5

    I’ve used emacs for years and yet many of the named features and packages are new to me!

    1. 6

      There’s an old usenet message that said:

      Emacs has so much power that nobody will ever master it completely. You can always be a stronger user with Emacs. With a “simple” editor like pico or notepad, you will quickly master it completely, which means that it will not allow you to grow further. Sure, it will take a new user a little longer to be productive with Emacs than Pico, but by starting with Emacs he will have an editor that will grow with him for the rest of his life.

      And it seems just as true then as now. I mean, just imagine all the Elisp code never published or just lost.

    2. 5

      Started learning Emacs and Org mode the past week and loving it after that initial big hump. I tried Evil mode briefly (Vim keybindings) but ultimately decided against it, because I didn’t want to become lost if ever forced to use vanilla Emacs for whatever reason.

      Still use Vim for text editing, and graphical IDEs for coding, but Org mode is truly a godsend. It’s nice having a todo list application, and file format, that you know will be maintained forever. Moreover, the workflow is beginning to etch itself into my brain and I can already see why people are so productive with it. It can become second nature, yet continue to grow with you.

      I’m intrigued by people using an Org file to store their entire blog. ox-hugo is one Org extension that works with Hugo to generate static blogs. Will probably be my first choice if/when I get into blogging again.

      1. 2

        Are you learning from a single place? I’m interested to do the same and would like a well written source to get onboard.

        1. 2

          I started with the built-in Emacs tutorial to learn the keybindings. It’s pretty important to get started. The major exceptions being that they teach you to use C-f, C-b, C-n, C-p, C-v to move around but I use the arrow keys and PageUp/PageDown instead.

          As for Org mode, I just dove in and started trying to create a todo list for a project. Download a copy of the Org manual at https://orgmode.org because you will refer to it constantly.

          What I wish I knew starting out:

          I ended up bookmarking a few sites. Mostly because they contained a single tidbit of information I was searching for.

          1. 2

            I started with the built-in Emacs tutorial to learn the keybindings.

            Next to this, I can also recommend the guided tour of Emacs: https://www.gnu.org/software/emacs/tour/index.html

            As for Org mode, I just dove in and started trying to create a todo list for a project. Download a copy of the Org manual at https://orgmode.org because you will refer to it constantly.

            This isn’t even necessary since Org comes with a info manual that has all the same content as any document you might download, but doesn’t require an extra tool to be used. Especially helpful when copying (or searching) code snippets or evaluating elisp. Just type C-h i m [prompt opens] Org and you can start using it.

            A general tip would be, as soon as one is ready, to check out other peoples configurations and what variables and functions they use – this of course doesn’t just apply to Org but to Emacs generally.

            1. 1

              That’s very thoughtful of you, thank you for the curated links, I’ll go through them one by one.

              One little question, have you considered using spacemacs? Any reason you went for vanilla emacs?

              1. 1

                Pretty much wanted the minimal amount of configuration so I could just get started ASAP. I didn’t do any research into the different configurations since I know Emacs is infinitely customizable and I’d get overwhelmed with the amount of choices out there.

                1. 1

                  FWIW, this is (as I understand it) the goal of spacemacs - it’s all the good stuff that you could spend ages tweaking together yourself, in one mostly pre-configured bundle. So a lot more functionality than vanilla emacs, without the choice paralysis.

                  (I don’t use spacemacs, but mostly because my emacs config is 15+ years old now - eek - and I’m rusted on to some of those key bindings.)

        2. 4

          The only thing which stops me from diving into Emacs is a reliable terminal emulator. I know ansi-term, but I also know its bugs, like completely ignoring window size change and SIGWINCH forwarding.

          1. 6

            I went “full Emacs” some months ago, when I switched to Eshell as my main shell… I recommend giving it a try! I’ve not opened a regular terminal since, I think.

            Edit: the above was possible because over time Emacs has supplanted my other usages of a terminal:

            • Magit
            • mu & mu4e for email
            • ag-mode as grep replacement
            • dired for file/directory exploration
            • TRAMP for accessing remote files (as we’ve migrated to ephemeral machines without ssh access I don’t really use this any more)
            1. 2

              But you’re probably not working with numerous remote machines, mainly baremetal, with no ability to safely export configuration files / profile to the destination user. I know TRAMP, but it’s not about remote file access, but remote execution/support.

              Also, even if I want to go “full Emacs”, there are still some advanced n/curses application which I don’t or can’t leave at all, often on these “remote machines”.

              Let’s say I just want a proper terminal emulation in Emacs – ansi-term is quite close to that. but it fails in full-screen sessions (basically misinterpreting/dropping ECMA “escape” codes), as well as missing SIGWINCH forwarding I mentioned. Of course I don’t force anyone to write it exclusively for me, but I’m kinda shocked there’s still no proper support for complete VT100/VT5xx capabilities in GNU Emacs, as it’s about 30+ years old.

              1. 1

                but I’m kinda shocked there’s still no proper support for complete VT100/VT5xx capabilities in GNU Emacs, as it’s about 30+ years old.

                I think this is due to the fact that for most commonly-used ncurses programs, it’s both less work and more benefit to just write a pure-elisp frontend and skip the curses UI entirely. Obviously doesn’t work for all obscure curses programs out there, but I think that has a lot to do with why ansi-term hasn’t had these shortcomings fixed.

              2. 1

                It’s important to note that Eshell was not meant as a shell replacement by its authors, but as a way to easily get output from commands to a buffer, so it is very limited in features.

                That said, if it works for you, you do you!

                1. 3

                  Do you have a cite for that? I’d believe that was true at one point, but it’s certainly not the case any more; it is a very full-featured shell these days.

                  1. 2

                    It used to be here, but it appears to not be there anymore! I rescind my statement.

              3. 5

                That’s a rather unconventional complaint about Emacs; normally it’s the other way around (“why would I want a terminal in my text editor?”) ;)

                You mentioned ansi-term, and others have mentioned Eshell, so I thought I’d mention that I use shell-mode for most commandline stuff. It’s a “dumb” terminal and hence can’t handle things like curses, but that lets it act more like a normal Emacs buffer (e.g. I can navigate and edit the content, without the terminal or running command intercepting my keypresses). It seems to handle window size changes and SIGWINCH perfectly well (i.e. ROWS and COLUMNS get updated).

                You’re right that Emacs is pretty bad at non-dumb terminals, like with ansi-term. I don’t bother with those modes at all and use a separate terminal (st + dtach + dvtm) for things which need that, like curses applications (that’s also much faster!). IMHO the value of Emacs is to have a standard way to navigate/search/edit buffers of text (plus easy scripting). TUIs like curses are more like character-based graphics than actual text, they’re not meant to be user navigable or editable (it will mess us the display and changes might get overwritten). Likewise applications which control user interaction (e.g. capturing key presses) don’t work well with the unified way of doing things (keybindings, etc.) that Emacs imposes.

                Note that there are many ways to do things with Emacs, so if terminals are your main pain point you could try (if you haven’t already) different mixes of components. For example, you could try running Emacs inside a terminal, or inside screen/tmux/dvtm so your terminals are alongside Emacs rather than inside it. You could use emacsclient/emacs –daemon to have multiple instances connected to a single session. You mention TRAMP in another comment; note that it can handle remote shells as well as just files. This is most obvious in eshell, where we can do cd /ssh:user@remote:/home/user and carry on as normal, with TRAMP sending our commands over to the remote machine. If we’re connected to a remote machine with TRAMP (e.g. in eshell, or dired) when we run M-x shell the resulting shell will be running on that machine, and things like tab-completion for filenames will be sent over TRAMP.

                1. 2

                  This is probably the most comprehensive answer I’ll find in the web to this date, thank you :)

                  But, in shell-mode (M-x shell) $COLUMNS and $LINES aren’t updated at all. However, they do in M-x eshell. Pretty weird considering that first one knows a bit about ANSI/ECMA, while eshell does not.

                  TRAMP is a very nice tool even if I didn’t knew about remote execution, but now seems to be even better, thanks again :)

                  But still, sometimes I have the need to spawn these curses applications so I’m constantly looking for the alternative options - running external terminal emulator seems to be trade-off, but it’s still “out of the block” in Emacs world. And, when diving into Emacs, I took the “use Emacs for (almost) everything” approach as I think it should be taken this way.

                  There’s a thing about XEmbed, but I can’t find any reliable docummentation, seems to be experimental feature yet.

                  That EXWM might be great with xterm being fed by ELisp-structured data parsed into X resources, but it’ll require some additional code :)

                2. 5

                  One option is to use Emacs as a window manager via EXWM—then you can have an xterm as a buffer!

                  1. 1

                    I could web-search for it, but I’d rather ask a person: is that one based on xwidget?

                    1. 4

                      It’s actually just a window manager written in Emacs Lisp using a pure Emacs Lisp implementation of the X11 protocol!

                      1. 1

                        Ah, like StumpWM, except elisp instead of common lisp.

                      2. 1

                        No, it is a completely unrelated project

                    2. 1

                      What specifically do you need terminal emulation for? In my experiance curses applications (like WICD) worked well enough, maybe being slightly slugish.