From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marko Vojinovic Newsgroups: gmane.emacs.help Subject: Re: Several beginner-questions Date: Thu, 28 Jul 2011 23:07:17 +0100 Message-ID: <201107282307.17607.vvmarko@gmail.com> References: <201107242322.31639.vvmarko@gmail.com> <201107270357.06385.vvmarko@gmail.com> Reply-To: vmarko@ipb.ac.rs NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1311890859 25857 80.91.229.12 (28 Jul 2011 22:07:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 28 Jul 2011 22:07:39 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 29 00:07:35 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QmYjv-0000CX-CK for geh-help-gnu-emacs@m.gmane.org; Fri, 29 Jul 2011 00:07:35 +0200 Original-Received: from localhost ([::1]:56042 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmYju-00068G-NZ for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Jul 2011 18:07:34 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:55452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmYjp-00067W-QB for help-gnu-emacs@gnu.org; Thu, 28 Jul 2011 18:07:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QmYjo-0001kt-6v for help-gnu-emacs@gnu.org; Thu, 28 Jul 2011 18:07:29 -0400 Original-Received: from mail-wy0-f169.google.com ([74.125.82.169]:52973) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmYjn-0001ki-S3 for help-gnu-emacs@gnu.org; Thu, 28 Jul 2011 18:07:28 -0400 Original-Received: by wyg36 with SMTP id 36so557698wyg.0 for ; Thu, 28 Jul 2011 15:07:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:reply-to:to:subject:date:user-agent:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; bh=DTd+4yfMMeClLF50/3SzD4o/Euq+Oq4+l0lICQ9fQHg=; b=przhBX9Mcy1RAGFuLbMQcrQbbf63LR12lldCfCv+PmsKz9j+fQBNXBKDYjUnbjWbtZ H7Jk397wYY2C6/gWnrp7X54n1E0WxeYzC00K+E4m9umc6Dp9tsqk0du1vp/sEQW6SScy 7Hc2+PnfXE5YsVtHESO5b8w4T0oKr3UVsv41Y= Original-Received: by 10.227.184.5 with SMTP id ci5mr691202wbb.8.1311890846125; Thu, 28 Jul 2011 15:07:26 -0700 (PDT) Original-Received: from yoda.localnet (bl5-171-5.dsl.telepac.pt [82.154.171.5]) by mx.google.com with ESMTPS id m38sm1004102weq.21.2011.07.28.15.07.23 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 28 Jul 2011 15:07:24 -0700 (PDT) User-Agent: KMail/1.13.7 (Linux/2.6.35.13-92.fc14.x86_64; KDE/4.6.3; x86_64; ; ) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.169 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:81843 Archived-At: On Wednesday 27 July 2011 06:40:30 Eli Zaretskii wrote: > > From: Marko Vojinovic > > Date: Wed, 27 Jul 2011 03:57:05 +0100 > > > > I guess I wasn't clear enough. I have never used Emacs under DOS, and I > > am not 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 most 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. Aha, ok. So I guess I was right to assume that this already exists, I just missed that it exists only for the DOS build. Understood. :-) Unfortunately, as much as I would like to see those menus in Unix TTY, I don't think that I have enough knowledge to actually port the code. :-( Maybe one day... > > 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 > > dissapointed 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" ;-) Oh, but I didn't use "weird" in the "different from MS editors" sense, but in the "why would anyone want to count columns from zero?" sense. The fact that Emacs was designed before most other editors is something I appreciate, but it has nothing to do with the default being "weird" (tradition notwithstanding). If it's too hard to reconfigure, then ok, I'll live with it, but... it's weird. ;-) > 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. 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. 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. The problem is that those two sets of colors are different from each other, and the tty-colors.el infrastructure approximates the standard ones with the ones available. 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. So, if I want to configure syntax highlighting using the colors that I actually see on the screen, it seems that the simplest way is to just stick to the "color-##" names and forget about rgb.txt. :-) Thanks for the help, now I know what I'm doing. ;-) Incidentally, the tty-colors.el is apparently already built in my default Emacs install, I didn't even need to load it separately. I just needed to understand that the colors I see on the screen are *not* the colors defined in rgb.txt. :-) > > > 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? 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. So I guess nil is what I want. I'm just confused why it swallows the first TAB when it is at the beginning of the line? The description says: If t, hitting TAB always just indents the current line. If nil, hitting TAB indents the current line if point is at the left margin or in the line's indentation, otherwise it inserts a "real" TAB character. AFAICS, there is some 'procedure of indentation' that does nothing in my case, while inserting the "real" TAB character is replaced with the four spaces, as I wanted. 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? Btw, sorry for spamming the list with these things, I'm just trying to learn some of this basic stuff... :-) Best, :-) Marko