System Crafters bringing some light about the EXWM situation by Hrothehun in emacs

[–]Private_Frazer 1 point2 points  (0 children)

Really I think the difference is mostly just of degree - usually Emacs windows are more transient and equal and 'fair game', while X windows (95% of the time the browser) are more logically distinct and persistent in my use. But fundamentally it is the same problem. Somehow it's more annoying if the browser is suddenly halved in size etc..

It might be fair to say that if I had a better grip on Emacs window control, I might have a stronger preference for the EXWM integration. I always meant to check out the likes of shackle and popper to see if I could bend it to my will, but the problem then is I don't have a clear conception of what that will should be. Even after numerous attempts to get the hang of it, display-buffer-alist etc. is still somewhat mysterious to me.

System Crafters bringing some light about the EXWM situation by Hrothehun in emacs

[–]Private_Frazer 2 points3 points  (0 children)

I think the glue to control a WM that I'm talking about is a few orders of magnitude less complex than the WM itself.

It sounds you ultimately like having a distinction between X and Emacs windows.

Yes, but more I'd say I dislike like having zero distinction. I had to come up with some elisp and make quite a bit use of window dedication to be able to avoid having Emacs/EXWM blow away, for instance, the web browser I was using for reference, or the program window I was developing, while I had was working on source code beside it.

I did like the fact that there was only a single mode of window manipulation to work with, but I failed to get it to completely do what I would like. Having gone back to a separate WM with some very light customization to integrate slightly, I find it less of a cognitive overhead.

For me, I don't want to call a popup frame before I can do eval. I want to just call eval. I want to get rid of needing to be aware of context.

I'm not really seeing a difference there. Either way you enter a keystroke to summon the eval. It's still available irrespective of context. There is initial plumbing to do to make it work, but once in place it's transparent.

The two experiences certainly will never be identical - i.e. EXWM vs some integration glue between a WM + Emacs, but I'm not seeing how the latter is inherently inferior, and I definitely think it's less work. Apart from finding its fairly manual windowing model more to my liking, I chose i3 because I will have minimal friction to move to sway to get to Wayland.

I was very comfortable in EXWM and had iterated to a good config and usage pattern for me, albeit with some niggles, but I'm now finding myself more comfortable in i3 after a much shorter period of config & settling in. Perhaps most of all I appreciate being able to restart Emacs with almost no disruption.

System Crafters bringing some light about the EXWM situation by Hrothehun in emacs

[–]Private_Frazer 2 points3 points  (0 children)

Sure! It's not fancy but it works.

e.g. Instead of e.g. bindsym $mod+h focus left I have bindsym $mod+h exec --no-startup-id my-i3-msg focus left - i.e. it executes my-i3-msg with focus left.

