Skip to content
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

xterm control sequences are not fully supported #8

Open
tarao opened this issue Nov 6, 2012 · 0 comments
Open

xterm control sequences are not fully supported #8

tarao opened this issue Nov 6, 2012 · 0 comments

Comments

@tarao
Copy link
Owner

tarao commented Nov 6, 2012

Currently, there are many missing control sequences but it tends to be difficult to support some minor ones.

Control commands are not enough

Some OSC sequences are added as control commands but this is fundamentally a wrong way because of restrictions of control commands.

It is not possible to define some missing xterm control sequences by term+new-control-command. For example,

(term+new-control-command "\033]0;" term+-bel 'term+mux-set-title)
(term+new-control-command "\033]0;" term+-st 'term+mux-set-title)

are both valid control sequences in xterm but the former won't work because the start sequence "\033]0;" is used to lookup an alist (the first match is always used). In this case, we can modify the algorithm to keep all matches of the start sequence in the alist but I'm not sure if such a modified algorithm can catch all the other control sequences. In general, some kind of grammer parsing algorithm is needed.

There are also some other restrictions in control commands (described in the documentation of term-emulate-terminal).

xterm-256color.el cannot be our savior

xterm-256color.el aims at as much xterm compatibility as possible by patching the original implementation of term.el. This kind of patching is cumbersome and have a large risk of making a new bug. Introducing a systematic grammer parser without breaking the original implementation is a castle in the air.

What we need

My opinion is to rewrite term.el from scratch with a grammer parser in a modern way but this would be another project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant