Hacker News new | ask | show | jobs
by pmoriarty 2071 days ago
"one is always forced to configure the editor and tweak it here and there to get maybe 80% of what would be possible"

What specifically do you think is lacking, apart from having a ready-made IDE out-of-the-box in Emacs?

3 comments

Specifically, emacs is lacking up to date examples of how to do basic IDE functionality with emacs 27//28 and 2020 versions of packages. I don't think someone can build their own IDE without being an emacs intermediate and/or already immersed in to the emacs community.

Can you find me an example of a modern emacs config that creates a barebones python editor that does code completion and isn't significantly slower than jetbrains code completion? Most of what I can find is significantly out of date or just doesn't work. If its not possible or easy to find some barebones skeleton to build off of, I think the editor as a whole is too difficult to be worth using.

I tried doom but got something slower than jetbrains that also didn't work. I haven't yet found the time to invest into debugging/retrying. My next attempt will probably be me restarting, spending a few hours reading about how to use/debug packages and also getting something that does not really work. Is this really worth it?

At one point I was trying to get emacs server to work, so that I wouldn't have to wait a long time for emacs to start (to be fair, part of the problem was that my config file had a pile of stuff in it that I didn't really need). After spending waaay more time on it than I really wanted to I got it working here on MS Windows.

Of course, since MS Windows doesn't have emacs daemon processes one needs to keep the emacs window open in order for it to be used to open more files in the future.

In other words, I spent a ton of time to set up emacs so that when it's already open new files will be opened in that already running instance.

On the one hand it was kinda fun to fiddle with and I was happy when it was done. On the other hand I spent a ton of time getting something to work that most other editors do automatically out of the box.

In a way that kinda sums up my experience with emacs - fun to fiddle with, but takes a lot of time to set anything up.

That said, org mode is awesome, and like single-handedly keeps me using emacs :)

I'm curious what made it so fiddly. I set up emacs server on Windows maybe 6-8 years ago so perhaps I've forgotten a lot. But as I recall I just made a shortcut that would send the right command line arguments to emacs on launch, and a second one that I used for the client.
This is gonna sound dumb (because it is :) ) but it took me a while to realize that on Windows there's no daemon process so you gotta keep the emacs window open.

I kept closing emacs and expecting the next startup to be super quick and it wasn't. It was clearly starting up from scratch again.

I think the server stuff on Linux / MacOS does start a daemon, but I spent a bunch of time trying to get it to work (quick startup with no visible instances) before I happened to read that one needs to keep the first instance open on Windows.

Separately but related, sometimes emacs doesn't remove the text file that it uses to figure out if there's already a server running or not when it exits. Any further instances assume that another instance is the server and they don't take over as the server themselves. Thus, the zombie text file ensures that the server functionality stops working until you delete the file yourself, manually. I was half thinking about writing an emacs function to check if the pid identified in that text file is legit (i.e., is there a running process with that pid?) and if not then delete the marker file. Somewhere around there is when I decided I didn't want to fiddle _that_ much with my editor :)

Yeah, on macOS and Linux it starts a proper daemon. On Windows, I used org-mode so heavily that the idea of closing it during the workday usually meant I was preparing to reboot for IT's 25th update push of the day.

I actually do recall the lock file not being deleted properly a couple times. It didn't happen often, probably why I had mostly forgotten about it.

> In other words, I spent a ton of time to set up emacs so that when it's already open new files will be opened in that already running instance.

Isn't this just a matter of associating files to the right Emacs executable (emacsclient)?

It's been a while and I've forgotten a bunch, but I think I tried that and it didn't work. Maybe there were some command line parameters, so I needed to associate it with a batch file.

Plus, I wanted to press the Windows key, then type "emacs" and have that work.

I'm probably doing it wrong, but i couldn't find clear, easy, step-by-step instructions for doing this otherwise.

Integration. If I want to open emacs inside a Cmake c++ project, everything it needs is already there. But I have to configure all the tools myself. Then I switch to a python project and the same stuff has to happen again.