Live data from Hacker News

Emacs Is My New Window Manager

howardism.org

31–40 of 166 posts

Re: Emacs Is My New Window Manager

#31
Xmonad, Emacs, a terminal and Chrome pretty much do the same thing for me on Ubuntu desktop, possibly with a little less pain. Mostly mouse free operation, and easy resizing, swapping etc.

If you want to learn Emacs, just jump in head first. Try and use it like a native. Just for kicks I'm trying to do the same with vi by forcing myself to use it for anything vaguely sysadmin related.

Re: Emacs Is My New Window Manager

#32
post #30

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.

I was a heavy Vim user, and what worked for me was forcing myself to use emacs for a project. Other people use evil-mode, but I kept the standard key bindings. Use the help as much as you can, and learn about functions like C-h k and C-h m. I stayed with emacs for org-mode, for buffer management, and then for projectile, magit, flycheck, mu4e, etc etc...

I'm a self-considered emacs user, but I like evil-mode. But I'd also recommend sticking to just emacs when switching (I think 20-30 days of "only emacs keybindings" may be enough) to learn a little about its normal keybindings. It's important to know where you are moving, even if then you change the furniture ;)

Re: Emacs Is My New Window Manager

#33

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.

Something waiting to be done: a /Handmade Hero/-style webcast by a vim fan who wants to create vim usage within emacs, from scratch. The warm-up week could be a guide to lisp.

Re: Emacs Is My New Window Manager

#34

Xmonad, Emacs, a terminal and Chrome pretty much do the same thing for me on Ubuntu desktop, possibly with a little less pain. Mostly mouse free operation, and easy resizing, swapping etc. If you want to learn Emacs, just jump in head first. Try and use it like a native. Just for kicks I'm trying to do the same with vi by forcing myself to use it for anything vaguely sysadmin related.

I agree that that is the best way to learn Emacs (and vi/vim). For me, the hard part wasn't so much learning to navigate Emacs as it was customizing it to my liking. The basics of Emacs are pretty straightforward (unlike vim, which takes a while to get used to), but using it well requires you to understand how to install packages and at least read emacs lisp.

Re: Emacs Is My New Window Manager

#35
One can get the same effect (full-screen emacs, no window decorations, Lisp) with stumpwm, a window manager written in Common Lisp. It's under active development, but it has not so far succumbed to creeping featuritis.

And one can then run Firefox instead of Chrome…

Re: Emacs Is My New Window Manager

#36
post #15

My impression has been that emacs is a poor window manager. Granted, I am not incredibly skilled with emacs but even after some weeks I was still confused by the way emacs opened up new windows or changed existing windows when you've clicked on something (for instance, in dired or org-mode's agenda) I ended up to open everything in a new frame and left the management of these frames to awesomewm.

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. Orgmode is the same way. They don't constrain the amount of information they show in deference to other activities.

Re: Emacs Is My New Window Manager

#37
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 little to see if there's another way.

For example, running a terminal can be done with `term` (b/w) or `ansi-term` (colour), which provide a pretty standard xterm-like terminal emulator, completely under the control of whatever shell you use (eg. bash). This is useful for screen-manipulating programs like ncurses-based UIs, but is awkward to manipulate as text (a bit like the awkward copy/paste functionality in screen and tmux).

There's also `shell`, which runs a regular shell (like bash), but Emacs keeps control of the screen. This makes it useless for curses-based UIs, but great for text manipulation. For example, rather than running a pipeline over and over, tweaking the output options, we can often just dump everything to stdout then play around with it using the full power of Emacs (search/replace, regexes, keyboard macros, lisp functions, etc.).

There's also `eshell`, which is like shell mode but instead of a regular shell like bash, it uses a custom shell written in Emacs Lisp. Eshell's strength is its integration with Emacs; for example, Emacs Lisp functions can be run just like commands and Emacs buffers (including shells!) can be treated as files, etc. Eshell's weakness compared to shell is that it can't do pipes.

Personally, I use mixture of shell and eshell, plus some handy Lisp functions eg. for spawning new shells instead of always switching back to the same one. I avoid term and ansi-term in favour of a separate st terminal though, since they're pretty slow to update and their lack of decent text manipulation makes them feel uncomfortably "un-Emacsish".

Re: Emacs Is My New Window Manager

#38
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…

What do you use i3wm with?

I like Debian and wonder if there's a best practise setup for desktop environment plus i3wm. Everyone seems to do something different and the setups I've seen have all had minor quirks (wifi tray icon, sound control, locking, etc).

Currently my main machine is Ubuntu 14.04 with Xcfe and i3wm and I have a few quirks (something about the keyboard charset picker never aligning with the Xcfe tray).

Re: Emacs Is My New Window Manager

#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 open up ideas and discussions.

p.s. xmonad + vim is the true way ;-)

Re: Emacs Is My New Window Manager

#40
post #15

My impression has been that emacs is a poor window manager. Granted, I am not incredibly skilled with emacs but even after some weeks I was still confused by the way emacs opened up new windows or changed existing windows when you've clicked on something (for instance, in dired or org-mode's agenda) I ended up to open everything in a new frame and left the management of these frames to awesomewm.

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 in a dedicated Emacs process, launched via a command from eshell!

Post reply on HN