unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Eli Zaretskii" <eliz@is.elta.co.il>
Cc: emacs-devel@gnu.org
Subject: Re: terminal capability querying
Date: Sat, 20 Apr 2002 10:08:38 +0300	[thread overview]
Message-ID: <1349-Sat20Apr2002100838+0300-eliz@is.elta.co.il> (raw)
In-Reply-To: <87bscfqffo.fsf@tc-1-100.kawasaki.gol.ne.jp> (message from Miles Bader on 20 Apr 2002 11:20:11 +0900)

> From: Miles Bader <miles@gnu.org>
> Date: 20 Apr 2002 11:20:11 +0900
> 
> So, I propose adding the ability to ask emacs _which_ of these
> capabilities a display supports, both in lisp code and in `defface'
> specifications.

I think it's a good idea.

>   (display-capable-p ATTRIBUTE &optional DISPLAY)
> 
>     Return non-nil if DISPLAY supports the face attribute ATTRIBUTE.

Could we change the name to something like display-attributes-p, or
even display-text-attributes-p?  display-capable-p sounds too general
for the specific purpose you have in mind (if I understand you well).

Otherwise, I like the design.

>     ATTRIBUTE should be either the name of a face attribute, e.g.,
>     `:weight', `:underline', etc., or a cons-cell or list containing a
>     face attribute and a specific value for it, e.g., (:weight bold).

If we intend to use this mainly for a tty (I guess windowed displays
will always pass all these tests), it's perhaps better to use `:bold'
directly, since terminals generally don't support more than a single
value of `weight'.  The same goes for `:slant': I think it's better
to use `:italic'.

What about `dim' and `blink', btw?

> It's not at all hard to implement this, I think, so I will do so if no
> one objects.

I'm for it.

There's one other piece of work that IMHO needs to be done to make
defface better: the ability to test for the number of supported
colors.  This is needed for supporting terminals that can display
large number of colors in text mode, such as recent versions of xterm.
We could then all but get rid of testing the frame type (`x', `w32',
`tty', etc.) in defface, and instead look at the number of supported
colors.  This has been on my todo for a long time, and I will do it as
soon as I can, but if someone feels to make it happen earlier...

  reply	other threads:[~2002-04-20  7:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-20  2:20 terminal capability querying Miles Bader
2002-04-20  7:08 ` Eli Zaretskii [this message]
2002-04-20  8:12   ` Miles Bader
2002-04-20  9:31     ` Eli Zaretskii
2002-04-20  9:58       ` Miles Bader
2002-04-20 11:46         ` Eli Zaretskii
2002-04-21 20:02 ` Richard Stallman
2002-04-22  0:20   ` Miles Bader

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=1349-Sat20Apr2002100838+0300-eliz@is.elta.co.il \
    --to=eliz@is.elta.co.il \
    --cc=emacs-devel@gnu.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).