Live data from Hacker News

Use GNU Emacs

www2.lib.uchicago.edu

241–250 of 301 posts

Re: Use GNU Emacs

#241

I love Emacs. I did a ton of things with it: - Organizer - git client - search tool - rough notes - Terminal - file management - Code editor! Pretty much everything. But sometime ago I realized I was adding so many customized code lines to my .emacs to reassemble the modern editors that it made me think I was using it wrong. Then I decided to take a break and start using Neovim, which imo borrows some nice stuff from…

> adding so many customized code lines to my .emacs to reassemble the modern editors I feel like trying to recreate vscode in emacs could be a suboptimal approach to say "add a directory sidebar and lsp-mode, but get used to emacs buffer and tab handling"

Why would anyone want to recreate VSCode in Emacs? It's like asking a philharmonic orchestra to play Country Roads... Yeah, they probably can do a very good job at it, but they are there to play some more interesting music, wouldn't you think?

> get used to emacs buffer and tab handling

This clearly shows you've never used the program you are so confidently talking about... What tabs?

Re: Use GNU Emacs

#242
post #99
post #96

One feature I particularly like in emacs is "chord mode". You can bind double keystrokes to features, eg I have @@ to save file. I haven't noticed this available in other editors.

VS Code has this built in. I personally have a set of ⌘N and ⌘W chords [0] for various creations and deletions. ⌘W S to close all saved files is a particular favourite; I don't really pay particular attention to my tabs anymore (just open on the filespace), which is one less thing to think about when coding. [0] https://github.com/yunruse/.config/blob/zsh/vscode/keybindin...

VSCode doesn't have chords. I have no idea why would you link your config to this... Chords are sequences of keys (i.e. this includes releasing keys). Vi(m) do have chords for example though. I.e. a navigation command is usually a sequence of commands that is send to execution after the whole sequence have been entered. This means that the key-binding has a prefix (or multiple prefixes) and will be continued with the suffix. For example, in Vi "dw" is "delete" followed by "move one word forward", where "d" is the prefix and "w" is the suffix. But, "d" may be followed by many other things, all of which will be interpreted as deleting whatever's covered by the movement command. VSCode keyboard interaction simply doesn't work like that. It waits for the single keyboard event (which may involve modifier keys) and then dispatches it to the handler code. The later results in some feedback to the user rather than accumulation of command sequence for later processing.

Re: Use GNU Emacs

#243
post #7

I wish I could but the Windows version of Emacs sucks ass.

It's like if of all cooking appliances all you had was a microwave oven, and then you complained about not being able to make ice-cream. You chose to play with a handicap, now things don't work well for you? -- Well, guess who's guilty...

Re: Use GNU Emacs

#244
post #223

Earlier quoted context omitted.

As mentioned, you can disable evil mode in spacemacs or doom. There's also prelude which doesn't include evil by default. Not quite as fully featured as doom/spacemacs, but it's a good place to start. All that said, you could just set it up from scratch. Now that lsp-mode and dap-mode are things, you can setup a fully featured IDE in not very much config at all. I have everything in my init.el and setting up projecti…

Lol, that last comment. Can't I beg you to share your init.el? I want LSP and the other stuff but Doom even when turning off evil mode seems to far away from the emacs I'm familiar with.

My config is pretty barebones these days. This is what i use every day for C++ dev work

https://pastebin.mozilla.org/mShC6Dm0

I'm still using evil mode. Most of my important functions are bound to some combination off space bar though.

It's certainly not perfect and has some "quirks" (or bugs if we're being honest), but it works pretty well.

Re: Use GNU Emacs

#245
post #194

Earlier quoted context omitted.

I would assume that many people here do some work on free software. If people producing free software are not able to comfortably develop free software using only free software , then we have lost something important.

We likely have lost something. It's like global warming. Everybody talks about it as if they care, but if you still drive a car, do you actually care? No. Not enough to stop contributing to global warming. It's the same thing with free software. I care, but not enough to stop me from using the easiest thing out there to use regardless of whether or not it's free.

Let’s not exaggerate; many people do care enough to have it affect their behavior. If there’s something you “care” about, but this does not affect any decisions you make in any way, do you actually care about it?

Re: Use GNU Emacs

#246
post #11
post #10

Earlier quoted context omitted.

use GNU not windows :)

See, that's the kind of argument that is making vscode win over every other alternative.

It's not a win I'd care about. This takes away the audience which would put a lot of pressure on Emacs developers to do stupid things that would lead to the editor getting worse and worse. This is the "popularity curse" which spoiled a lot of good things in programming world.

