Closed braham-snyder closed 7 years ago
This was a tad harder than expected. Thanks for bringing this to my attention!
That was quick--thanks for implementing it! That said, I realize now that I misunderstood your earlier comment regarding "slot" vs. "tag". I was actually envisioning being able to input a non-matching tag to create a new slot named with said tag. If you're not interested, I may or may not attempt implementing that at some point. Thanks again!
I don't see a clean way of implementing this. How would you figure out both the slot and tag from reading in arbitrary user input? Would you impose an extra convention that's different from the way a workspace is rendered in the modeline indicator? Would you reuse it (and write a parser operating on format strings) and force the user to type it out exactly the same way?
Given these questions, it doesn't seem worth to me to go any further than reading in a slot and rejecting anything not looking like one.
Why couldn't we just use eyebrowse-create-window-config
(or similar) to create a window configuration in some unoccupied slot (whenever the input doesn't match any existing tag or slot, or if the user uses ivy-immediate-done
or similar)? I feel like I'm missing something, but I don't know what.
I'm sorry, but that solution breaks entirely with what eyebrowse-switch-to-window-config
is supposed to do. If it normally expects a slot and accepts a yet unknown slot, why would entering something else create an unoccupied one and tag it? What does justify that unexpected behavior if one could create a new window config with eyebrowse-create-window-config
and tag it afterwards? Combining these into what eyebrowse-switch-to-window-config
can do just seems too magic to me.
My apologies, the thought crossed my mind after your initial comment regarding slots vs. tags (in the other thread) that Spacemacs and/or ivy might be allowing eyebrowse-switch-to-window-config
to magically match tags (as well as slots), but after briefly looking at the code I mistakenly thought that was quite unlikely (which, of course, illustrates one of the drawbacks of such magic).
I ought to more readily retest functionality I'm unsure of with emacs -q
--sorry about that.
It might be convenient to make
eyebrowse-switch-to-window-config
behave asfind-file
andpersp-switch
do, such that input not matching an existing slot creates such a slot (named by the given input).