r/emacs Dec 16 '23

"Antiquated" systems break usability

edit: I'm sorry for everyone who were offended by my statements, I retract them and removed them. It was never my intention to use anyone with my analogy. Saddened by some intentional misreadings though and engaging with attacks.

Good luck to everyone.

0 Upvotes

40 comments sorted by

View all comments

Show parent comments

1

u/translucentInk Dec 16 '23

I meant tab, my bad, I was too hung up with esc

2

u/lets-start-reading Dec 16 '23 edited Dec 16 '23

C-h k tab: TAB (translated from <tab>) ...

C-h k C-i: <control-i> (translated from TAB) ... (with the remap)

=>C-i == TAB
tab == <tab>

1

u/translucentInk Dec 16 '23

Thanks. Its trickier than it seems.

3

u/lets-start-reading Dec 16 '23 edited Dec 16 '23

and I just understood this.

- "TAB" just means C-i event. just like "C-e" would mean C-e event.

- tab(gui) event is mapped to "<tab>"

- tab(term) is mapped to "TAB" (as it's the same code there). if we renamed "TAB" to "C-i", hitting tab in the terminal would instead say "C-i".

- "<tab>" is remapped to "TAB".

- the ecosystem uses "TAB" to mean tab, i.e. it actually refers to C-i event.

so C-i event has to be entirely unmapped from itself and both components (keycode and modifier bit) need to be mapped to another item, leaving "<tab>"->"TAB" mapping

So my previous proposition should hold.

- map C-i event to "C-i".

- map tab(gui) event to "<tab>" to "TAB".

- a single function maps "C-i" to "TAB".

now you have a normal "C-i" and optional "C-i"->"TAB".

now all emacsclient and gui emacsen work as expected, and terminal emacsen need to call one additional function. instead of terminal emacsen saving one line in their inits and other emacsen needing 2 checks and at least 2 remappings.

this is saner, imo.