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: Wed, 27 Jul 2011 03:57:05 +0100 Message-ID: <201107270357.06385.vvmarko@gmail.com> References: <201107242322.31639.vvmarko@gmail.com> <83ei1efl3h.fsf@gnu.org> 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 1311735451 18882 80.91.229.12 (27 Jul 2011 02:57:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 27 Jul 2011 02:57:31 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 27 04:57:24 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 1QluJH-0000Vq-SW for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Jul 2011 04:57:24 +0200 Original-Received: from localhost ([::1]:47473 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QluJH-0002s5-1x for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Jul 2011 22:57:23 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:44100) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QluJA-0002rp-K9 for help-gnu-emacs@gnu.org; Tue, 26 Jul 2011 22:57:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QluJ9-0006Ld-89 for help-gnu-emacs@gnu.org; Tue, 26 Jul 2011 22:57:16 -0400 Original-Received: from mail-wy0-f169.google.com ([74.125.82.169]:49003) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QluJ8-0006LP-Vb for help-gnu-emacs@gnu.org; Tue, 26 Jul 2011 22:57:15 -0400 Original-Received: by wyg36 with SMTP id 36so855368wyg.0 for ; Tue, 26 Jul 2011 19:57:14 -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=AqjuLTTiObm4t6IvLbXFUApWvwVTJ+d0CNwuNMbEfrw=; b=U9fmdf0u8lwIPuviYERmuDf01pRKiXqJuHhzHeaqkh2pm7K4P4PdffDkcxa6fzAZJ0 actSWaFbDKiwMfp6RVhP6hgiCcyHx3IRxpe2la0/G8dmi1ohqcYY6kpWDrSkWWvg7MxD /1wguK95aXnfXtAuJ7tiFaAYdtpRDqMK5nobg= Original-Received: by 10.227.3.4 with SMTP id 4mr5640759wbl.35.1311735433925; Tue, 26 Jul 2011 19:57:13 -0700 (PDT) Original-Received: from yoda.localnet (bl14-168-198.dsl.telepac.pt [85.247.168.198]) by mx.google.com with ESMTPS id fn12sm942232wbb.38.2011.07.26.19.57.11 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 26 Jul 2011 19:57:12 -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: <83ei1efl3h.fsf@gnu.org> 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:81799 Archived-At: On Monday 25 July 2011 16:14:58 Eli Zaretskii wrote: > > From: Marko Vojinovic > > Date: Sun, 24 Jul 2011 23:22:31 +0100 > > > > 1) Is there a package to recreate the old MS-DOS pull-down menu display, > > instead of the default "open new buffer to display menu items" behavior > > (invoked by F10)? > > 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 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). I was wondering if something of similar look-and-feel ever existed for Emacs. So this has nothing to do with backporting any DOS code, my guess is that this should be created from scratch. I just thought that someone already did it, since I guess it is (or should be) a common thing to have pull-down menus, even in a text-only terminal. :-) > > 2) I have set (line-number-mode 1) and (column-number-mode 1) in order to > > see the cursor coordinates, and this works. However, column numbering > > begins with zero --- the top-left corner of the buffer has coordinates > > (1,0). How do I get rid of the 0-th column? I want the columns to be > > counted from 1 (so that the corner has coordinates (1,1), which is more > > natural from my POV)? > > You could redefine mode-line-format to do that, but it will need a bit > of Lisp programming. Oh, ok. I guess I'll just have to add one column in my head every time I need to know where the point is... But *why* (for heaven's sake) does it count columns from zero? 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, and in addition that it takes a lisp expert to customize it. What was the thinking behind the 0-th column? > > 3) When I do a M-x list-colors-display, emacs displays all 256 colors > > properly, but with wrong names. Instead of giving the colors names as per > > the rgb.txt file, it lists names like color-16, color-17, etc. Those > > names are not recognized in the .emacs (while rgb.txt names are). How do > > I make it use color names from the rgb.txt file, when invoking > > list-colors-display? > > 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 to 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 the 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, I'm fairly new to Emacs, and Lisp is also somewhat a mistery for me (although I am familiar with the concepts of functional programming in general). > > 4) I'd like to use the TAB key to type four SPC characters in the buffer > > when I press it. However, I don't want to disturb its auto-completion > > functionality when doing anything other than just typing text in the > > buffer. What is the "safest" way to create a keybinding for this? > > 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. The cursor doesn't move, it completely ignores the TAB key. What I want is the cursor to type four spaces instead of me doing it manually. What am I doing wrong? Btw, the TAB key works perfectly for the auto-completion in the minibuffer, it just does nothing in the text buffer. > > [vmarko@Yoda ~]$ emacs -nw --version > > GNU Emacs 23.2.1 > > Suggest to upgrade to Emacs 23.3, the latest official release. :-) And here I am using Fedora because it's providing me with "leading edge" software... ;-) But I wouldn't like to go away from the distro-provided version if I don't really have to. I don't think that my questions above are obsolete just because I use 23.2.1 instead of 23.3. Thanks for help! :-) Marko