|
From: | Thibaut Verron |
Subject: | Re: A TAB operation reform question. |
Date: | Tue, 11 Oct 2022 11:15:05 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 |
On 11/10/2022 02:01, Emanuel Berg wrote:
If I understand correctly, the point of the suggested change is to give a straightforward way for packages to implement their wanted behavior at the tab key, all while making it easy for users to prevent a complete hijack of the key.Vladimir Nikishkin wrote:In particular, could it be possible to make a "hard-switch" variable "tab-always-inserts-tab", which would be the opposite of "tab-always-indent", but simpler, and it would be possible to override it in the major modesNot following 100% what you intend to happen but you can write a function and bind it to some keystroke (start with some other key than TAB perhaps) and when it works the way you want bind it to TAB globally or locally.
A user-side configuration, or even a third-party package (there are several) don't really help with that: packages cannot be build on that facility, and for the user, the effort has to be repeated for each hijacking package.
The challenge will be to make it transparently always fall back to the original bahvior when your special behavior isn't desired ...
That part is actually easier with your suggestion: just don't bind the function when the default behavior is what is wanted.
If you mean falling back to the original behavior when the special behavior is not possible, that is a bit more tricky but still not impossible.
It seems that a "run-hook-until-success" kind of function like the OP suggests is a straightforward solution to both cases.
Best wishes, Thibaut
[Prev in Thread] | Current Thread | [Next in Thread] |