all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Colors on TTY (v26)
Date: Sun, 31 Mar 2019 21:26:39 +0300	[thread overview]
Message-ID: <83mulahpcw.fsf@gnu.org> (raw)
In-Reply-To: <CAF8BazBVWrYKDnApJknVjA_xZgE=kq+wQnksTunzpPz_6zVQgA@mail.gmail.com> (message from Aleksey Midenkov on Sun, 31 Mar 2019 21:09:56 +0300)

> From: Aleksey Midenkov <midenok@gmail.com>
> Date: Sun, 31 Mar 2019 21:09:56 +0300
> Cc: help-gnu-emacs@gnu.org
> 
>  > I tried different terminal names. It seems, that it understands "xterm-" prefix. The remaining part can be
>  > arbitrary: I literally tried "xterm-something" and it worked. I guess, there is no such file
>  "xterm-something" in the
>  > library. In any case, it's much better to rename terminal to "xterm-*", than deal with distributed files.
> 
>  Just do "ls lisp/term/*.el" and see what you've got there.
> 
> And?

And you will see what names are supported without any need to guess.
And if you want more details about how this works, I can suggest
reading the section "Terminal-Specific Initialization" in the ELisp
manual.

>  What do you mean "should not exists"?  The code is there, it uses
>  whatever knowledge it has when you call it.  Where you did call it, it
>  didn't yet query the terminal to see how many colors it supports, and
>  didn't set up their names.  IOW, you are shooting yourself in the foot
>  by calling the function too early.  There are various hooks provided
>  by startup.el which allow you to call this function when colors are
>  set up; do that, and Bob's your uncle.
> 
> You may call it anything you like, but this misleading behavior causes trouble. 

Yes, invoking code in .emacs which depends on stuff that gets set up
during startup can get some using to.  It does make sense, eventually,
though.



  reply	other threads:[~2019-03-31 18:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-31  8:22 Colors on TTY (v26) Aleksey Midenkov
2019-03-31 15:15 ` Eli Zaretskii
2019-03-31 17:20   ` Aleksey Midenkov
2019-03-31 17:41     ` Eli Zaretskii
2019-03-31 18:09       ` Aleksey Midenkov
2019-03-31 18:26         ` Eli Zaretskii [this message]
2019-03-31 19:45           ` Aleksey Midenkov
2019-03-31 20:51     ` Stefan Monnier

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=83mulahpcw.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@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 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.