[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Several beginner-questions
Re: Several beginner-questions
Fri, 29 Jul 2011 09:08:11 +0300
> From: Marko Vojinovic <address@hidden>
> Date: Thu, 28 Jul 2011 23:07:17 +0100
> If it's too hard to reconfigure, then ok, I'll live with it, but... it's
Feel free to file a feature request with the Emacs bug tracker, using
the "M-x report-emacs-bug RET" command. It shouldn't be hard to
implement a variant of column-number-mode that shows columns 1-based.
> Ok, I think I resolved this issue. The point that I was missing was that the
> 256 colors displayed by the terminal are not neccessarily RGB-equivalent to
> the 256 colors defined in the rgb.txt file.
They are just strings. The RGB equivalents are considered at a
> So while color-name-rgb-alist variable contains the colors from rgb.txt, the
> list-colors-display doesn't display those colors, but the colors that the
> terminal actually supports, which might be different (and are, in my case).
> Those (actually used) colors are listed in tty-defined-color-alist, and I see
> that they have names like color-16, color-17, etc.
> IOW, there is no unique way to rename "color-16" to the standard
> name from rgb.txt (what I was hoping to achieve), since this color isn't even
> defined there.
You don't need to rename the existing "color-NN" names. All you need
is to _add_ to tty-defined-color-alist the names from rgb.txt.
There's no problem to have more than 1 name pointing to the same color
index. Use tty-color-define for this.
> Incidentally, the tty-colors.el is apparently already built in my default
> Emacs install, I didn't even need to load it separately.
Yes, it is preloaded, because Emacs on a TTY always needs it.
> If I set it to t, TAB does nothing. If I set it to nil, then it works as
> expected when I am in the middle of a line. However, if I am at the beginning
> of the line, I need to press it twice --- the first TAB is swallowed, the
> second TAB prints spaces.
It's not swallowed. Emacs doesn't indent empty lines when you type
TAB. This is done by the newline-and-indent command, by default bound
to the C-j (a.k.a. Linefeed) key. If you don't have such a key on
your keyboard (most modern keyboards don't), bind that command to the
Return key, like this:
(global-set-key "\C-m" 'newline-and-indent)
Then Emacs will indent a new empty line whenever you hit RET at the
end of the previous line. See the node "Basic Indent" in the EMacs
user manual, for more details.
> So how is this indentation being done, if not by inserting tabs or
> spaces into a file? The first time I press TAB, the line is apparently just
> being internally "marked" as indented (without anything visible actually
> happening), and only then the second TAB actually inserts something into the
> buffer. Am I understanding this right?
No, see above. I really suggest to read the manual on this.
> Btw, sorry for spamming the list with these things, I'm just trying to learn
> some of this basic stuff... :-)
This list _is_ for such "spamming", but I recommend to become
acquainted with the manual and the various Emacs build-in help
facilities (see the node "Help" in the manual). They will make you
much more independent in your uses of Emacs, because most answers are
in the docs already, you just need to grasp the tools that let you
find them efficiently. Then you will need to ask questions here only
if you didn't find in the docs what you were looking for.