-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please report XTVERSION in response to CSI > 0 q or set TERM to something other than xterm (or both) #18382
Comments
Thanks for the report! Unfortunately, we're not the ones setting Even so, we strive for some measure of xterm compatibility. There's a lot of discussion over in #1040 that I won't rehash over here, but suffice it to say that we're in a less-than-ideal situation. Therefore, we definitely should report something for |
When this gets addressed, please share the format used so I can add Windows Terminal to Emacs' list. Windows Terminal otherwise supports all necessary functionality and as it is becoming the dominant terminal on Windows I would like for it to work by default. There are two response formats I've seen for the string: NAME VERSION, like "iTerm2 3.5.10" Either is fine for parsing, Emacs is matching a regular expression to extract the terminal program name. I think the second version (with parenthesis) is slightly more often used. |
One interesting wrinkle here is that we have three or more distributions that all offer the same VT support. Ideally we would avoid
These are, if I squint, just fine. The Windows version one is annoying because we have not (yet!) documented the effective version equivalence between Windows and Terminal. We can and should. The fourth distribution sucks:
NB: I am not currently signing up for any of these names or semantics; examples above are illustrative. I wonder how libvte handles this. @j4james is there prior art you can think of for this report? |
I know at one point VTE were considering how this would interact with the terminals that depend on their library, and they discussed potentially having something like Personally I think we should jump straight to something like
Because that's likely what it's going to devolve into in the long term. At the very least we should make it an editable option so users can override it when they need to get the terminal working with some stupid app that is hardcoded to only work with a specific set of |
You forgot the "(like VTE)" part of the user agent. Clearly it's My observation is aligned about VTE. VTE terminals all respond with just "VTE(7592)" and no other details about the wrapping program. So maybe something like I separately have ideas about creating a probing mode where each escape sequence can get a reply from a terminal if it is supported or not. However for that to be useful it would require multiple terminals to all adopt this escape sequence which will take much longer than just this one feature request. :) |
Most of the functionality you need to query can already be probed with existing standards. For example, all of the modes you referenced above can already be queried with The only thing that isn't currently detectable is Not to mention the fact that
As @DHowett mentioned above, there are multiple terminals sharing the VT code base used by Windows Terminal. However, they don't all share the same functionality, so if this value were the same for all of them, and you were using the name for feature detection, it's not going to work. The same thing likely also applies to VTE for that matter. |
I am in favor of being specific, so Case in point: In timg, the So from a 'I am a user of the information' perspective: being specific is good. |
How do do I query that DECSET 1000 (mouse button reporting), DECSET 1003 (mouse move reporting), or bracketed paste are supported? I did not see any such capabilities in the linked guide.
Yes, this is a downside. I certainly would prefer a way to determine the actual support if possible. At the moment, I am only making a judgement based on a reasonably available terminal version (sadly, this is subjective) default behavior. This is clearly going to fail for some users. I expect the number of users surprised to be quite small, though. |
Description of the new feature
Ideally I think Windows Terminal would set the environment variable
TERM
to a unique value and also update the existing terminfo databases. However, I understand that the intermediate state that creates where many programs don't recognize the new terminal type is undesirable.So in the meantime, can Windows Terminal report XTVERSION? From ctlseqs:
This escape sequence is pretty widely supported to send a unique string that identifies the name and version of a terminal. Off the top of my head, VTE-based terminals (such as GNOME Terminal), Konsole, iTerm2, WezTerm, Contour, and kitty all support this escape sequence.
Context: I am currently drafting up a patch to Emacs that will rely either
TERM
or XTVERSION to determine if xterm-mouse-mode is safe to be enabled by default. Emacs wants to see support fo OSC52 copy, bracketed paste, DECSET1000, and DECSET1003 at a minimum and checking XTVERSION orTERM
is the only way I have to identify if these escape sequences are supported. Also see Emacs discussion thread.Proposed technical implementation details
No response
The text was updated successfully, but these errors were encountered: