1. 4

    As someone who has dabbled enough with Emacs to “get it” but not enough to be anywhere near proficient in elisp, is it just me or is Emacs unstable?

    Well, I’ll clarify a bit. I use emacs-plus with Doom Emacs which works fine, although the compilation + setup process on a new device is something like 20 minutes once Homebrew builds it from source and installs the thing.

    Emacs daemon + emacsclient works fine but I’ve never had any luck getting the thing to actually run once on startup and work seamlessly from then on. I find myself killing the process and restarting it for reasons I don’t remember anymore so of course, this post isn’t exactly an actionable question.

    I wish Emacs had the speed/lightweight feeling of neovim but with the extensibility of the ecosystem and quirks of course. org-mode and magit are wonderful and posts like this tempt me back but it feels like getting stuck in quicksand where I end up wasting more and more time with less to show for it.

    I fully realise this may just be bad luck as a (relative) beginner of course.

    1. 13

      is it just me or is Emacs unstable?

      Vanilla Emacs, out of the box, is very stable. In my experience, it’s typically me that /can/ make it unstable (with own customisations + installing packages).

      If still keen to tweak and customise, keeping customisations under revision control is a great way to revert back to stable at any time.

      I use emacs-plus with Doom

      I’m not a Doom user myself, but have been on Emacs Plus for many years. Out the box, Emacs Plus gives a fairly vanilla experience (w/ some patches for macOS) but is also very stable.

      Doom seems to have lots of happy users and an active community who may be able to help.

      I wish Emacs had the speed/lightweight

      Vanilla Emacs, out of the box, packs a lot more than it may initially seem (and is very snappy) https://karthinks.com/software/batteries-included-with-emacs

      1. 1

        Oh, that batteries-included list is great!

      2. 4

        Hmm. I haven’t been using it as heavily, but I definitely don’t get weird instability issues unless I’m doing something like live-setting variables, adding/removing hooks, or otherwise messing with the configuration live.

        If you use LSP stuff, check out the LSP performance tips?

        1. 1

          That helps me, thanks!

        2. 1

          I’ve been using Emacs for a very long time (on and off since 2002 or so when I first found it, and pretty much exclusively for… 15? 16 years?). Last time I’ve declared .emacs bankruptcy I tried some of these fancy batteris-included things like Doom Emacs. I could never get any of them to work. Sooner or later I had to break out ye olde Emacs Lisp reference booke and have at it.

          I suspect these things work great if you don’t stray too much from what the developers/packagers had in mind. But at that point you might as well use Visual Studio or Eclipse or whatever, where you’re also pretty much stuck with what the developers had in mind, but there are more of them. Otherwise, if you don’t use Emacs Lisp, don’t really customize anything, and don’t have muscle memory issues, I think all you’re left with is you get l33t hipster points :-).

          I also stopped using emacs daemon + emacsclient a long time ago, I’ve found that SSDs largely made that redundant in terms of startup speed, and I don’t really need to close my Emacs sessions anyway so…

          1. 2

            I’ve been using emacs since 1992, and I’m both mystified and gladdened by the cool new hipster Emacs “distros”. They’re not for me, vanilla emacs works fine, but it’s great to see Emacs retain mindshare!

            As for emacsclient, I agree. It was maybe great in the age of Eight Megabytes And Constantly Swapping, but now I just spawn a new tmux window and start a new emacs in it…

            1. 3

              I’ve been using emacs since 1992, and I’m both mystified and gladdened by the cool new hipster Emacs “distros”. They’re not for me, vanilla emacs works fine, but it’s great to see Emacs retain mindshare!

              The fact is that the majority of emacs keybindings are simply not something that stands the test of time. For example, the window keybindings:

              C-x 2  Split window vertically
              C-x 3  Split window horizontally
              C-x 1  Delete all other windows
              

              In emacs, C-x is used for a lot of baseline commands, so there is no memorable component other than the numbers, why a user should have to remember seemingly random numbers for this sort of interface is beyond me.

              Compare with vim, where C-w is the “window” shortcut leader. Normal up, right, left, and down commands work with this to change to that window, and the commands to split the window are:

              C-w s  Split window vertically
              C-w h  Split window horizontally
              

              with vim, you’re given a hook – w for window, s to split, h for horizontal. There are many, many other points of pain that present themselves to a new emacs user where, while vim is painful, it provides meaningful names for each operation to allow memory recall.

              And while it can be said that emacs is designed to allow everything to be rebound, it’s hard enough to remember the commands from a new system without having them rebound.

              1. 2

                I beg to differ. C-x 2 will result in two windows, C-x 1 will result in one window, there even is C-x 0 which deletes the current window.

                The same works for frames, here the prefix is C-x 5 and then 2 for new and 0 for close.

                I find that intuitive, but admittedly I use Emacs for two decades.

                1. 2

                  Ahhhhh, frames is what I was thinking of when I dug that out, I think

                  The same works for frames, here the prefix is C-x 5 and then 2 for new and 0 for close.

                  Do you not see how this is not intuitive? C-x 5 2 is meaningless to memorize :(

                  1. 2

                    Well, there are five letters in frame… :D

                    But for real, it is completely unintuitive. which-key helps (you can end any prefix with C-h and it’ll show you a list of what each key would do), but if the key just continues the prefix then you’ll get something like +ctrl-x-5-prefix unless you explicitly bind that. Sometimes I even just run the command by name as opposed to the keybind because I’m a fast enough typist that I can do M-x split hor in about a second anyway.

              2. 1

                Oh, no doubt. I’m pretty sure that all these things work fine for someone whose mindset about the whole computing thing isn’t as old as mine, otherwise they wouldn’t have so much traction.

          1. 8

            This one isn’t necessarily unheard of but it was particularly novel at the time as I had encountered it at my first job and no one was able to track down the cause.

            We would get builds that would fail for no particular reason but intermittently with no obvious pattern.

            I think we shrugged it off for like 2 months before someone got annoyed and spent an entire day trying to figure it out.

            Basically, we were using a commit sha as the version for a Docker image and not stringifying it. I believe the combination was that when you had all numbers and a single e, it would be interpreted as scientific notation.

            I think Helm 2 was the culprit where it would interpret what we assumed was a string and turned it into a number, which was not a valid value.

            I’ve seen this pop up a few times since in projects but it’s one of those things that is rare enough to shrug off for a long time

            1. 5

              That’s a “feature” of yaml not specific to helm. The Yaml spec is quite large and there are a lot of surprising things in there that crop up when you least expect it.

            1. 6

              I’ve got another blog post to write up on a bluetooth annoyance that I finally looked into. Specifically, that audio quality degrades when you go to use your microphone.

              I’d never noticed this before strangely but I think it only came about when we started having bridge calls, that is, meeting calls that would run all day in the background while we were working from home.

              They weren’t actually meetings but a drop in/drop out channel for having discussions and so on.

              Turns out you can’t really use Spotify (or really any audio) at a high quality while using your microphone. I think it was only exacerbated because Microsoft Teams seemingly claims a hold on your microphone even while muted so you’re constantly at a lower sample rate when in a call.

              If anyone is interested in a lightweight explainer as to why, I’ll be posting it sometime shortly at https://utf9k.net/blog/

              1. 2

                The same thing happens with AirPods on a Mac. To maintain the higher audio quality when I join a video call, I often switch to the Mac’s built in mic instead if the AirPods mic, but keep the audio I hear coming through the AirPods.

                It’s super fiddly and a pain in the butt.

                I’m looking forward to reading your post.

                1. 1

                  Mhmm, that’s essentially what I’ve opted to do as well. Interestingly, you can see the sample rate change from 48000hz to 16000hz (or thereabouts) in Console.app and vice versa

              1. 1

                An address will exist in the country’s postal service’s database Unfortunately, my flat address (1B/2A) didn’t exist in the NZ Post database until I request it be submitted. It seems there was one lady who was in charge of addressing (or so her job title suggested) and that was all it took to get it added.

                As a positive consequence, a great deal of websites then suddenly started seeing my address as valid. Until then, I had to drop down to just 2A. It didn’t really matter much since you couldn’t physically access our portion of the building from the street anyway.

                1. 2

                  I bought a NAS yesterday so gonna set that up and probably do some cleaning

                  1. 1

                    Very cool! I’ve had it on my list to try and find videos similar to this of people using Emacs or Vim so I’d love to hear if people take/took Drew up on his suggestion and/or if there are already existing resources that are just people editing text and vocalising the process

                    1. 1

                      Drew’s video already includes him using Vim—you don’t need to wait for additional submissions.

                      I don’t think this is a good style of video to learn Vim from, though, because it’s poorly organized for that purpose. As the linked page says,

                      The purpose of this page is to provide a reference for people writing new software which involves text editing tasks.

                      If you already know how normal text editing works, Drew spends too much time reiterating that. Even in the Vim section, he often switches between explaining Vim’s features and explaining generic text-editing features you already know.

                      A video focused on teaching the Vim or Emacs editing models and keybindings could be much more concise. I bet you could find one just by searching YouTube for “Vim tutorial”.

                      1. 1

                        I guess I was more interested in watching people use it from a more wholistic point of view. For example, I recently started investing in org-mode (via Doom Emacs so using Vim bindings).

                        While there are plenty of great org-mode tutorials, a strict tutorial can be quite hard to express ie; how do all of these disparate bits and pieces work together in a real life setting.

                        Likely I just haven’t properly sat down and invested enough time but I like to think that the style of watching someone use a tool to achieve an end goal vs a tutorial about the tool itself have different focuses. The former is much more likely to help me understand the value of it but not necessarily how to go about actually using the thing in question if that makes sense?

                        I didn’t really clarify in my original comment but in this case, the wholistic format is what I find interesting more than any specific thing being demonstrated :)

                        1. 1

                          I agree, a video of someone using Vim or Emacs for actual work while making it clear how they are using the editor would be a great way to learn.

                          I just tried searching for a video like that. I found plenty of recordings of livestreams where people use Vim (example). However, in my quick searches I’m afraid I couldn’t find any videos of a programmer using software that displays their keystrokes on screen, or of a programmer aiming to talk about how they are using the editor to do everything they are doing.

                          1. 4

                            ThePrimeagen has some nice vim videos with software that shows the keystrokes: https://www.youtube.com/watch?v=H3o4l4GVLW0

                            1. 2

                              I think what you’re looking for may exist on destroyallsoftware.

                      1. 3

                        Finally found my TOTP seed for Lobsters so I can log back in for starters :P

                        Surprisingly, I managed to win the tenancy of my own little one person place so no more having to live with flatmates which will be an interesting change

                        My weekend is just going to be cleaning and preparing to list my room bleh

                        1. 10

                          I’m using emacs and org mode. And this weekend I started trying out https://github.com/org-roam/org-roam org roam which lets you kinda do what roam does in org mode.

                          Still not sure about the roam stuff but its nifty, my org notes were pretty haphazard, I’m hoping it helps.

                          1. 2

                            I’ve looked at roam/org-roam a couple of times, but haven’t quite grokked it. Do you have to have a single .org file per topic for it to make sense? How hard is it to switch over from a current mature org set of notes?

                            1. 4

                              I haven’t used it heavily myself but I have got it set up and it appears the focus is on backlinking rather than folder heirarchy. You’d presumably need to add the backlink syntax which I believe is something like [[Topic Name][topic_filename.org]] as well as any possible metadata like tags but just a #+ TITLE should be enough.

                              It’s basically that in conjunction with Deft, a… mode?[1] for searching across plain text files in a directory. It can do recursive folders too but org-roam seems to just operate by creating new links in your highest level folder. The author also uses naming conventions like private- just to separate private org-roam notes from public. Public meaning published on their website so if your notes are primarily online, you can ignore that aspect of course. Just that org-roam has some templates you can override to allow setting a public or private note/link etc

                              I’m not sure if that helps at all with gauging the amount of effort required though? I would imagine it’d require reviewing most of your notes and adding backlinks to actually get benefit out of org-roam’s reason for existing vs plain old text search which also works perfectly fine

                              [1] My terminology is flaky since I’m very new to emacs

                              1. 1

                                Thanks for this evaluation. I’ve thought it sounded very interesting and potentially useful, but it’s been hard to gauge whether it could really fit my workflow. From what you say, it might be worth experimenting with at some point.

                              2. 1

                                Great questions and I only started using it since Friday, for the latter all I can say is: my tests are ongoing.

                                I am starting to filter/update things into it slowly, mostly just doing a “take 5 minutes to update notes” per day kinda deal. Not trying to do it all at once or anything.

                                It seemed to pick up my giant org dir of crazy amounts of org files fine though.

                            1. 2

                              One barrier to entry is that I had no idea how to install it on my desktop

                              I use Emacs via Cygwin

                              GNU Emacs 26.3 (build 1, x86_64-pc-cygwin) of 2019-08-30

                              There are pre-compiled binaries for Windows (native):

                              http://ftp.acc.umu.se/mirror/gnu.org/gnu/emacs/windows/

                              The Emacs wiki has a bunch of info

                              https://www.emacswiki.org/emacs/MsWindowsInstallation

                              In my previous job I used Emacs extensively to plan my workday and to read email. I had a Windows desktop and used the native build (from memory, it’s been a long time). It worked fine.

                              1. 3

                                And don’t forget the real bleeding edge Windows pre-compiled binaries: https://alpha.gnu.org/gnu/emacs/pretest/windows/

                                As a pretty dedicated Emacs user for the past 5 years, I’ll admit to having fought with Emacs on Windows (which I run on my work laptop). Most of my past work had been Linux-native so I was primarily using TRAMP and working on a remote system or local vm under hyper-v.

                                I’ve been too chicken to turn on the Insiders channel to get WSL2, so I’m curious how the ergonomics are using native Emacs + TRAMP (into the WSL2 instance) vs. Emacs over X11.

                                1. 1

                                  While I’m not sure what TRAMP is, I know that sometimes inputs can get lost when using terminal Emacs, depending on your terminal of course. Windows Terminal for example, treats Ctrl and Ctrl + Shift as the same thing so trying to do eg; C-c C-S-l to remove a link in org mode will actually fire C-c C-l (which inserts one). It also has some system bindings for keys like Ctrl + (zoom in) which can interfere with terminal Emacs. I’m sure any other regular terminal wouldn’t have the C-l / C-S-l issue though.

                                  1. 2

                                    From the official docs: TRAMP stands for “Transparent Remote (file) Access, Multiple Protocol.”

                                    TRAMP is the original “remote editing” before VS Code had it. It effectively lets you work with files on a remote machine via ssh/scp as if they were local (in most cases). Most Emacs modes just work without even knowing it’s a remote file. You can run the native Windows Emacs and still work within a WSL2 instance without mucking about with X11 etc. (There are some caveats, but even eshell supports it and I believe magit.)

                                    https://www.gnu.org/software/emacs/manual/html_node/tramp/Quick-Start-Guide.html

                                    1. 1

                                      Ah! I totally misunderstood your comment then.

                                      This seems like a really interesting alternative, and if it works, I’d probably opt for a native Windows binary in that case. I might see if I can get it running on the weekend. Let me know if you end up experimenting yourself as well.

                                2. 2

                                  Oh yeah, that is definitely true and I could do that for sure.

                                  Originally, I did have my development files on my C drive and kind of fumbled my way around with Powershell. When WSL came about, it was a lot more attractive being able to use regular unix tools and just apt-get install things.

                                  I believe it’s still the recommended case that you keep everything within the WSL environment for performance reasons? Either way, having to navigate to /mnt/c/code/ was a bit more tedious than being able to just do ~/code for example

                                  That was sort of the logical steps that lead me to keep everything inside WSL and hence why I opted to get emacs in there, rather than out in Windows land.

                                  On a similar note, I’ve found it much nicer running the WSL2 Docker Preview (docker daemon + kube inside WSL2) than having it run in Windowsland so it’s basically another reason for keeping my dev environment inside WSL, at least at work anyway.

                                  That said, maybe someday I’ll give the pre-compiled binaries a spin! Thanks for the heads up

                                  1. 2

                                    I should give WSL a closer look. I think it’s a bit sad Cygwin seems to be forgotten. It has served me well for many years, even as you say that dicking around with /cygdrive is a bit of a pain.

                                    Performance-wise I find it much faster to parse large log files using Perl in Cygwin than using pure PowerShell!

                                1. 2

                                  Hmm, I feel like I’ve been sliding backwards recently. Just to be clear, I’m fine mentally, just frustrated that I’m paralysed by choice and I feel like I have a lot of unresolved things to do. In reality, I should just drop a lot of them.

                                  I wrote an impromptu post trying to express my frustration earlier today if anyone wants to have a read: https://utf9k.net/blog/mental-overhead-of-data/

                                  1. 2

                                    I haven’t invested too heavily into my setup but it’s generally something like this

                                    • Standard folders
                                    • ~/Code [An alias, ws for workspace, takes me here instantly]
                                    • ~/dotfiles [Using GNU Stow (stow) lets me symlink any folders here to their respective root locations]
                                    • ~/Dropbox [Generally any notes now that I’m starting to use org mode + PDFs etc]

                                    Nothing particularly out of the ordinary besides that. I leave things like node_modules, virtualenvs and whatever in their respective folders and never try to back them up with something like Dropbox (since you mentioned blacklisting with backup software)

                                    I’m trying to make better use of search first for most everything I use but I’m not quite there with my files at all.

                                    1. 1

                                      If you’d like to be on the bleeding edge (and is what Doom Emacs recommends), you’ll probably need to compile Emacs 27 from source :(

                                      Emacs 27 decidedly isn’t bleeding edge – the release cycles are very, very long. I’ve been using 27 for months with absolutely no issues. Furthermore, the native JSON parser makes LSP et al far faster.

                                      …you do need to compile it, though.

                                      1. 1

                                        I did a bit of a search for an Ubuntu repository and could only find Emacs 26 via apt-get sadly

                                        You’re right though, bleeding edge probably isn’t the right term to use here. Compiling should be easy enough too and I’ll likely do that once I’ve committed my soul to Emacs haha

                                        Thanks!

                                        1. 1

                                          Compiling should be easy enough too

                                          I use Ubuntu and like to stay on the latest version of Emacs so I typically use my own builds from source. Once you’ve done apt-get for the necessary -dev library packages, the usual configure, make, make install dance goes very smoothly. It can also be quite fast too if you use make -j and have enough cores.

                                          1. 1

                                            And a tip is that if you’re just building a newer version of something that has a package, apt-get build-dep that-package will get you what you need in 95% of cases.

                                      1. 1

                                        The X Windows server I use for Windows is Xming, which has both a free and a paid version. The free version works like a champ with WSL - just run it, set DISPLAY=:0 and you’re good. But I guess it will be a little more complicated once I move to WSL2.

                                        1. 2

                                          I imagine the exact same steps as VcXsrv should apply? Just make sure it’s allowed through Windows Firewall and that the DISPLAY variable is set to the IP address within /etc/resolv.conf but I’ve never tried it myself. I don’t think it’s as complicated as I would have expected it to be

                                        1. 1

                                          Trying to figure out the Teamcity Kotlin DSL since our in house Path to Production standards have listed it as our officially supported CI/CD tool.

                                          Coming from using Jenkins via a Jenkinsfiles, the syntax for Kotlin hurts my brain a bit. None of it seems obvious or easy to accidentally figure out but maybe I’m missing something.

                                          As one example, I was looking to use an access token with the Github commitStatusPublisher build feature but there is seemingly next to no documentation on how to use it. I ended up reading the Java classes and some plugin XML to find out that the DSL syntax for providing a token was something like

                                          github = token {
                                            token: "blah"
                                          }
                                          

                                          Every other repo used a username/password combo so searching in house repos gave me no insights :(

                                          Even more frustrating, the API between commitStatusPublisher and pullRequests is entirely different where pullRequests had something like github = personalToken {} despite seemingly doing the exact same type of authentication. That said, they’re not from the same author so fair enough I suppose

                                          After spending a whole day tinkering yesterday, I came across a really well written guide from another team mentioned in passing inside of a code comment within one of the handful of repos that use a .teamcity folder.

                                          I haven’t read it just yet but I’d love to know if anyone else has any resources. Preferrably beginner friendly since I’m having to learn Teamcity concepts from scratch and have an exceedingly hard time translating web UI config into Kotlin DSL. Presumably a book on Teamcity would be the most informative given I found the same true with Jenkins

                                          1. 1

                                            I post a mix of stuff on https://utf9k.net but I don’t post as much as I’d like

                                            1. 3

                                              I didn’t recognise the author’s name at first but the effort put into the design instantly made me recognise I’d been on the site before (I think when the d3 guide was posted)

                                              I’d also be interested to hear a bit about the design process and how long it took/how much custom code was required

                                              1. 2

                                                awesome to hear it! It’s pretty much all custom, with some shared components (code blocks, block quotes) with other blog posts. It took.. a while. Maybe 13 hours, overall? I definitely enjoy the creative freedom that comes with creating these posts, which keeps me going.

                                                1. 2

                                                  Ah, thanks for posting a link to your Github repo above! I’m looking forward to having a look around B)

                                              1. 6

                                                For what it’s worth, there’s RFC 1178: Choosing a Name for Your Computer which has some useful guidelines on computers and servers

                                                1. 2

                                                  I finally used string.Template a few weeks ago, in order to template a GraphQL query. It was kind of wacky since it had a results(cursor: "blah") {} key but to get the first page, you had to remove the cursor function so it was just eg; results {}

                                                  It was possible in some various ways but string.Template.substitute gave the most readable layout I thought. The alternative would be something like escaping all of the braces so { becomes {{

                                                  That said, it’s definitely a rare use case I think

                                                  1. 2

                                                    Finishing off Half-Life Alyx.

                                                    I was also looking at creating a small web app to interact with the API powering my gym’s food tracking app. It was pretty trivial to pull apart, and some of the mobile UI isn’t greatly intuitive so I might as well make my own

                                                    1. 1

                                                      What are your thoughts on the game? No spoilers please! Which VR set did you use? There seem to be a few VR “lounges” in my city, but none of them seem to have Alyx (yet?… hopefully…) :( maybe I’ll have to try checking again later this year…

                                                      1. 2

                                                        I used an HTC Vive which I actually bought in preparation for Boneworks. Funnily enough, I still haven’t played Boneworks and was never expecting a VR Half-Life title

                                                        I just finished it before and it’s pretty amazing. Not to use a cliche term but there are definitely some aspects of the game you can only experience in VR since they wouldn’t translate well to a regular keyboard and mouse playthrough. Control wise, you could sort something out but you couldn’t achieve anywhere near the same level of immersion you get with VR. Being able to (physically) pick up items, reach out, duck behind cover while firing above it all adds up.

                                                        I can pretty easily say I wasn’t disappointed and it definitely serves as the template on what an all-in VR title can accomplish

                                                    1. 13

                                                      While not removing YouTube, you could point out that all YouTube channels actually come with RSS feeds. As far as maintaining subscriptions, you can effectively do this and have a logged-in YouTube experience without needing an actual account :)

                                                      1. 4

                                                        That’s nice to know, how can you access it?

                                                        If you combine this with youtube-dl, you get an ad-free, tracking-free experience without ever having to open up a web browser!

                                                        1. 6

                                                          Also MPV is very good at streaming youtube videos.

                                                          1. 6

                                                            put this feed into your rss reader: https://www.youtube.com/feeds/videos.xml?channel_id=$channel_id

                                                            There’s also a special URL that works with pubsubhubbub/websub: "https://www.youtube.com/xml/feeds/videos.xml?channel_id=$channel_id" (websub endpoint is https://pubsubhubbub.appspot.com/subscribe).

                                                            if you replace the string videos with playlist, these URLs also let you “subscribe” to playlists, IIRC.

                                                            Also note that the websub feed will also push updates to existing entries (e.g. updated description/title/thumbnail) to you. i’m filtering these by <updated> - <published> <= 60 seconds, which seems to work OK.

                                                            1. 3

                                                              If you use Android, you can try NewPipe, an open source frontend for Youtube, with more features (you can download videos, subscribe to channels’ feed rss and more).

                                                              1. 1

                                                                I really with NewPipe was available for iOS. 😞

                                                            2. 1

                                                              That’s a great point, I’ll add that to the article. I’ve actually done that in the past, but I always like to see what the YT algorithm has come with on the home page too.