Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Obviously my personal bias, but it's emacs I can never remember how to exit from.


Me too.

I once helped organize talks at my school, and helped with bringing Richard Stallman to give a talk one time. I was a vim user, but I did a little bit of prep and refreshed my emacs memory etc. So we're setting up the room for the talk, and we're talking a bit, and some people start to arrive. He asks one if they've ever used emacs, she says no, so I said, "we should start an emacs tutorial here, we can teach everyone about things like C-x C-c, and stuff". I just blurted out the only thing I had remembered recently. He turned a cold shoulder to me, I suppose thinking that I had insulted him directly. I ran out to Google what I had said, and then felt terrible about it, but it was too late. That's my remembering how to quit emacs story.


Hmm, it might have just been because "things like C-x C-c and stuff" sounds kind of dumb, not because it refers to quitting Emacs. Like imagine:

B. Kernighan: have you ever used Unix?

Student: No.

You: Hey, how about we start a Unix tutorial here; we can learn all about dollar-sign-1, and stuff.

B. Kernighan: * roll eyes *

:)


Surely that is possible too! Either way, it was not my proudest moment.


Time has been kind in gradually fogging out memories of such embarassing moments for me, but not all, unfortunately.


It was probably because he knew what OS license you'd try to use.


I'll first admit I'm a worshiper of the Church of Emacs.

I told the trying to exit vi joke for years until someone pointed out to me that C-x C-c was equally if not more obscure. It was a part of me because that was the first thing I ever learned about Emacs. Just like :wq was the first thing I ever learned about vi.

Now, I think the fact that people seem to have more difficulty exiting vi is because vi is very likely the fallback for $VISUAL/$EDITOR, and hence much more likely to be trapped in by accident when unprepared.


Emacs is definitely difficult to exit from. The difference is emacs usually isn't the default/fallback EDITOR on the system, so you rarely get dropped into it unknowingly/unexpectedly.


Also: Emacs is rarely if ever used in the terminal today, and exiting it through the standard desktop protocol ([X], Ctrl-[Shift]-Q, Alt+F4, ...) always works.


I use emacs in a terminal all the time (usually in a tmux session, actually). That's how I learned it (in pre-GUI days) and so it feels pretty natural. I never use the mouse with emacs, even in a GUI session.


Note that GUI emacs doesn't mean using a mouse. I use GUI emacs but almost never interact with it with a mouse, I just have a server-enabled emacs running fullscreen in one of my virtual desktops.


We get so many people using it in terminals in #emacs. Obviously there's no way to know how many people are not using it in a terminal because they won't be asking GUI-specific questions. I and a few others do try to discourage the terminal users and nudge them towards the GUI which is more featureful, but some people really want to use a terminal at all costs.


I don't think that's true. System administrators will happily use it in a terminal. I'd often deliberately run emacs -nw when something requires a quick edit and the GUI would be imposing.


My anecdotal experience has been that no matter how many times I'm told how to exit Emacs I can't remember but every developer I have taught '<esc>:wq' to has remembered it after one or two times telling them what it is.


It's quite hard to get emacs to open for you when you don't want it. Harder still to get it without a GUI.

Overall, both are about as hard to deal with. Vim has a better help message, but it's still difficult to find.


Yep - I suspect people are less likely to stumble into emacs without any warning.


C-M-footpedal1-q


I seriously would like to have a pedalboard with, say, 5 pedals that i could map to specific functions on Emacs.

It would be terrific, particularly for Lisp development with SLIME.


Hmm.

MIDI foot controller -> USB MIDI interface -> computer -> driver -> user space scriptology ...

What do you think? That would easily give you ten pedals.

I use a 1993 vintage ART Ultrafoot X-15 I got off Craigslist --- for my guitar rig, not a text editor. :)

https://www.google.ca/search?q=ART+Ultrafoot+x-15&tbm=isch


Why not just play the piano for programming?


A MIDI foot controller isn't a musical keyboard (though such things do exist, mimicing organ pedals). It's used for MIDI program changes. I have a MIDI programmable guitar pre-amp, and so in combination with this pedal, I have access to various amp settings just by stepping on various buttons.


You got it wrong! It's more like:

C-M-handstand-q-footpedal



I wonder why foot pedals have never caught on... Seems like they would be genuinely useful!


They have. Kinesis have offered foot pedals for more than a decade. Personally I don't sit in a way that would work for me.


What you want is a handy WWW page to refer to.

* http://jdebp.eu./Humour/exiting-emacs.html


C-x C-c.

It's too easy to hit accidentally, though. I got burned by it a few times, so I eventually unbound the command. I now use M-x kill-emacs when I want to quit (very rarely, anyway).


The command is: M-x kill-emacs (or to save buffers before the exit: M-x save-buffers-kill-emacs).

Perhaps, exit-emacs or quit-emacs aliases could be defined.


Control X-C


Cmd-T killall emacs

;)


(kill-emacs) C-x C-e

Pretty straightforward.


> (kill-emacs) C-x C-e

> Pretty straightforward

If this is a joke, it's totally whooshing over my head right now


C-x C-e evaluates the Emacs Lisp expression before the point. This gives the same result as the much more obvious M-x kill-emacs, but with the added fun of writing and executing Lisp directly in whatever buffer you're in. So to close the editor, we've written some code in a weird ancient language into some random text file, fired up an interpreter that's probably so portable you can run it on a 1980s toaster, and executed an expression which we had to make sure was wrapped in those vile parentheses everyone loves to hate.

Straightforward.

But I just had to explain my own joke, so I'll go wallow in shame for the rest of the day. :(


No don't feel bad! It's a good joke I was just sleepy when I responded :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: