by wiz21c · 5y ago · 0 comments
It could also be more "discoverable". There are hundreds of functions so that 100% of my needs are covered. But every now and then, when I want to find a command, I DuckDuckGo it... It'd be nicer if somehow there would be an assisted navigation in the commands (or a pointer to that assistance I've been sorely missing :-))
But I like it anyway. 'cos it's faithful, community grown, etc.
And if I had time I would contribute. But emacs is an old platform so there are many choices buried in and reaching the level of knowledge necessary to contribute is probably very high...
Same here. Long lines are especially painful. And it's quite surprising what Emacs considers a "long line". I have a file in my project with tests, where I have an array, with each element of the array on a separate line, averaging at around 125 characters per line (some of them weird Unicode characters, so not just ASCII). There are 52 lines of it. And when I scroll down the file with C-v (Page Down basically) it scrolls quickly up until I get close to this place, then I get something like 1.5 seconds delay while it's hanging there. It's ridiculous.
Another thing is how easy it is to freeze Emacs into being completely unusable when editing files over Tramp (with remote work it's the go-to solution), caused by an unreliable connection. Mostly it happens when the underlying VPN connection is dropped. When that happens, Emacs freezes with no explanation whatsoever. I can only guess what happened. C-g, Esc, nothing works, regardless whether the VPN connection is restored or not. The only solution at this point is killing this instance of Emacs. Specifically for this purpose I crafted a one-liner to kill the right instance of Emacs[1] (the one under the mouse pointer):
kill $(xdotool getwindowpid $(xdotool getmouselocation | cut -d : -f 5))
Also, magit is painfully slow. When using it, I always wonder if Emacs is frozen again, or if it's just magit being magit. It's a shame Fork is not available for Linux.[1]: The other instance of Emacs is used for tracking in org-mode the time I spend on different tasks. I used to do it all in a single instance, but then I kept losing that data due to Emacs freezing like that, so I started using a separate instance for the time-tracking. I really think Emacs should be a multi-process application to prevent such situations.
What happens is that your main programming font does not have the unicode characters, so Emacs falls back to searching all your fonts for each character it can't find, which is slow if it has to search through many different fonts.
The solution is to ensure you have symbol fonts installed - see the list of fonts here: https://github.com/rolandwalker/unicode-fonts
This makes me suspicious that it's the font cache causing the slowdown (assuming Windows), not long lines. I saw similar symptoms a couple years ago and fixed it with (setq inhibit-compacting-font-caches t).
You could also try increasing the garbage collection threshold on the theory that the lag is a gc pause. I've used:
(setq gc-cons-threshold (* 511 1024 1024))
(setq gc-cons-percentage 0.5)
(run-with-idle-timer 5 t #'garbage-collect)But yes, Emacs does have a long lines issue, sadly.
This caught my eye because I tend to think the opposite of this statement. Emacs doesn't skip a beat on text input -- unlike say VSCode which has perceivable input lag. In my experience, when Emacs gets slow it's a configuration problem, like flychecking on every keystroke, or a slow/poorly written third-party package. Raw emacs is blazing fast.
Disclaimer: I use `emacs -nw` -- no GUI toolkits.
Native compilation is coming in the next version and should help quite a bit.
If I could rely on Emacs never freezing, I'd be happy to run it as a server.
I definitely agree that I want to type some string and it should show a fuzzy search from all available commands and their descriptions. That would be huge timesaver for functionality I know exist, but I forgot the exact commands.
If I'm not mistaken when you install vanilla Emacs the screen even includes a tutorial and guided tour that both tell you these commands.
Example : I want to change the encoding of a file when I load it... Good luck figuring that out without resorting to reading the documentation.
Again when you load emacs there's a link to the manual on its splash screen and as a guided tour. A lot of people rush to turn off this screen or suppress the menues on startup (which I get, the menu bar is pretty ugly) but they do have useful functionality for someone who doesn't know Emacs.
Have you tried the apropos command? For me, often using helm/ido and trying to guess actually leads me to the correct command. I personally haven't even tried apropos, so I don't know how good it is.