all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Gregory Heytings <gregory@heytings.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: acm@muc.de, schwab@linux-m68k.org, emacs-devel@gnu.org
Subject: Re: Using Emacs in fbterm.
Date: Tue, 30 Aug 2022 12:04:24 +0000	[thread overview]
Message-ID: <dacea9288826293cc416@heytings.org> (raw)
In-Reply-To: <83r10yufto.fsf@gnu.org>


>
> But since fbterm doesn't always announce itself as such, but instead 
> calls itself "linux", this is not reliable enough, is it?
>

It is.  There are two cases: if it calls itself "linux", you get eight 
colors, and everything works as expected with those eight colors.  If it 
calls itself "fbterm", you get wrong colors (without the patch).

(And of course we can also tell users to set TERM=fbterm in the FAQ 
entry.)

>> And how can I check whether compositions should be disabled, that is, 
>> if they confuse cursor movement?
>
> There are some compositions in HELLO, and you can also try some long 
> Emoji sequences.
>

As far as I can tell, cursor movement works as expected with 
auto-composition-mode t.

So I suggest the following patch, with an additional note in the FAQ 
entry.

diff --git a/lisp/term/fbterm.el b/lisp/term/fbterm.el
new file mode 100644
index 0000000000..2e66bb72c0
--- /dev/null
+++ b/lisp/term/fbterm.el
@@ -0,0 +1,21 @@
+;;; fbterm.el  -*- lexical-binding:t -*-
+
+(require 'term/xterm)
+
+(declare-function gpm-mouse-enable "t-mouse" ())
+
+(defun terminal-init-fbterm ()
+  "Terminal initialization function for fbterm."
+
+  ;; fbterm can't display underlines, even though its terminfo data
+  ;; says it can.
+  (tty-no-underline)
+
+  ;; fbterm supports xterm's 256 color mode extension.
+  (xterm-register-default-colors xterm-standard-colors)
+
+  (ignore-errors (when gpm-mouse-mode (require 't-mouse) (gpm-mouse-enable))))
+
+(provide 'term/fbterm)
+
+;;; fbterm.el ends here



  reply	other threads:[~2022-08-30 12:04 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-29 16:41 Using Emacs in fbterm Alan Mackenzie
2022-08-29 17:33 ` Eli Zaretskii
2022-08-29 18:44   ` Alan Mackenzie
2022-08-29 18:53     ` Eli Zaretskii
2022-08-29 18:54     ` Gregory Heytings
2022-08-29 18:59       ` Eli Zaretskii
2022-08-29 19:29         ` Gregory Heytings
2022-08-29 19:42           ` Eli Zaretskii
2022-08-29 19:45             ` Gregory Heytings
2022-08-29 19:55               ` Gregory Heytings
2022-08-29 19:34       ` Andreas Schwab
2022-08-29 19:43         ` Gregory Heytings
2022-08-29 19:52           ` Andreas Schwab
2022-08-29 20:27             ` Gregory Heytings
2022-08-29 20:35               ` Alan Mackenzie
2022-08-29 20:52                 ` Gregory Heytings
2022-08-29 22:28                   ` Gregory Heytings
2022-08-30 11:32                     ` Eli Zaretskii
2022-08-30 12:04                       ` Gregory Heytings [this message]
2022-08-30 12:10                         ` Eli Zaretskii
2022-08-30 21:10                           ` Gregory Heytings
2022-08-30 13:16                         ` Stefan Monnier
2022-08-30 15:37                           ` Gregory Heytings
2022-08-30 18:26                             ` Stefan Monnier
2022-08-30 21:20                               ` Gregory Heytings
2022-08-30 21:56                                 ` Stefan Monnier
2022-08-30 22:07                                   ` Gregory Heytings
2022-09-04  2:59                                     ` Stefan Monnier
2022-08-29 18:50 ` Gregory Heytings

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=dacea9288826293cc416@heytings.org \
    --to=gregory@heytings.org \
    --cc=acm@muc.de \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=schwab@linux-m68k.org \
    /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.