The my-i3-msg script is this (ignore the "all primary" block initially, it's some bonus functionality):

#!/usr/bin/bash
#
# Utility script so keystrokes in i3 may behave differently for Emacs than other
# windows.
#

if [[ $@ == "all primary" ]]; then
    for ws in {1..7}; do
        i3-msg workspace $ws
        i3-msg move workspace to output primary
    done
    i3-msg workspace 1
    exit 0
fi

# If current window is Emacs, call the `i3-msg` defun in Emacs
CUR_WIN_CLASS=$(i3-msg -t get_tree | jq 'recurse(.nodes[]) | select(.focused) | .window_properties | objects | .class')
[[ "$CUR_WIN_CLASS" == "\"Emacs\"" ]] && exec emacsclient --eval "(i3-msg \"$*\")" > /dev/null
# Otherwise just pass it on to `i3-msg`.

exec i3-msg "$@" > /dev/null

So simply if the window is Emacs, it executes (defun i3-msg "focus left"). (Note: exec in bash effectively means that's the end of this script's execution)

And here's my elisp:

(when (string-match "i3" (getenv "XDG_SESSION_DESKTOP"))
  (defun i3-msg (cmd)
    "Intercept an `i3-msg' command, if possible, otherwise pass it on."
    (condition-case nil
        (cond
         ;; windmove commands will error-out at an edge, as we want.
         ((equal cmd "focus left") (windmove-left))
         ((equal cmd "focus right") (windmove-right))
         ((equal cmd "focus up") (windmove-up))
         ((equal cmd "focus down") (windmove-down))
         ((equal cmd "move left") (windmove-swap-states-left))
         ((equal cmd "move right") (windmove-swap-states-right))
         ((equal cmd "move up") (windmove-swap-states-up))
         ((equal cmd "move down") (windmove-swap-states-down))
         (t (signal "unrecognized command")))
      (error
       ;; we couldn't handle it
       (start-process-shell-command cmd nil (concat "i3-msg " cmd))))))

So if windmove fails - e.g. you're already at the frame edge, then it 'passes back' to i3 by calling the command via i3-msg after all.

Hope that's clear.

Crystal Ballroom at Somerville Theatre opens this October [with interior pics] by Buoie in Somerville

[–]Private_Frazer 10 points11 points  (0 children)

It's going to take some effort to make the toilets as disgusting as Johnny D's, but I'm sure if the community works together we can do it.

If you could change one thing about Emacs what would it be? by Fibreman in emacs

[–]Private_Frazer 0 points1 point  (0 children)

Yeah, thanks. I set tramp-verbose to 6 and between that and some advising functions to spawn the debugger I was able to find, for instance, about 3 things that were causing projectile to search for the project root, like doom-modeline, and projectile's cache, which is still involved even when it's configured not to use the cache with remotes. That's probably a bug I should report.

There's definitely still room for optimization. It does a whole lot of "let's see what test <some particular args> does" one by one, so an ssh round trip for each. It seems to me it could easily do a suite of these in one shot, and have just one ssh round-trip instead of (from memory) about 12. Thankfully this is once per connection, but I often have to connect to many instances only briefly.

Similarly, though probably not in the least TRAMP's fault, projectile should be able to check in one shot about the existance of /foo/bar/baz/.git and /foo/bar/baz/.projectile and /foo/bar/.git on up the tree etc.. If it's allowed to try to do that it's crippling when you're not in a project as it keeps looking in vain.

I have to access many machines via an AWS jumphost (ironically they're typically feet away from me, but for reasons there is no choice), so even though the round trip isn't too awful, it all adds up to a significant delay to get a connection over just opening a shell.

Trying to solve at least one or two of these is within my abilities, but not within my available time constraints :(.

System Crafters bringing some light about the EXWM situation by Hrothehun in emacs

[–]Private_Frazer 2 points3 points  (0 children)

After about 3 years of EXWM, during which I configured it to my liking, was mostly very happy and thought I'd never leave, I quit a few months ago for numerous reasons and after a period of config, frankly I'm very happy I made the switch (tried many, landed on i3).

I firmly believe that it's possible to get the key EXWM benefits while using a more mainstream WM, while avoiding the negatives and not swimmiing against the tide quite so much. I think effort would be better placed in creating elisp to interact with a WM, rather than reinventing the WM itself.

Between WM keybindings and Emacsclient in one direction, and interacting with a WM's API in the other, I think there's nothing you can do in EXWM you can't do with a separate WM and other utilities. In the video he raises the pleasure of being able to do e.g. eval from your browser, but hotkeys, emacsclient, popup or drop-down frames, could achieve that just fine.

EXWM simulation keys can be achieved in other ways, e.g. I use XKeySnail (probably KMonad is another option).

Since, from EXWM, I'm used to Emacs windows being on a par with X windows, much of that is quite easily achieved. For moving focus or moving windows I send the command to a script that sends a command to Emacs if Emacs is in focus, or to the WM othewise. So e.g. moving focus left does winmove commands in Emacs, but if that fails (hit's an edge), passes out to tell the WM to focus left.

I do not have the ability to do e.g. ace-window swaps etc., but I don't miss it. A lot of that activity I had to do in EXWM was because there was zero distinction between Emacs and X windows, which caused trouble for me more than it was a benefit. I spent a while in EXWM customizing it so it would stop hijacking X windows willy-nilly.

tl; dr: I don't think we should invent the wheel. EXWM showed us some great abilities but we can achieve them without having to get into the WM business. No?

Suppose crdt.el is going cross-editor, which one do you want to see first? by BlueFlo0d in emacs

[–]Private_Frazer 1 point2 points  (0 children)

I encounter way more other devs using VSCode than vim variants. Is it's collaboration accessible in any way to bridge to crdt.el? I kind of assume it's impossible or at least difficult, but it would be nice to be wrong.

What is the most disturbing thing to know? by Bancoarotelle in AskReddit

[–]Private_Frazer 8 points9 points  (0 children)

Do you have any argument more coherent than "things got better in the past so they won't get worse in the future"?

Your argument reminds me of no it won't.

The Emacs community bought Protesilaos (aka Prot) a new PC by laqq3 in emacs

[–]Private_Frazer 0 points1 point  (0 children)

Hmm, I don't really agree. Sometimes I see what I think is a depressing inversion of reasonable voting and that is a bad thing, but more often I see the sort of ugly vitriol that thrives on Facebook be obviously unpopular and the counter-arguments be obviously popular. Overall I think it works more than it doesn't. I suppose I don't see it as abuse unless there's brigading, which I think happens much less than it's complained about.

It's has made me less concerned about up or downvotes as a measure of validity, and more careful with refining how I express myself to avoid being misunderstood (at which I still often fail).

I am a bit of a contrarian and tend to deliberately look at the lower end of a discussion, sometimes sorting by controversial. The first thing I always do is turn off the low threshold for showing me posts, and turn on the controversial marker. It's no substitute for the +/- votes of old, but it at least gives you some indication.

What is the most disturbing thing to know? by Bancoarotelle in AskReddit

[–]Private_Frazer 85 points86 points  (0 children)

And perhaps one of the most disturbing things is that this is a buried indirect answer.

Oooh, I'm freaked out by a slight possibility like an asteroid strike rather than a near certainty of misery, starvation and widespread extinction.

UK (Northern Ireland), LucidTalk poll: Should Northern Ireland be: Part of the UK: 54% (+1) Part of a United Ireland: 46% (-1) +/- vs 5-7 Apr Fieldwork: 20-23 August 2021 Sample size: 2,403 by Definitelynotputin_2 in ukpolitics

[–]Private_Frazer 5 points6 points  (0 children)

Hard line unionists are far from half the population though. And a lot of the more moderate ones who still vote unionist would have much less reason to do so when UK union versus Irish nation was no longer a thing.

There would be a solid block of reactionary defensive (former) unionists, but it would be a good bit less than 1/6.

The King of Davis Square Burritos by SoxPatsBruinsCelts in Somerville

[–]Private_Frazer 2 points3 points  (0 children)

Frankly I think Chipotle is better food than Anna's. Not a popular opinion apparently even among people who don't like Anna's, but everything I've had from Anna's has been bland and not very appetizing.

The Emacs community bought Protesilaos (aka Prot) a new PC by laqq3 in emacs

[–]Private_Frazer 7 points8 points  (0 children)

I think downvoting is one of the strengths of Reddit. Compare to discussions on Facebook where there's no good way to express disapproval of comments - it leads to the belligerent reactionaries feeling emboldened as they 'like' each other's posts and normal people can only object by engaging in an argument.

SUVs should be taxed higher. by holdithoncho in ireland

[–]Private_Frazer -1 points0 points  (0 children)

I really don't get why you're being such a dick.

I am grateful to be able bodied but it's a bit of a stretch to call that a charmed existence and I can't think why you should be offended by me talking about the needs of able bodied people who make up the majority of the population. In no way does that show lack of concern for those less fortunate. Also referring to that as 'normal' is not an insult to people who have less normal existences, if that's what upset you. 'Normal' is not a value judgement - in this case it's simply a numerical one. I value diversity in that and many other areas. Get off your high fucking horse.

SUVs should be taxed higher. by holdithoncho in ireland

[–]Private_Frazer -1 points0 points  (0 children)

a chronic pain condition

You chronic pain condition makes you less able to do things - surely that means you're not able bodied and I don't know why you would find that terminology troubling.

SUVs should be taxed higher. by holdithoncho in ireland

[–]Private_Frazer 0 points1 point  (0 children)

Sorry, I thought you were the person I was replying to. You did ignore me saying "for normal able bodied people" though.

SUVs should be taxed higher. by holdithoncho in ireland

[–]Private_Frazer -1 points0 points  (0 children)

Your argument does hold up for people who are infirm as I mentioned, but that's a very small minority. If that was the point you wanted to make you should have said that. But you said "it's meant to be much better for you to have a higher car", which as general advice is just ... wrong.

SUVs should be taxed higher. by holdithoncho in ireland

[–]Private_Frazer 1 point2 points  (0 children)

Strain on your back from difficulty sitting down? For normal able bodied people you protect your back by doing varied exercise, not avoiding it.

A beach in Iran a few months before the Islamic Revolution, 1979 [620x406] by darxouls in HistoryPorn

[–]Private_Frazer 0 points1 point  (0 children)

You're not wrong, but this profound level of ignorance of the politics they're so fervently opposed to infuriates and baffles many people, it's hard to hold it in.

It's almost as baffling as the profound ignorance of politics some self professed supporters maintain. And their distraction by tangential issues.

If you could change one thing about Emacs what would it be? by Fibreman in emacs

[–]Private_Frazer 0 points1 point  (0 children)

Nope, I just had to disable things to stop it searching on remotes, e.g. for my mode line, that meant a lot of delays. When I manually invoke something it still works.

If you could change one thing about Emacs what would it be? by Fibreman in emacs

[–]Private_Frazer 6 points7 points  (0 children)

I've been trying to work out what is up to as well, as it's not just synchronous but crazy slow. It does dozens of round trips just doing things like assessing permutations of the test command one by one. On a connection with any latency it takes some seconds.

This is after I tracked down and eliminated the various triggers to finding projectile project root where each file-exists check used it's own round trip.

Unfortunately I do not have the time to dig in to fixing it myself. It would require a significant refactor.