From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Akib Azmain Turja via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs 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 Message-ID: <87ilm04xzl.fsf@disroot.org> References: <87wnakl5md.fsf@disroot.org> <87o7vt3s58.fsf@disroot.org> Reply-To: Akib Azmain Turja Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6219"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57607@debbugs.gnu.org To: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 06 13:55:59 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oVXBP-0001Is-2N for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 06 Sep 2022 13:55:59 +0200 Original-Received: from localhost ([::1]:47214 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oVXBN-0005QO-Ou for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 06 Sep 2022 07:55:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVWR0-0003tO-LF for bug-gnu-emacs@gnu.org; Tue, 06 Sep 2022 07:08:10 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:32854) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oVWR0-000638-3l for bug-gnu-emacs@gnu.org; Tue, 06 Sep 2022 07:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oVWQz-0006F2-SV for bug-gnu-emacs@gnu.org; Tue, 06 Sep 2022 07:08:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Akib Azmain Turja Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Sep 2022 11:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57607 X-GNU-PR-Package: emacs Original-Received: via spool by 57607-submit@debbugs.gnu.org id=B57607.166246246623961 (code B ref 57607); Tue, 06 Sep 2022 11:08:01 +0000 Original-Received: (at 57607) by debbugs.gnu.org; 6 Sep 2022 11:07:46 +0000 Original-Received: from localhost ([127.0.0.1]:49785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVWQk-0006EO-2L for submit@debbugs.gnu.org; Tue, 06 Sep 2022 07:07:46 -0400 Original-Received: from knopi.disroot.org ([178.21.23.139]:33730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVWQh-0006ED-OO for 57607@debbugs.gnu.org; Tue, 06 Sep 2022 07:07:44 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 0650D49FCC; Tue, 6 Sep 2022 13:07:42 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Original-Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with UTF8SMTP id gS_Vl-rw98y4; Tue, 6 Sep 2022 13:07:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1662462404; bh=rBniXk8dISoAnnMTbSXlPzIqOEBUO5KZafyDIZloHTk=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=EoDci7WXrzE8yGr2pfjSqU9FjuCEzT8Z7gnF+EQNwAwEkMHg+v4r+MwSgJ+kB1oWP 21AMdY9YxGh//sjvZiHGgrijSMzIPPDavnxp9AZIG1p2iV1Qu0ycPjHYGpf4vo8NWK Kru1QZi7V/29Rk0lbaIYzSpfiFyGJTyqyoDSzzsETjkuWgxG3gp53HVzqvt1Mn1iha +Ub/qbCF75cZ1qqUiupsroPVofE38eCQJGzUFN22p1LDSpNg3jUGePHLavl05SdqP2 rmwWBiO3V8WtPqirgvg1kBcWtwW8NzOPndRq6f4d+kiGqIgOgCNwC7zeQc3104IELj RMI6e/+HDDIwQ== In-Reply-To: ("Gerd =?UTF-8?Q?M=C3=B6llmann?="'s message of "Tue, 06 Sep 2022 10:03:29 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:241632 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Gerd M=C3=B6llmann writes: > Akib Azmain Turja writes: > >> Forwarding to bug-gnu-emacs list. >> >> Akib Azmain Turja 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 =2D-=20 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 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEyVTKmrtL6kNBe3FRVTX89U2IYWsFAmMXG+8ACgkQVTX89U2I YWsQnQ//aGvTgeSjKzKYKTWgjQfCJSFLvs/J1jqNMLom/M5fBf6+Y5YZNfIIPu3C 6oAJBbFKcfagXap/oe6I+gt2yDb9GYr0Q+n38pMCjFfK7HSi4ND9y5FTdch7ymR3 ApKhntsohYWoRbWghxQqGmKKlV1cdBhMl9+sZvH8QzDXl7COkzApzId7MiuF0/GR aeTyIbt/cuN6893y3LY+hpWllO0F8uGj0SKpAyjENIPTmNV1RRGFec+vHDQoSIua 8GHvkbWCACU5JphY/fW/hU3UkuBZ5DdZB/YriZENWAW+vyeVEdMrrCeu47pDHml8 wE1Jf/zO90OrkZS0RVHjQEOGw5sig3zRv6NdK24BhxXNIiR+GghgtT9ZL11Q84PN RrlC3DUxWMIV7I36sH138DHbL+fjz4/GWnWEBIdDNzeT/EGiu3Ne7ojAJgNGL+25 NlYcA5G5awB5XbhBi2xH5GhiKdDco7lDPsnScvspgWfD46qXcdGZcms6atonS5Hs A1QY/uRkjw18zH+bj1DGbQn9GV+XHkcXGAlV+6kV5JhazbfOGi7vKXHi8XCAxCWo IWT35+ej5u1d/YDK3bAGMOiCjKd4vtqS8uYjHtWtheIUJ0/KPcHiGTQWP1L1JbtG 6NHf4rG4POVZ6Jzz2DxNZzQIrms03gKnuue7OWj7VM/ry2trcik= =ZJ44 -----END PGP SIGNATURE----- --=-=-=--