all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Akib Azmain Turja via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: 57607@debbugs.gnu.org
Subject: bug#57607: Feature request: Use the character cell on bottom-right corner of a terminal
Date: Sun, 11 Sep 2022 15:00:58 +0600	[thread overview]
Message-ID: <87zgf6475h.fsf@disroot.org> (raw)
In-Reply-To: <87y1ut9b3b.fsf@disroot.org> (Akib Azmain Turja's message of "Thu, 08 Sep 2022 20:47:52 +0600")

[-- Attachment #1: Type: text/plain, Size: 2399 bytes --]

Akib Azmain Turja <akib@disroot.org> writes:

> Gerd Möllmann <gerd.moellmann@gmail.com> writes:
>
>> Akib Azmain Turja <akib@disroot.org> writes:
>>
>>> Yes, I'm interested, because I think it would help me understand how
>>> Emacs renders text in terminal, which would help me to implement child
>>> frame in terminal.  But I don't have the time to do it right now.  I
>>> hope I can start doing this by late October.
>>
>> Great!  I've re-opened this issue.
>>
>>>
>>>>
>>>> The places you mention sound right.  It's probably all in term.c.  But
>>>> I'd like to add, that in principle all places writing to the terminal
>>>> have to be checked at least.
>>>>
>>>> And corner cases have to be taken into consideration :-).  Pulling
>>>> something out of thin air: What happens if we write RGRG to the
>>>> bottom-right corner, where R is one red char, and G is 1 green char,
>>>> say.
>>>
>>> I think you meant the following in Bash:
>>>
>>> printf "%$((COLUMNS - 4))s\e[31mr\e[32mg\e7\e[32mg\e8\e[@\e[31mr\e[m" "" ; sleep 1 ; printf '\n'
>>>
>>> And it works on St, Kitty, Coterm, Term, etc.
>>
>> What I was thinking of is the Emacs side of things, i.e. can we always
>> do our magic locally in tty_write... etc., or is it sometimes necessary
>> to reorder writes at the caller.
>
> We would need to remember the glyph in the character cell before the
> last one, because modifying the last character cell needs to rewrite to
> that cell.

Just to add, terminal is with 'smam' (enable automatic margin) and
'rmam' (disable automatic margin) can disable automatic margin, thus can
write the last character cell.

And, Emacs currently often writes to the last character possibly by
mistake.  I'm not sure whether this is a bug or not.  To reproduce, run
emacs -Q, hit M-: (eval-expression), write some garbage until the
minibuffer window scrolls (I used (+ (% (random) 26) ?a) to generate
the garbage), and hit C-p until you scroll down a line.  You should now
see that the last character cell contains a continuation ('\') glyph.  I
think this is probably due to the use of 'il' or 'il1' or 'rin'
capability.  Should I report this as a bug?

-- 
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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2022-09-11  9:00 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-03 17:39 Why Emacs doesn't touch the bottom-right corner of terminal Akib Azmain Turja
2022-09-06  6:59 ` bug#57607: Feature request: Use the character cell on bottom-right corner of a terminal Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-06  8:03   ` Gerd Möllmann
2022-09-06 10:07     ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-06 12:00       ` Gerd Möllmann
2022-09-06 15:10         ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-07  4:58           ` Gerd Möllmann
2022-09-07 12:46             ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-07 12:58               ` Gerd Möllmann
2022-09-07 15:39             ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-07 17:26             ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-08  5:49               ` Gerd Möllmann
2022-09-08 11:28                 ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-08 12:35                   ` Gerd Möllmann
2022-09-08 14:47                     ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-11  9:00                       ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-09-11 10:08                         ` Gerd Möllmann
2022-09-11 10:39                           ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-03  8:31                   ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-03 19:41                     ` Eli Zaretskii
2022-10-04  7:22                       ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-04  8:07                         ` Eli Zaretskii
2022-10-04 12:00                           ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-04 12:54                             ` Eli Zaretskii
2022-10-07 13:10                               ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-07 19:30                                 ` Eli Zaretskii
2022-10-04 13:05                             ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zgf6475h.fsf@disroot.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=57607@debbugs.gnu.org \
    --cc=akib@disroot.org \
    --cc=gerd.moellmann@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.