Live data from Hacker News

Emacs, naked

bzg.fr

171–180 of 201 posts

Re: Emacs, naked

#171
post #73

I've found the latest revisions of Emacs to be incredibly ugly, and I have to turn off most of the crap (menus, etc.) to be comfortable. Stock Emacs also seems to want to open up a minibuffer when I've told it "please just edit this set of files". It's also got some idea that I want to to suspend the shell I launched it from (er, no, not ever). The argument I see on forums is: "Well, the right way to use Emacs is to…

This is the same problem I've run into. I want to try living in Emacs, because there's pretty much a mode or package for everything, but a few of the basics don't work quite right to a point where that is usable yet. For instance, terminal emulation. There's terminal mode and eshell, but if you have even a mildly complicated PS1, all you get are control codes everywhere. Just strange, off-kilter behavior.

At this point, I'd be happy if I could just embed iTerm2 in a buffer and be done with it.

Re: Emacs, naked

#172

Earlier quoted context omitted.

You can hit Esc before the combination to fill in for M and then it is just C-S-5 for me, which is certainly doable?

In some (most, I thought, but maybe I'm wrong) terminals, you can only use the control key to generate an actual control character -- i.e. one of ASCII 0-31. The ctrl key basically unsets bit 64 from the typed key, so ctrl-A through ctrl-Z generate ASCII 1-26, ctrl-@ generates ASCII 0 (though traditionally ctrl-spc gives this as well), and ctrl with [ \ ] ^ _ generate the remaining ASCII 27-31. Ctrl-? sometimes gener…

No, you're right. As far as I know, standard vt100/ANSI terminals do not have any special escape sequences for control key combinations that don't map directly into ASCII.

Re: Emacs, naked

#174
post #73

I've found the latest revisions of Emacs to be incredibly ugly, and I have to turn off most of the crap (menus, etc.) to be comfortable. Stock Emacs also seems to want to open up a minibuffer when I've told it "please just edit this set of files". It's also got some idea that I want to to suspend the shell I launched it from (er, no, not ever). The argument I see on forums is: "Well, the right way to use Emacs is to…

This is the same problem I've run into. I want to try living in Emacs, because there's pretty much a mode or package for everything, but a few of the basics don't work quite right to a point where that is usable yet. For instance, terminal emulation. There's terminal mode and eshell, but if you have even a mildly complicated PS1, all you get are control codes everywhere. Just strange, off-kilter behavior. At this poi…

Have you tried "M-x ansi-term" ?

Re: Emacs, naked

#175
post #168
post #38

Earlier quoted context omitted.

(shameless plug) And don't you want the current weather to go alongside your Nyan, thanks to an Emacs minor mode inspired by a Hacker News comment? https://github.com/aaron-em/weatherline-mode.el

Any chance of getting this added to MELPA? :)

Sure! There are a couple of issues I want to close on it first, though, so it may be a little while; on the other hand, once I've done that, it'll be a lot niftier than it is right now, and a bit more reliable besides.

Re: Emacs, naked

#176
post #174

Earlier quoted context omitted.

This is the same problem I've run into. I want to try living in Emacs, because there's pretty much a mode or package for everything, but a few of the basics don't work quite right to a point where that is usable yet. For instance, terminal emulation. There's terminal mode and eshell, but if you have even a mildly complicated PS1, all you get are control codes everywhere. Just strange, off-kilter behavior. At this poi…

Have you tried "M-x ansi-term" ?

Yup. It only looks slightly less weird than eshell or regular term mode. Still makes my ZSH prompt look screwy and still causes strange breakage with apps (iotop was completely unusable, for instance, as was anything ncurses based)

Re: Emacs, naked

#177
post #53

Earlier quoted context omitted.

The slow emacs startup problem can be mitigated by lazily loading custom modes as much as possible. The two big things to use here are autoload (instead of require) and eval-after-load. On my machine, a vanilla emacs startup is ~70ms, and one with my fully-loaded .emacs is ~240ms. Still not as fast as I would like, but not terrible. (You can benchmark emacs startup from the command line with "time emacs --eval '(save…

Using the Customize interface also helps. Variables that are customized go in a big list and don't get set individually, nor do they require their library to be loaded before they've been set. A few years ago I went through my 10 years of accumulated .emacs cruft and switched everything I could to customize, and everything I couldn't to the technique you describe. I sped my emacs startup time from eight seconds down…

Nice, I didn't know customize was faster. I'll have to try that.

emacsclient doesn't really work w/ my workflow -- when I want a new emacs, I really want a new emacs. Also worth noting you get something similar "for free" when using the gui emacs on MacOS, via open -a Emacs (I use an alias).

I wonder if you couldn't somehow snapshot the state of emacs and dump it for a truly fast startup?

Re: Emacs, naked

#178

(shameless plug) Don't you want a nice Nyan Cat in that modeline in the sky? ;). http://nyan-mode.buildsomethingamazing.com/

Even though 'Nyan Cat' breaks things other plugins I'd like to use (like Powerline.el) - I still use it anyway. It's silly and I'm glad you made it.

Thank you! :).

Could you tell me (or open an issue on Github) how it breaks other plugins?

Meh, I have lots of changes to add, but I keep procrastinating here on HN instead...

Re: Emacs, naked

#179
post #73

I've found the latest revisions of Emacs to be incredibly ugly, and I have to turn off most of the crap (menus, etc.) to be comfortable. Stock Emacs also seems to want to open up a minibuffer when I've told it "please just edit this set of files". It's also got some idea that I want to to suspend the shell I launched it from (er, no, not ever). The argument I see on forums is: "Well, the right way to use Emacs is to…

If you prefer a more vim-like workflow (i.e. jumping in and out of your editor from your shell), a good solution is to fire up emacs in daemon mode to run in the background, and then connect to it using emacsclient.

I automatically run

  emacsclient --daemon
when my OS boots up.

In my .zshrc and .bashrc files, I use the aliases

  alias e='emacsclient -t'
  alias vi='emacsclient -t'
to give me quick access to emacs from the shell.

I'm not sure if this addresses your problems entirely, but it does keep you from having to deal with all of the crap that loads on startup.

Re: Emacs, naked

#180
post #96

Here is a screenshot of my emacs. http://farm8.staticflickr.com/7346/12104669276_154ae3d98f_o.... Scroll bars and menu turned off. Theme solarized and transparent background. I feel good when I am programming :)

A transparent background adds too much visual noise in my opinion. The same is true for line numbers.

Line numbers can be handy to locate compiler errors. I removed it once but then it became a lot harder to locate where the program was causing problems or where the compiler errors occurred. I would like to remove them but I guess I am stuck with it ....
Post reply on HN