Live data from Hacker News

The single most useful Emacs feature

stackoverflow.com

51–60 of 112 posts

Re: The single most useful Emacs feature

#51
post #44
post #43

TRAMP. Being able to seamlessly remotely edit files and run remote modes. At work I regularly edit files on 10-15 remote machines. But I never ssh to them and run an editor. Instead I'll just visit them through TRAMP, run Magit to commit stuff that I've done etc.

My coworkers often don't even realize I'm editing a remote file or working in a remote shell. It's really that seamless. Of course, sometimes I forget I'm working remotely, and hilarity ensues. The worst episode was in a recent school project. I thought "oh, I'll just finish this on the train". And then, when I got on the train, realized I had actually been working remotely. Oops.

> It's really that seamless.

Not only is it seamless editing, you can actually use tramp to "cd" into a directory on a remote machine using eshell.

Re: The single most useful Emacs feature

#52
post #37

It's interesting that it's hard to explain, because the fingers will play the chord by themselves and I need to stop and think to know what I am actually typing. C-x r k to cut a rectangle, and C-x r t to add one filled with, for example, the comment symbol: (C-space)this to comment C-x r t # #this #to comment

I find cua-mode's rectangle support superior. http://trey-jackson.blogspot.com/2008/10/emacs-tip-26-cua-mo...

Re: The single most useful Emacs feature

#53
post #40

Earlier quoted context omitted.

I use package.el Any advantage to swapping to el-get?

Yes, package.el doesn't install arbitrary snippets from anywhere on the internet.

It takes about five minutes to take a library that isn't packaged and publish it on Marmalade, and then anyone can depend upon it.

el-get made lots of sense back in the day when package.el only supported tromey.com, but now that there's a community repository I don't see the point.

Re: The single most useful Emacs feature

#54
post #5

hi-lock-mode! Hi-lock lets you specify regexes to highlight anywhere in a file; it's like domain-specific font-lock. It's astoundingly useful in code review. For instance, given a giant blob of J2EE web handler code, I can eyeball one handler, recognize the annotation mapping the method to URL syntax, and then punch in a hi-lock regex to light up similar annotations everywhere in the file, then glance through the who…

Out of curiosity, do you use usually emacs for J2EE code?

I am an emacs user, but have been doing some J2EE stuff for the last few months, and have been getting really annoyed by the IDE's lately, and I was wondering if it was a wise choice to go with emacs for Java too.

Re: The single most useful Emacs feature

#55
post #40

Earlier quoted context omitted.

Yes, package.el doesn't install arbitrary snippets from anywhere on the internet.

It takes about five minutes to take a library that isn't packaged and publish it on Marmalade, and then anyone can depend upon it. el-get made lots of sense back in the day when package.el only supported tromey.com, but now that there's a community repository I don't see the point.

OK. My old complaints against package.el were as follows:

1. Packages need to be updated manually by maintainers. I can't use package.el to install the master branch of my favorite project on GitHub, or an old snippet on EmacsWiki.

2. Marmalade (the community repository) has licensing requirements for package inclusion.

Are those two assumptions incorrect?

Re: The single most useful Emacs feature

#57
post #5

hi-lock-mode! Hi-lock lets you specify regexes to highlight anywhere in a file; it's like domain-specific font-lock. It's astoundingly useful in code review. For instance, given a giant blob of J2EE web handler code, I can eyeball one handler, recognize the annotation mapping the method to URL syntax, and then punch in a hi-lock regex to light up similar annotations everywhere in the file, then glance through the who…

Out of curiosity, do you use usually emacs for J2EE code? I am an emacs user, but have been doing some J2EE stuff for the last few months, and have been getting really annoyed by the IDE's lately, and I was wondering if it was a wise choice to go with emacs for Java too.

I don't build J2EE apps; I just break them. We built our own code reviewing tool internally, which is what I use now, but I spent a few months reviewing things in Emacs deliberately once I learned about hi-lock mode.

I still do all my real dev in Emacs and have more than once put hi-lock to good use there.

I'd rather eat a bug than use Eclipse.

Re: The single most useful Emacs feature

#58
post #26

Earlier quoted context omitted.

I didn't know about occur, which is awesome and thanks. The benefit of hi-lock is that I can "read" code without actually having to "read" it. Instead, I can either set myself up to look for patterns of colors (function --- red line --- shit no blue line!), or set myself to serendipitously discover things as I actually do read code. I have never, ever, ever, ever figured out an Emacs "grep" that I liked enough to sto…

Have you tried ack? http://betterthangrep.com/ There are some ack-modes for emacs, too, eg. https://github.com/nschum/full-ack

I haven't, but I don't have a problem with grep, so much as I find there's exactly enough friction with Emacs grep integration to prevent me from ever taking advantage of it.

Re: The single most useful Emacs feature

#59
post #56

The kill ring. I would marry the kill ring and have its babies. Why have other editors not adopted this? Have they?

I wish the Windows Clipboard would implement a version of the kill ring. I really, really hate not having previous cuts and copies available. As a rather clumsy work-around I keep an emacs scratch file open on my task bar and copy stuff I might need more than once to it.

Re: The single most useful Emacs feature

#60
post #56

The kill ring. I would marry the kill ring and have its babies. Why have other editors not adopted this? Have they?

I wish the Windows Clipboard would implement a version of the kill ring. I really, really hate not having previous cuts and copies available. As a rather clumsy work-around I keep an emacs scratch file open on my task bar and copy stuff I might need more than once to it.

Same with the Mac clipboard.
Post reply on HN