top | item 45653702

(no title)

billfruit | 4 months ago

While I still use emacs, I find that that despite the "batteries included" narrative about emacs, the things which are not included are causes of major frustration.

Such essential functionality like grep-find and LSP servers which is required for out of the box auto complete are not bundled with emacs. Most modern IDEs/editors have these functionality baked in.

If you install emacs for windows you find that grep-find doesn't work, because it depends on support from environment. A full text search should be built into the editor.

discuss

order

internet_points|4 months ago

I don't think lsp servers should be bundled, they're often huge, and e.g. for haskell you need the one that matches your ghc version, so you'd need ..all of them? and they need to be kept up-to-date etc. There is an emacs LSP server package manager at https://github.com/deirn/mason.el though – maybe something like that could be included, and Emacs could suggest how to install an appropriate LSP server (and enable eglot). I know many of the old hackers bristle at this, but I think it should be possible to do some kind of helpful but non-intrusive hinting for new users (one can always `setq clippy nil`)

They could at least change the default theme to one of the already-bundled modus-themes or something.

billfruit|4 months ago

Once we get a modern IDE like PyCharm or Intellij Idea, the auto complete is essentially built in, without needing to deal with installing LSP servers, clients, and their dependencies.

Out of the box, project and context aware auto complete is an essential feature in a modern IDE.

kragen|4 months ago

I've never used grep-find or LSP, despite using Emacs for 32 years. Maybe I should; is grep-find better than M-x grep?

Apparently I've sometimes improvised an equivalent: "Run grep via find, with user-specified args COMMAND-ARGS. ... This command uses a special history list for its arguments, so you can easily repeat a find command."

My out-of-the-box autocomplete is M-/, which works in environments where LSP doesn't, like writing English. It works sort of poorly in all of them, but I write production code slowly enough that my typing speed isn't close to being a bottleneck. It's more of a bottleneck when writing English, but even there, generally any of my good writing was good rewriting.

Where I've found LSP-like functionality really useful in the past in IDEA and later Eclipse was not autocomplete, which is mostly an annoyance, but in automated refactoring (extract variable, extract method, inline method) and in rapidly iterating through the implementors of a method whose semantics I'm changing.

PaulDavisThe1st|4 months ago

To be fair, running grep from Emacs is a mistake - you should be using ag, or some other parallelized version of grep :)

Ardour has around 800k lines of code, and ag (not even the fastest of the new greps) can search it all more or less faster than I can type.

The idea of some system that analyzes/caches/indexes the code just isn't necessary anymore.

pton_xd|4 months ago

I don't think I've ever heard emacs described as "batteries included" -- maybe more like "batteries available." If anything it has the opposite reputation, that doing anything requires extensive and continual config adjustments, which isn't accurate either.

There are plenty of emacs "starter kits" that do aim to provide more of a batteries included experience. My favorite is doom, it's worth checking out and does setup all the features you mention.

Pointing new users at those more advanced default configs as an option would be pretty helpful, I think.

billfruit|4 months ago

But many features, even obscure ones are packaged by default in modern emacs, including I think a pdf viewer.

binary132|4 months ago

Tbh even though I got my start with Emacs Live I really do think at this point the simplest way to get started is to start vanilla and stay as vanilla as possible as you slowly build up your config based on simple and straightforward examples. The main problem is the utter lack of such examples in the community. I had to figure it out for myself for the most part. KISS!

skydhash|4 months ago

Emacs isn’t battery-included. It’s a platform for textual interfaces with a focus on text editing. It may not includes some tools, but if the tools works with text (at least on the standard in/out) hooking it in emacs can be done really quickly. More so if it’s something that:

- have result that can be formatted in a tabular fashion

- do stuff with files then present some diagnostics (especially if errors and warnings are related to the files)

- Have an REPL interface

It’s not preconfigured like VS Code, but it’s much more versatile. Cursor having to fork VSCode is one such example. In Emacs, anything is just another package.

kqr|4 months ago

I think the mistake is looking at Emacs as an editor. It's an Emacs Lisp VM, and the editor that comes bundled with it is good, but not great. Fortunately there are many ways to improve it, and make it go beyond what other editors can.

positron26|4 months ago

WSL2. While it's a fair criticism, the underlying issue here is that there aren't enough Windows users who program and upstream things for individual users to get support. Lean on the Linux ecosystem and things are fine.

The reason there aren't programmers targeting the large market is a tangent into why I'm building PrizeForge, but the answer now doesn't change.

mickeyp|4 months ago

What? Emacs has eglot built in. It has had native grep and find stuff for decades.

https://www.gnu.org/software/emacs/manual/html_node/emacs/Gr...

You can change the exec-path to point to your cross compiled grep tool --- or you can change the command string to your tool of choice.

skydhash|4 months ago

I think for grep in emacs, the only thing require is the interface:

- result on standard output - path and line numbers on each line

A lot of emacs reliance on other tools follow the same pattern. While the default is posix, it has enough options to twist it to fit whatever OS.

internet_points|4 months ago

parent is talking about the external dependencies, grep.exe and java and jdtls etc., and in particular how they need to be installed separately from Emacs

iLemming|4 months ago

Emacs in its half-a-century existence afaik never had "batteries included" narrative. Whatever comes bundled in Emacs, either practical or not so much (e.g. tetris) - are recipes and guides for extending it.

teddyh|4 months ago

Why not instead blame Windows for not having the standard tools “grep” and “find”?

pjmlp|4 months ago

UNIX standard tools, and not every operating system is supposed to be a UNIX clone.

There are ways to search and grep files on Windows.

positron26|4 months ago

The criticism makes sense when you consider that yeah, while posix tools are okay, needing them everywhere means you have something wrong in your programming ecosystem, and Elisp has many things wrong.

soupy-soup|4 months ago

For most modern programming languages, LSP servers are trivial to install. You can usually get them through your language or distro's package manager in one command line invocation. Considering that there are sometimes multiple servers with their own pros and cons for a language, this can be kinda nice.

The only one I've ran into that is different is Java, but considering how underdeveloped Java LSP servers are, you probably don't want to be using emacs for Java development.

pjmlp|4 months ago

Define modern.

IDEs with such capabilities were already available in the 1990's.

I became an XEmacs user in the 1990's, because there was hardly anything better in UNIX systems.

Remember, Emacs still lacked many niceties only available on XEmacs, and vim was yet to be invented.

This is how old such IDE features have been available.

bitwize|4 months ago

XEmacs only came about because Lucid needed a front end to their IDE, Energize, which was extremely comprehensive and could even do "edit and continue" style development of C++ on Unix but, as jwz has it, the Unix community preferred its stone-knives-and-bearskins approach with command line tools.

binary132|4 months ago

the total lack of “getting it” on display here is simply flabbergasting.

ubermonkey|4 months ago

>If you install emacs for windows...

...you are a second class citizen in the emacs republic.

I mean, I don't endorse this position, but it's the way things are.

DonHopkins|4 months ago

>If you install emacs for mac...

...you are a third class citizen in the emacs republic.

In spite of the fact that you can't spell emacs without mac.

Also:

>If you install emacs for linux...

...you get flamed for not calling it gnu/linux.