[HN Gopher] Emacs is my new window manager
       ___________________________________________________________________
        
       Emacs is my new window manager
        
       Author : Paul-Craft
       Score  : 123 points
       Date   : 2023-08-01 18:31 UTC (4 hours ago)
        
 (HTM) web link (howardism.org)
 (TXT) w3m dump (howardism.org)
        
       | emersion wrote:
       | (2015)
        
       | krylon wrote:
       | As much as I love emacs, that is too spartan for me. I would _at
       | least_ run OpenBox, it is lightweight and unobtrusive. That way I
       | could still run emacs in full screen mode, and escape to a web
       | browser gracefully if needed. I am not that much of a minimalist.
       | 
       | But I won't criticize other people's desktop environments, if it
       | works for them, I wish them hours and hours of joy.
        
       | matrix12 wrote:
       | Until GNUs is hit with the g command.
        
       | pjmlp wrote:
       | An idea tried multiple times, that always fails short of using a
       | proper Lisp Machine.
        
         | [deleted]
        
       | pxc wrote:
       | This is the blog of Howard Abrams, who also has a great YouTube
       | channel full of Emacs demos and tutorials.
       | 
       | His video on literate programming for DevOps via Emacs' Org-mode
       | was very impressive and inspiring to me. It's my favorite. :)
       | 
       | https://youtu.be/dljNabciEGg
        
       | [deleted]
        
       | Y_Y wrote:
       | The only thing missing from emacs taking over my life like this
       | is a simple to connect to remote emacs server. I want to have my
       | perfect config live on some server somewhere and then connect to
       | the with my local emacs client, and then maybe tramp back if I
       | need to deal with something local. Seems like it should be simple
       | enough but I still haven't managed it.
        
         | cutler wrote:
         | What's wrong with Github?
        
       | ranger207 wrote:
       | Now you just need a good text editor...
        
         | ParetoOptimal wrote:
         | https://github.com/meow-edit/meow
         | 
         | Modal editing with seamless emacs integration avoiding the need
         | for evil-collection type packages.
        
       | whalesalad wrote:
       | I wish I had the enthusiasm, grit and dare I say "sisu" that lisp
       | developers possess. I worked with a guy - very skilled Clojure
       | developer - who was an absolute wizard in Emacs. If a car company
       | sold a vehicle that was powered by emacs, he would have bought
       | it. He will probably construct his own casket out of elisp to be
       | buried in.
        
         | dmvdoug wrote:
         | "And death i think is no parenthesis"
         | 
         | (e.e. cummings)
        
         | gumby wrote:
         | Emacs was not originally written in Lisp and is a great
         | programmer's (and general) editor even if you never touch or
         | think of Lisp. You can even write (and save and edit) keyboard
         | macros knowing no programming at all.
        
           | sdfghswe wrote:
           | Didn't emacs give Stallman RSI? No thank you, I'll still with
           | vim.
        
             | mksybr wrote:
             | Scary stuff!
             | 
             | http://xahlee.info/emacs/emacs/emacs_hand_pain_celebrity.ht
             | m...
        
         | krylon wrote:
         | zile is an attempt to create an equivalent to GNU Emacs using
         | Lua instead of Lisp. There was an attempt to merge the GNU
         | Guile engine into emacs to replace the elisp bytecode VM; Guile
         | would have supported, in addition to elisp, Scheme and
         | Javascript. But last I heard the project had stagnated or
         | fizzled out entirely.
         | 
         | One might argue that VS Code is using Javascript in a similar
         | manner to Emacs using elisp, but ... it just doesn't feel the
         | same to me. I have very little experience with VS Code, though,
         | so I might be mistaken.
        
           | whalesalad wrote:
           | my problem with emacs is not lisp, lol. lisp is great.
        
       | shadowgovt wrote:
       | > Whenever a page doesn't render well (can you say JavaScript)
       | 
       | I mean, yeah, emacs doesn't have a modern browser engine in it. I
       | wouldn't recommend it for that use case and of _course_ you 'll
       | have to "shell out" to a modern browser engine to handle that.
       | Now, if emacs could somehow provide an X render target and let
       | the browser process bind to it as the window, that would be kind
       | of awesome and I could totally see kicking my window manager
       | overboard and just switching to emacs. But the web just "looks
       | wrong" text-only these days.
       | 
       | Apart from that, great experiment and fun idea.
        
         | jaccarmac wrote:
         | I'm not familiar with X internals and am not sure if it's the
         | same thing, but EXWM basically allows that (browsers run in
         | buffers).
        
       | lvncelot wrote:
       | See also EXWM[1]
       | 
       | [1] https://github.com/ch11ng/exwm
        
         | zvmaz wrote:
         | The developer has been missing on GitHub since 2020 [1]
         | 
         | [1] https://github.com/ch11ng/exwm/issues/845
        
           | dustfinger wrote:
           | There have been some releases since then though [1] and
           | recent commits [2]
           | 
           | [1]: https://github.com/ch11ng/exwm/releases
           | 
           | [2]: https://github.com/ch11ng/exwm/commits/master
        
       | ycombinete wrote:
       | I have always enjoyed Howard's posts about eMacs and orgmode.
       | Great to see the two at the limits.
        
       | jll29 wrote:
       | RMS uses Emacs as its window manager, too, but without X11 (his
       | ThinkPad runs in text mode).
        
       | thewanderer1983 wrote:
       | While reading this article i was hearing this guys voice.
       | https://youtu.be/urcL86UpqZc
        
       | blackpill0w wrote:
       | >and since Emacs is in its graphical mode, I can use my favorite
       | fonts, decorate the fringe, etc.
       | 
       | Except when you want to use stylistic sets, is Emacs planning to
       | support them in future releases or are they out of the
       | discussion?
        
       | nathants wrote:
       | emacs is a good manager for terminals. i use it instead of tmux.
        
         | matrix12 wrote:
         | I tell coworkers who ask "It's Emux... tmux but graphical!"
        
           | nathants wrote:
           | i run emacs in a terminal. graphics emacs is too fancy for
           | me.
           | 
           | i've got firefox and webkit2gtk if i'm feeling fancy.
        
         | pxc wrote:
         | I decided to finally give tmux a break and experiment with
         | other terminal emulators lately, after enjoying living in tmux
         | for a long time. I started playing with kitty first, which I'm
         | still using. But more recently I've decided to try making more
         | use of vterm, and so far I like it a lot!
        
         | noman-land wrote:
         | I love tmux and have been wanting to dip my toes into emacs. Is
         | there a tutorial or migration guide you could recommend?
        
           | nathants wrote:
           | plenty of emacs resources around. i would suggest multi-term
           | for terminals. text file and terminal management is very
           | similar.
        
           | ParetoOptimal wrote:
           | https://www.masteringemacs.org/book
           | 
           | There are good free ones too, but this one is still best IMO.
        
       | bitwize wrote:
       | Lisp is life, Emacs is hometown.
        
         | pjmlp wrote:
         | Nah, that belongs to Genera, TI and Xerox PARC.
        
       | ttyprintk wrote:
       | Feels like an X-Windows emulator for your corporate OS with extra
       | overhead.
        
       | gumby wrote:
       | On the original gnu machine (a Vax 750 that had been lying around
       | unused) I made emacs my shell in /etc/passwd. The machine had BSD
       | Unix on it and that was so unpleasant I preferred to go straight
       | into emacs.
       | 
       | Nowadays of course, SVr4 Unix/Linux is the _best_ you can get.
       | How the mighty have fallen.
       | 
       | The /etc/passwd entry was actually a one-page trampoline that
       | exec'ed emacs (as -emacs of course) or, if invoked under anything
       | other than init, /bin/sh for the subprocess of emacs case -- bash
       | hadn't been written yet.
        
         | eichin wrote:
         | Around the same decade I did a similar thing with an athena
         | vaxstation under X; I noticed recently I still had the same
         | hacks in my emacs startup to keep M-x shell from starting
         | another emacs (I didn't use the trampoline trick, just
         | literally chsh /bin/athena/emacs.)
        
         | Y_Y wrote:
         | "Hey dude, how come you're using emacs as your login shell, are
         | you stupid?"
         | 
         | "Nah, it's cool, bash doesn't exist yet."
         | 
         | "Cool."
        
       | tetris11 wrote:
       | Dont. Emacs is there to be tinkered with, and your cat will break
       | it by simply looking at your keyboard.
       | 
       | I love Emacs. I develop for it, financially support it, live it
       | everyday. The last thing you want is to be stuck debugging your
       | failed desktop session on Tuesday morning at the airport as your
       | wife waits for you to find the tickets.
       | 
       | If you love Lisp, give StumpWM a try. Simplicity, DWM. Simplicity
       | with modularity? AwesomeWM just works.
       | 
       | Keep your Emacs config away from your system packages. The latter
       | should prop up the former, not vice versa
        
         | sharts wrote:
         | That shouldn't be a problem because in that case your wife's
         | boyfriend will keep her company while you tinker with your
         | configs.
        
           | glouwbug wrote:
           | We should keep reddit on reddit
        
         | ssivark wrote:
         | Is there a Wayland compatible WM analogue of Awesome?
        
           | Elv13 wrote:
           | (AwesomeWM co-maintainer here)
           | 
           | From the point of view of tiling, Sway is an i3 clone for
           | wayland.
           | 
           | For AwesomeWM as a programming sandbox WM, it is much tougher
           | to get something identical. A lot of AwesomeWM work goes into
           | APIs, CI and documentation. Making a scriptable WM using
           | wlroot isn't the end of the world. Making one with mature
           | APIs, backward compatibility, high test coverage, an active
           | userbase large enough to sustain a plugin ecosystem and
           | extensive documentation is much harder.
           | 
           | Making AwesomeWM 100% wayland compatible has been attempted a
           | bunch of time, getting 80% working has been done a few time
           | too, but the last 20% is like 95% of the effort or something
           | and those projects keep stalling. From my side, I put the
           | little free time I have for this into actually realistic
           | features and maintenance work, at least until there's an
           | actual reason to move away from X11. Most users at this point
           | have been using it for years or even over a decade. They want
           | their setup to keep working the next morning over #newshiny.
        
         | pxc wrote:
         | Read the article! This instance of Emacs runs in a VM he uses
         | for accessing and editing his personal tech notes at work, to
         | provide better separation from his work system. He's not
         | risking much. :)
        
         | kehrin wrote:
         | > and your cat will break it by simply looking at your
         | keyboard.
         | 
         | Being off by one column of keys on your keyboard can really be
         | a death sentence to your buffer (and maybe even codebase).
        
           | ParetoOptimal wrote:
           | That would be your fault for not writing prompts for
           | dangerous actions in your elisp automation though.
        
             | kehrin wrote:
             | Most of the danger (for me) comes from evil-mode. Adding
             | prompts wouldn't make sense there ;P
        
           | aldanor wrote:
           | ... and maybe even your hard drive
        
           | noman-land wrote:
           | This sounds like running heavy machinery with no safety
           | equipment. Is it really desirable to have a system that would
           | behave this way?
        
             | donio wrote:
             | The parent is just being ridiculous, Emacs of course has
             | undo, auto-save and version control. And unlike in certain
             | modal editors it's pretty hard to do any real damage
             | without touching Control or Meta.
        
             | kehrin wrote:
             | Eh, there is plenty of safety equipment. Mainly undo-tree
             | and magit.
        
         | RcouF1uZ4gsC wrote:
         | > your failed desktop session on Tuesday morning at the airport
         | as your wife waits for you to find the tickets.
         | 
         | Does Richard M Stallman look someone who cares about your wife
         | getting upset for missing the plane while you fiddle with
         | Emacs? That use case of Emacs enabling you to browse the web
         | (accessing the airline's website which runs non-free software)
         | and check-in so you can ride on an airplane(which also uses
         | non-free software) is not something that in his goals for
         | Emacs.
        
         | tomcam wrote:
         | Actually your wife might be happy to know that I have developed
         | some nearly stable Emacs packages that interface with the Sabre
         | system for airline reservations. The only drawback other than
         | stability is that they require a SPARC workstation running a
         | special variant of FreeBSD.
         | 
         | /s
        
           | UniverseHacker wrote:
           | That's why I have a SparcStation LX. Fits in the carryon for
           | travel much better than a pizza box. Even easier to travel
           | with now that I can use an LCD and don't need to lug around
           | the 'ol Trinitron.
           | 
           | With an inverter and a car battery in my backpack I can even
           | show a digital/ on screen boarding pass with a full 8 bits of
           | color.
        
             | neilv wrote:
             | The Sun god, Scott McNealy, has heard our prayers, and
             | answered us with the V'ger:
             | 
             | https://ifdesign.com/en/winner-
             | ranking/project/sparcstation-...
        
             | tomcam wrote:
             | No matter how good I think I am, I always know there's
             | someone better on this board!
        
             | datalus wrote:
             | The username definitely checks out.
        
         | ParetoOptimal wrote:
         | > Dont. Emacs is there to be tinkered with, and your cat will
         | break it by simply looking at your keyboard.
         | 
         | Then you simply roll back to the working git commit of your
         | emacs configuration or NixOS generation!
        
           | blackpill0w wrote:
           | >or NixOS generation
           | 
           | Yes! NixOS is perfect for the author's situation. But maybe
           | his setup is so simple that a little bash script could work
           | just fine.
        
           | hollerith wrote:
           | I'm good enough at remembering to test my changes that I only
           | need to resort to my backup of my emacs customizations 4 or 5
           | times a year.
           | 
           | (I test by starting a second emacs, so I can used the still-
           | running first instance of emacs to fix the regressions.)
        
             | Paul-Craft wrote:
             | Same(-ish) here. Between git and emacs auto-save, I don't
             | recall the last time my init file failed to load without
             | being able to revert to a previous working version almost
             | immediately.
        
           | lvncelot wrote:
           | When I got cachix set up in Github CI with my custom emacs
           | package that pre-builds and compiles my configuration
           | including packges, I was as giddy as when I started
           | programming. It's over-the-top, unnecessary, overkill, and an
           | absolute blast. Stuff like this is the reason why I've gotten
           | into this whole thing.
           | 
           | (Also, I think overengineering stuff like this is almost an
           | outlet, which helps me stay pragmatic and goal-oriented at
           | work)
        
         | cbsmith wrote:
         | Everyone remember ol' GWM?
         | 
         | https://tronche.com/gui/x/gwm/html-manual/overview.html
        
         | bachmeier wrote:
         | > The last thing you want is to be stuck debugging your failed
         | desktop session on Tuesday morning at the airport as your wife
         | waits for you to find the tickets.
         | 
         | They should be on your phone or you should use your credit card
         | to print them at the airport. I'm sure there are other examples
         | that make your point though. Yours reminded me of the furniture
         | salesman selling a warranty on a couch by saying it'd cover the
         | cost of getting the blood out, or even give you a replacement,
         | should you sit on a scissors and cut your legs up.
        
         | femiagbabiaka wrote:
         | The problem here isn't Emacs, it's the imperative style of
         | package management. Use Nix and then it is very hard to
         | irredeemably bork your stuff
        
         | peterhil wrote:
         | I came here to recommend AwesomeWM also.
         | 
         | Here is my setup, written in Fennel Lisp: peterhil/awesome-
         | ultraviolet: Awesome WM theme with dark violet colours
         | https://github.com/peterhil/awesome-ultraviolet
         | 
         | Peter Pan on Twitter: "@app4soft @probonopd @MX_Linux
         | Screenshot of my #AwesomeWM setup. https://t.co/2XMnDEdJfN" / X
         | https://twitter.com/peterhil/status/1463914949491761164/phot...
        
           | cutler wrote:
           | The ultimate Awesome setup has to be that used by Daniel Berg
           | and Julian Assange in The Fifth Estate. Plenty of Lua and
           | Python scrolling frantically but I don't remember seeing any
           | Emacs.
        
         | donio wrote:
         | I've been using EXWM since 2016 and this hasn't been a problem
         | for me. Emacs doesn't just magically break on its own. And even
         | if I managed to break my config without noticing it the fix is
         | just a git revert away.
         | 
         | I used StumpWM for many years before EXWM and I don't see how
         | the config situation is any different.
        
           | actionfromafar wrote:
           | The solution is obviously to run the Emacs window manager in
           | Docker.
        
             | bexsella wrote:
             | Without Kubernetes? I'd like to read about the details of
             | how you manage that load.
        
               | actionfromafar wrote:
               | All keypresses are inspected by Serverless llamas in
               | Azure. Quite trivial.
        
           | dustfinger wrote:
           | I have been using it since 2017 and I have no problems to
           | report that were specific to EXWM. I also use EXWM on my work
           | dev machhine and have set EXWM as the windows manager for my
           | kids computers.I absolutely love it. If you want the best
           | experience, I recommend compiling emacs >=29 and configure it
           | for native lisp + tree-itter so that you can get the most
           | from eglot.
           | 
           | I have run into issues with the odd package, but nothing that
           | has ruined my day.
        
         | TacticalCoder wrote:
         | > AwesomeWM just works
         | 
         | I use AwesomeWM since forever, with about 12 virtual
         | desktops/workspaces. Nice thing is: it's a tiling WM but I can
         | still put some of the workspace in "floating" mode and they
         | then behave not unlike windows on a regular desktop (which
         | makes some programs happy).
         | 
         | FWIW I'm also a big Emacs user.
        
           | BaculumMeumEst wrote:
           | you can do this in stumpWM as well
        
           | markstos wrote:
           | Sway allows toggling floating and tiled as well.
        
           | natrys wrote:
           | The feature that keeps me is that same client can be tagged
           | in multiple workspaces, and it just exists in different
           | layouts. It's a little buggy in the 4.3 tree, but fixing
           | focus issue in my config was easy enough, that's the cool
           | thing about hackable software.
           | 
           | This feature is the one of the biggest reasons I haven't
           | tried something like EXWM or StumpWM yet. I really like
           | AwesomeWM but can't say the same about Lua.
        
             | Elv13 wrote:
             | > It's a little buggy in the 4.3 tree
             | 
             | I was working on fixing some of those bugs last weekend.
             | Can you clarify which annoys you the most so I can add unit
             | test later this evening? tl;dr; The main problem is that
             | the z-index stack and client list are global and this cause
             | changes to one tag to affect another. I am moving those
             | structure into per-tag trees rather than global stacks.
        
         | taeric wrote:
         | I'm curious why you would be fumbling in your computer trying
         | to find tickets.
         | 
         | I do find the plethora of window managers interesting. Is that
         | same level of exploration going to exist in wayland? My
         | understanding was that the job of a window manager is very
         | different in that world.
        
           | shadowgovt wrote:
           | > I'm curious why you would be fumbling in your computer
           | trying to find tickets.
           | 
           | I mean, it's certainly a joke, but because jokes are always
           | better explained (/s) it's because most airlines offer the
           | option of paperless ticket emails these days, and if you
           | don't have a smartphone, you'll have to bring up the image on
           | a desktop so they can scan it at the gate.
        
             | taeric wrote:
             | Right, I mostly get that. I have literally never seen
             | anyone use a computer at airport security. As such, the
             | joke falls rather flat. Would be better on a story about
             | using emacs on your phone?
        
               | Name_Chawps wrote:
               | Some people print their tickets at home. That's what I
               | assumed they meant.
        
               | taeric wrote:
               | I should have also said I meant my quip mostly in jest,
               | as well. I don't actually question why they would be
               | doing something I know they aren't actually ever doing.
               | :D
        
         | zvmaz wrote:
         | > AwesomeWM just works.
         | 
         | I used tiling window managers for years (I started with wmii,
         | and I even used ESXM), but now I'm settled on Gnome: Everything
         | works out of the box, and it's mostly keyboard driven. I don't
         | know if there's a good argument for me now to return to tiling
         | window managers.
        
           | adiM wrote:
           | A bit attraction of _tiling_ WMs is ... automatic tiling of
           | windows. Does Gnome do that (haven't used it seriously in
           | about 2 decades)?
        
             | zvmaz wrote:
             | No, it does not natively, but there's discussion to do that
             | [1].
             | 
             | There was a discussion here about it a few days ago [2].
             | 
             | [1] https://blogs.gnome.org/tbernard/2023/07/26/rethinking-
             | windo...
             | 
             | [2] https://news.ycombinator.com/item?id=36880235
        
           | Phelinofist wrote:
           | You can have both with the Forge extension:
           | https://extensions.gnome.org/extension/4481/forge/
           | 
           | Add Space Bar and you are close to e.g. i3.
        
         | scrame wrote:
         | I'm sure his wife has the tickets on her phone.
         | 
         | also, this is specifically for a personal vm on a work machine,
         | right?
        
       | filereaper wrote:
       | Emacs Enthusiasts unite https://youtu.be/urcL86UpqZc
        
         | quux wrote:
         | "But it's all lisp based... and astonishingly slow"
        
         | dmvdoug wrote:
         | Honestly, my comment was going to be that this is the most
         | emacs thing I've seen today, especially with other users,
         | chiming in with 17 different options he could try.
         | 
         | "I spend more time customizing my computer than using it."
        
       | bandyaboot wrote:
       | Don't stop there. emacs as pid 1, or bust.
        
         | dustfinger wrote:
         | This was posted by someone else in the thread, but SystemE is
         | close to that dream [1]. There is also this HN thread [2] with
         | more interesting links:
         | 
         | > Using the tooling in this repo, I am able to boot from linux
         | to sinit as PID1, and from there to Emacs acting as PID2 using
         | --script mode, performing all typical rc.boot system
         | initialization using Emacs lisp until we hit the getty.
         | 
         | [1]: https://github.com/a-schaefers/systemE
         | 
         | [2]: https://news.ycombinator.com/item?id=33849963
        
       | kykeonaut wrote:
       | If this isn't the most, "Emacs is a great operating system..."
       | moment, I don't know what is.
        
         | yellowapple wrote:
         | Maybe SystemE? https://github.com/a-schaefers/systemE
        
           | actionfromafar wrote:
           | Makes more sense than systemd, honestly.
        
       | WhereIsTheTruth wrote:
       | That's, to me, the best form of an OS, linux gives me the ability
       | to shrink my desktop resource usage to a _strict_ minimum,
       | removing all the distractions, so I can focus on the task
        
       ___________________________________________________________________
       (page generated 2023-08-01 23:00 UTC)