all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Marko Vojinovic <vvmarko@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Several beginner-questions
Date: Wed, 27 Jul 2011 03:57:05 +0100	[thread overview]
Message-ID: <201107270357.06385.vvmarko@gmail.com> (raw)
In-Reply-To: <83ei1efl3h.fsf@gnu.org>

On Monday 25 July 2011 16:14:58 Eli Zaretskii wrote:
> > From: Marko Vojinovic <vvmarko@gmail.com>
> > 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






  reply	other threads:[~2011-07-27  2:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-24 22:22 Several beginner-questions Marko Vojinovic
2011-07-25 15:06 ` suvayu ali
2011-07-27  1:05   ` Marko Vojinovic
2011-07-27  1:36     ` suvayu ali
2011-08-15  0:36       ` Ken Goldman
2011-08-15  0:39     ` Ken Goldman
2011-07-25 15:14 ` Eli Zaretskii
2011-07-27  2:57   ` Marko Vojinovic [this message]
2011-07-27  5:40     ` Eli Zaretskii
2011-07-28 22:07       ` Marko Vojinovic
2011-07-29  6:08         ` Eli Zaretskii
2011-07-29 18:07           ` Vijay Lakshminarayanan
2011-07-27  6:48     ` Teemu Likonen
2011-07-27 13:57       ` Drew Adams
  -- strict thread matches above, loose matches on Subject: below --
2011-07-23  7:13 Marko Vojinovic

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=201107270357.06385.vvmarko@gmail.com \
    --to=vvmarko@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=vmarko@ipb.ac.rs \
    /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.