Live data from Hacker News

Emacs Is My New Window Manager

howardism.org

61–70 of 166 posts

Re: Emacs Is My New Window Manager

#61
post #2

I'm a vim guy, but I've been wanting to try emacs for a long time. Any tip for a convert like me? Is the "trick" just to make the jump and persist until it clicks? How do I still get my job done in the mean time?

Being able to extend the browser with my own Elisp code turned out to be the hook for me; I'd encourage you to learn some Elisp right at the start.

Also, I've had good luck with Emacs Live. http://github.com/overtone/emacs-live

Re: Emacs Is My New Window Manager

#62
post #39

> I always grin when I read the change log in the release notes of any window manager project. It begins by complaining that all other window managers are bloated, and that this one will be small and efficient, [...] and soon the project is just as big as the competition I bet he doesn't grin thinking about how many things can Emacs do other than editing text. That said, I like people with peculiar workflows, they op…

Well, Emacs doesn't claim to be just a text editor. It's a living Lisp instance with text-editing utilities bolted on top of it.

Re: Emacs Is My New Window Manager

#63
post #25
post #12

Earlier quoted context omitted.

I disagree. I have been using the same init.el across Windows and Mac for several years. Hardly anything needs to be tailored but you can inspect the system-type variable if it is really necessary.

How do you handle package management? I just couldn't get things to go my way. Either it worked on Windows or Mac, not both. What flavour of Emacs are you using on Windows?

The biggest cross-platform difficulties are the emacs version and OSX.

Make sure all your computers have the same major version (all 23 or all 24; I recommend 24 as it actually has a package manager). OSX was for several years a problem for emacs as there were two or three incompatible ports that did things differently; it's probably gotten better over time.

As preavy said, the rest can be handled by checking the OS type, machine name, user name, etc in your init files (they're not just config files, they're emacs lisp programs that get run during startup).

I keep mine in a git repository to make syncing the changes over time easier.

Re: Emacs Is My New Window Manager

#64
post #8

I'm always a little jealous when I see what people do with emacs. But I've never liked using emacs, so I've resigned myself to a permanent, mild case of emacs envy. I think you could get approximately his same functionality with a terminal (e.g urxvt) and tmux for the splitting. In fact I do essentially that at work on Windows, from a cygwin terminal and tmux. When it fits whatever workflow I'm doing from within cygw…

The nice thing about Emacs is how much it's open to modification. There are compatibility modes to make it work like other editors (eg. "evil mode" to make it work more like Vi, "cua mode" to use "normal" key combos instead of having to learn Emacs's, etc.). There are often a bunch of alternative ways to do things, which have their own pros and cons, so if something seems frustrating, it pays to Google around a littl…

> Eshell's weakness compared to shell is that it can't do pipes.

I thought eshell had both pipes and output redirection but lacked input redirection.

Re: Emacs Is My New Window Manager

#65
post #56
post #2

I'm a vim guy, but I've been wanting to try emacs for a long time. Any tip for a convert like me? Is the "trick" just to make the jump and persist until it clicks? How do I still get my job done in the mean time?

After years of using vim I made the switch last Friday when I stumbled across this fellow's blog post while randomly trying to figure out more about evil mode: http://juanjoalvarez.net/es/detail/2014/sep/19/vim-emacsevil... It took all day Saturday to configure things so they mostly behaved the same as my vim environment, mixed with learning emacs specific stuff along the way. There's a few quirks I still need to wor…

