[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Several beginner-questions
Re: Several beginner-questions
Wed, 27 Jul 2011 01:40:30 -0400
> From: Marko Vojinovic <address@hidden>
> Date: Wed, 27 Jul 2011 03:57:05 +0100
> > I don't think so. Someone(TM) should back-port the DOS code that
> > supports menus of a text-only terminal to the rest of Emacs platforms.
> I guess I wasn't clear enough. I have never used Emacs under DOS, and I am
> saying that there is any existing code to be backported. But I did use other
> text editors under DOS (the rudimentary "Edit" editor comes to mind), and
> of them had the pull-down menus drawn in ascii-art using various "graphics"
> characters (greater-than-128 codes of ascii of the bios-provided font).
Emacs does as well, but only in its DOS build. I was saying that
someone should take that code and implement it for the Unix TTY.
> So this has nothing to do with backporting any DOS code, my guess is that
> should be created from scratch.
Since it is already implemented for one platform supported by Emacs,
doing it again from scratch would be a waste of resources.
In any case, this job still awaits a motivated volunteer.
> since I guess it is (or should be) a common thing to have pull-down menus,
> even in a text-only terminal. :-)
Guess what? most veteran Emacs users, including the maintainers, don't
use menus too much. Which could be part of the reason why TTYs lack
> But *why* (for heaven's sake) does it count columns from zero?
I don't know. Tradition, I guess, lifted from some ancient editor
which was popular back when Emacs was invented.
> I've never ever
> seen any other text editor do that. Even the KMail composer that I'm typing
> into right now counts the first column as "column 1"... I'm a bit
> that such a weird default counting was chosen
Most of the software you see today copycats Microsoft Windows GUI
style, so it's no surprise they all look similar and different from
Emacs. Emacs predates all of them. So if you want to talk about
weird defaults, it's those other programs that are "weird" ;-)
> > See tty-colors.el for the infrastructure and term/xterm.el for an
> > example of using it. Actually, since you seem to be using a 256-color
> > xterm, Emacs should have done this automatically for you. Perhaps you
> > have an old version of Emacs, in which case upgrade.
> Umm, I don't seem to understand how to use the tty-colors package. In order
> try it out, I opened it, did M-x eval-buffer, and after that the
> M-x list-colors-display still displays the colors with names color-16,
> color-17, etc, just in different order than before. There is no mention of
> usual human-readable names for colors. What do I need to do to have the names
> appear in the colors that correspond to them?
> I'd appreciate some hand-holding here
Take a look at tty-color-define, this is the function you want to
use. And please be sure to look more carefully the commentary and the
code of the packages you are pointed to: they have all this
information spelled out. For example, term/xterm.el includes a
function names xterm-register-default-colors, which shows how to
associate color names with colors supported by the xterm. You should
do something similar, but with color names you want to use.
> > See indent-tabs-mode and tab-width.
> Ok, I have RTFM for those variables (and hopefully understood it), set
> (setq-default indent-tabs-mode nil)
> (setq-default tab-width 4)
> in the .emacs, restarted Emacs, and when I press the TAB key in the buffer,
> nothing happens.
What is your value of tab-always-indent?