So, if people who want to use Windows don't become Emacs users -- I couldn't care less. I don't want these people to swamp the developers with requests to add mouse-based navigation or modal windows. Being few years a dad, I discovered that in situations that don't endanger my son's help, it's more expedient to let him make his own mistakes, if he really wants to, but it doesn't work if I try to pretend that his bad ideas are equally valid as good ideas. In other words, if people want to use Windows, they should be told they are doing something stupid, but they shouldn't be strong-handed out of it.

Re: Use GNU Emacs

#247
post #3

The Ingebrigtsen quote is meaningful. One should think of "using Emacs" not like "using Vim" but like "using the JVM." Emacs is a powerful platform for building hackable, command-and-ui driven applications. You may not like the text editor that ships with a default Emacs install, but you don't have to use it! There are others (e.g. evil.) There are also other applications. Some of my favourites are - calc (desktop RP…

calc is just insane. From the manual:

"Calc was originally started as a two-week project to occupy a lull in the author’s schedule.

...

Emacs Lisp would surely reach its limits long before the project got too far out of hand.

To make a long story short, Emacs Lisp turned out to be a distressingly solid implementation of Lisp, and the humble task of calculating turned out to be more open-ended than one might have expected.

Emacs Lisp didn’t have built-in floating point math (now it does), so this had to be simulated in software. In fact, Emacs integers would only comfortably fit six decimal digits or so (at the time)—not enough for a decent calculator. So I had to write my own high-precision integer code as well, and once I had this I figured that arbitrary-size integers were just as easy as large integers. Arbitrary floating-point precision was the logical next step. Also, since the large integer arithmetic was there anyway it seemed only fair to give the user direct access to it, which in turn made it practical to support fractions as well as floats. All these features inspired me to look around for other data types that might be worth having.

Around this time, my friend Rick Koshi showed me his nifty new HP-28 calculator. It allowed the user to manipulate formulas as well as numerical quantities, and it could also operate on matrices. I decided that these would be good for Calc to have, too. And once things had gone this far, I figured I might as well take a look at serious algebra systems for further ideas.

... (and on and on and on) ...

Final thanks go to Richard Stallman, without whose fine implementations of the Emacs editor, language, and environment, Calc would have been finished in two weeks."

If you look at its feature set, it is amazing how much can be done with it. It has nifty features like evaluating formulae inline in any buffer, and replacing the expression with the result. Expanding things to their LaTeX representation, etc.

I spent a lot of time trying to learn it. I use it for simple calculations, but ultimately decided it is not worth my time to go much further. That same effort would be better spent learning Sage, with a lot less cognitive load. And there is decent integration between Sage and Emacs.

Re: Use GNU Emacs

#248
post #230

I’ve started to use emacs in my computer sciences school 30 years ago (EPITA in Paris). The Lab was surrounded by Mips, Sun, Alpha, … great time. The only weakness of Emacs (according to me) was the lack of a good major mode (module) to edit web template : imagine editing a php block inside a javascript part embedded inside html. After testing many modes, I started to develop web-mode ( http://web-mode.org ) that is…

Thanks for your work! I use web mode on occasion - really like that it handles Jinja/Django templates!

Re: Use GNU Emacs

#249
post #45

OK. Here's a usecase where I found emacs to be wonderful. I had to email the grades, together with totals, and class averages to many students in a class. I tried fiddling with Excel and Google spreadsheets and scripted mail merges. Then I realized I could do it emacs. Export the gradesheet into csv, and convert to an org table. Carefully record a macro where you copy paste the name of the student the mark columns in…

> Export the gradesheet into csv, and convert to an org table.

Your mistake was not using org first ;-)

I learned org mode while a grad TA, and one of the first times I used org tables was to keep track of student scores.

Re: Use GNU Emacs

#250
post #91

Earlier quoted context omitted.

I agree that Emacs commits a number of unforced errors with regard to its user experience, especially for novice users. My guess is that with some usability studies they could flatten the learning curve substantially and significantly increase their market share with only minimal burden on existing users. Having said that, "market share" doesn't seem like a relevant metric since the community seems perfectly content…

>since the community seems perfectly content being niche. This is just admitting defeat. There is no reason Emacs couldn't be the number one editor right now. GNU projects in general all tend to fail to innovate and seem to ignore the last couple of decades of learnings.

> There is no reason Emacs couldn't be the number one editor right now.

There is a simple reason for it not to be number one: The developers and users do not care for it to be.

I certainly don't. As long as Emacs has hit critical mass (which it trivially has), it is good enough for me.

The number one selling car is Toyota. You wouldn't go and say Porsche is an inferior product because they are not the number one selling car.

Post reply on HN