I just hit the same issue, and I started using desktop-save-mode for that (https://www.gnu.org/software/emacs/manual/html_node/emacs/Sa...). It may be a bit heavyweight for instant switching, depending on what you want. I found it among a list of possible solutions at http://www.reddit.com/r/emacs/comments/1m73gs/how_do_you_man... .

Re: Emacs Is My New Window Manager

#66

Earlier quoted context omitted.

Emacs has many frustrating behaviors out of the box. Typo-> C-z->Crap->Grab Mouse->Expand Emacs Window->Scold self for not calling it a frame. "Frames v. Windows" thing aside, every behavior in Emacs is configurable. It's just that the default assumes that the user fired up Dired to seriously use Dired. The default assumes that the user is using Emacs as Dired and so it becomes Dired with lots of dedicated resources.…

Yeah, I do find it annoying how many Emacs-based applications assume they're the only thing running. I'm developing an application built on ProofGeneral, which itself is built inside Emacs. I ran the test suite one day and one function turned out to quit Emacs if it encoutered an error! It took out all of my open shells, files, etc. (everything was saved, but I had to open them all again). Now I'm running the tests i…

Do you have any other example of an Emacs application assuming it is the only thing running? I ask because I use Emacs a fair bit and don't think I've ever come across something like that.

Re: Emacs Is My New Window Manager

#67
post #42

What is the best way to actually learn emacs? I'm a vim guy who is curious enough to switch but I'd rather just hack the introductory process and get to the fun bits.

The most interesting cultural observation thats not often talked about is bare emacs and bare vi are equivalent-ish, but all the "cool" stuff in emacs is in the addons. If you just use bare emacs you'll think its pretty boring and not see any productivity gains. If you use a pre-packaged set for emacs, you'll be utterly overwhelmed trying to learn a million things at once. There are no pre-pack sets with just systemi…

I very much second this comment.

Learning Emacs is a very interactive process (much as Emacs itself). It's best to introduce new extensions one by one as you need them, and spending some time using them.

I consider myself a noob Emacs user (having been using it exclusively for the last 4+ years), and here's a trick I use if I feel overwhelmed/annoyed by some extension: I decide to spend 30-60 minutes (to the clock; personally I measure it in pomodoros) practicing the mode itself. Such focused learning gives wonderful results. For instance, I spent 30 minutes on learning multiple-cursors.el and now I can't imagine living without it. Or I was always confused by Paredit, but it took about one hour of practicing it to become proficient in it. Again, I now can't imagine working in Lisp without Paredit.

Discovering interesting modes can be a task in itself; I suggest browsing through at least Emacs Rocks short videos[0], they introduce many a handy utility.

[0] - http://emacsrocks.com/

Re: Emacs Is My New Window Manager

#68
This is awesome and has opened my eyes to features of emacs I didn't know about. But I still have use for tmux because it lets me attach to the same long-running session on a remote host from multiple clients. I'll probably just start having emacs be the only window open in my tmux session.

Re: Emacs Is My New Window Manager

#69

Earlier quoted context omitted.

Yeah, I do find it annoying how many Emacs-based applications assume they're the only thing running. I'm developing an application built on ProofGeneral, which itself is built inside Emacs. I ran the test suite one day and one function turned out to quit Emacs if it encoutered an error! It took out all of my open shells, files, etc. (everything was saved, but I had to open them all again). Now I'm running the tests i…

I know it's the internet and the standard assumpution is that what I wrote is a complaint. But just to be clear, I don't find Emac's behavior annoying. I find it empowering. The idea that I might know what I am doing and be doing it seriously is refreshing. Even if I don't. I get annoyed with the fact that I don't know Emacs better. But I love the fact that I can change that fact. I love that there's something else t…

Well, I was mostly piling my own complaints on top of what you said. I also agree that Emacs is wonderful, and I agree that it's great how much power it gives us to reconfigure everything. However, that doesn't make it perfect. It's completely legitimate to point out flaws, whether they're actual bugs, subjective annoyances or hand-wavey project-wide things.

For example, I think that the Emacs community should embrace starter kits more when encouraging others to get started. Of course there's some truth to the "thrown in at the deep end" and "get to grips with the real, inner-workings" approaches, but at the same time the line has to be drawn somewhere; I doubt many would recommend new starters to compile Emacs themselves.

Still, Emacs is certainly not as scary as many make it out to be. This week I was helping out a Haskell programming class of CS students, where the instructions included setting up Emacs and installing haskell-mode (in Emacs 23, so they had to install the package manager first!). Out of a group of 60, only one struggled to do this, and it turned out to be because the sysadmin hadn't installed Emacs on the machine he was using ;)

Re: Emacs Is My New Window Manager

#70
post #19

If only eshell was more usable. My favourite setup so far is i3 + emacs + xterm.

There's eshell, shell and term, each with tradeoffs (see on of my other comments). I have an external terminal running tmux and a bunch of curses programs (wicd-curses, alsamixer and cmus) but do everything else in shell mode or eshell mode. To me, the killer feature of shell mode is the ability to manipulate the buffer contents like any other file. The killer feature of eshell is its built-in TRAMP support, for mani…

Does eshell lack pipes? I thought it had pipes and output redirection and lacked only input redirection.
Post reply on HN