[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#57607: Feature request: Use the character cell on bottom-right corne
From: |
Akib Azmain Turja |
Subject: |
bug#57607: Feature request: Use the character cell on bottom-right corner of a terminal |
Date: |
Tue, 06 Sep 2022 16:07:42 +0600 |
Gerd Möllmann <gerd.moellmann@gmail.com> writes:
> Akib Azmain Turja <akib@disroot.org> writes:
>
>> Forwarding to bug-gnu-emacs list.
>>
>> Akib Azmain Turja <akib@disroot.org> writes:
>>
>>> Emacs never writes to the bottom-right corner of a terminal, because the
>>> terminal might open a new line at bottom of screen. But terminals
>>> having any of 'ich', 'ich1' and 'smir' capabilities can write to the
>>> bottom-right corner of the terminal. Almost all terminals have at least
>>> one of the aforementioned capabilities. Why doesn't Emacs make use of
>>> that?
>
> I don't know. And I don't know if that would work, it would require
> investigation.
There must be a way reliably way to do so, because ncurses can write to
the last character cell on terminal on linux console and xterm-like
terminal emulators.
>
> Emacs already writes to the bottom-right corner in case neither "am" nor
> "xn" are defined for the terminal in question. vt100 and xterm, for
> instance, have "am" defined here, so Emacs doesn't write to the
> bottom-right corner.
I repeat: vt100 and xterm-like terminal having any of 'ich', 'ich1',
'il' and 'il1' or both 'smir' and 'rmir' can write to the last character
cell reliably without scrolling.
Here is what Emacs can do IMHO:
Glyph matrix (or whatever):
+------------------------+
|foo |
|bar |
|baz |
| --- *scratch* ---------|
|A very looooong message.|
+------------------------+
* Case: Any of 'ich', 'ich1', or both 'smir' and 'rmir' defined.
*Note*: Won't work on displays with only a single column.
Write to all character cells except the last two:
+------------------------+
|foo |
|bar |
|baz |
| --- *scratch* ---------|
|A very looooong messag | <-- cursor
+------------------------+
^
|
cursor
* Case: 'ich1' defined.
Write the glyph to be placed on the last character cell.
+------------------------+
|foo |
|bar |
|baz |
| --- *scratch* ---------|
|A very looooong messag. | <-- cursor
+------------------------+
^
|
cursor
Move to the character cell on the left side (cub1):
+------------------------+
|foo |
|bar |
|baz |
| --- *scratch* ---------|
|A very looooong messag. | <-- cursor
+------------------------+
^
|
cursor
Invoke (or write or whatever) 'ich1':
+------------------------+
|foo |
|bar |
|baz |
| --- *scratch* ---------|
|A very looooong messag .| <-- cursor
+------------------------+
^
|
cursor
Write the glyph to be placed on the character cell before the last
character cell:
+------------------------+
|foo |
|bar |
|baz |
| --- *scratch* ---------|
|A very looooong message.| <-- cursor
+------------------------+
^
|
cursor
* Case: 'ich' defined.
Same as the 'ich1' case, but invoke 'ich' with parameter '1' instead
of 'ich1'.
* Case: 'smir' and 'rmir' defined.
Write the glyph to be placed on the last character cell.
+------------------------+
|foo |
|bar |
|baz |
| --- *scratch* ---------|
|A very looooong messag. | <-- cursor
+------------------------+
^
|
cursor
Move to the character cell on the left side (cub1):
+------------------------+
|foo |
|bar |
|baz |
| --- *scratch* ---------|
|A very looooong messag. | <-- cursor
+------------------------+
^
|
cursor
Invoke 'smir'.
Write the glyph to be placed on the character cell before the last
character cell:
+------------------------+
|foo |
|bar |
|baz |
| --- *scratch* ---------|
|A very looooong message.| <-- cursor
+------------------------+
^
|
cursor
Invoke 'rmir'.
* Case: 'il' or 'il1' defined.
*Note*: Won't work on displays with only a single line.
Write to all lines except the last two:
+------------------------+
|foo |
|bar |
|baz |
| | <-- cursor
| |
+------------------------+
^
|
cursor
Write the glyphs to be placed on the last line.
+------------------------+
|foo |
|bar |
|baz |
|A very looooong message.|
| | <-- cursor
+------------------------+
^
|
cursor
Move to the character cell above (cuu1):
+------------------------+
|foo |
|bar |
|baz |
|A very looooong message.| <-- cursor
| |
+------------------------+
^
|
cursor
* Case: 'il1' defined.
Invoke 'il1'.
* Case: 'il' defined.
Invoke 'il1' with parameter '1'.
+------------------------+
|foo |
|bar |
|baz |
| | <-- cursor
|A very looooong message.|
+------------------------+
^
|
cursor
Insert the glyphs to be placed on the line before the last line:
+------------------------+
|foo |
|bar |
|baz |
| --- *scratch* ---------|
|A very looooong message.| <-- cursor
+------------------------+
^
|
cursor
--
Akib Azmain Turja
Find me on Mastodon at @akib@hostux.social.
This message is signed by me with my GnuPG key. Its fingerprint is:
7001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5
signature.asc
Description: PGP signature
- bug#57607: Feature request: Use the character cell on bottom-right corner of a terminal, Akib Azmain Turja, 2022/09/06
- bug#57607: Feature request: Use the character cell on bottom-right corner of a terminal, Gerd Möllmann, 2022/09/06
- bug#57607: Feature request: Use the character cell on bottom-right corner of a terminal,
Akib Azmain Turja <=
- bug#57607: Feature request: Use the character cell on bottom-right corner of a terminal, Gerd Möllmann, 2022/09/06
- bug#57607: Feature request: Use the character cell on bottom-right corner of a terminal, Akib Azmain Turja, 2022/09/06
- bug#57607: Feature request: Use the character cell on bottom-right corner of a terminal, Gerd Möllmann, 2022/09/07
- bug#57607: Feature request: Use the character cell on bottom-right corner of a terminal, Akib Azmain Turja, 2022/09/07
- bug#57607: Feature request: Use the character cell on bottom-right corner of a terminal, Gerd Möllmann, 2022/09/07
- bug#57607: Feature request: Use the character cell on bottom-right corner of a terminal, Akib Azmain Turja, 2022/09/07
- bug#57607: Feature request: Use the character cell on bottom-right corner of a terminal, Akib Azmain Turja, 2022/09/07
- bug#57607: Feature request: Use the character cell on bottom-right corner of a terminal, Gerd Möllmann, 2022/09/08
- bug#57607: Feature request: Use the character cell on bottom-right corner of a terminal, Akib Azmain Turja, 2022/09/08
- bug#57607: Feature request: Use the character cell on bottom-right corner of a terminal, Gerd Möllmann, 2022/09/08