[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie: Interactive goto-line ?!

From: Alan Mackenzie
Subject: Re: Newbie: Interactive goto-line ?!
Date: Fri, 27 Feb 2004 09:17:21 +0000
User-agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.0.35 (i686))

Floyd L. Davidson <address@hidden> wrote on Thu, 26 Feb 2004 11:47:26 -0900:

> I've tried, with no success, to find a way to change font-lock face
> colors when switching between major modes.  That is because what for me
> is appropriate for C or Lisp programming is one set, which just makes
> TeX too hard to look at, or the other way around.  I can manage to set
> up manually invoked reconfigurations of face properties, but I've not
> had any luck at all trying to change them automatically when switching
> from one buffer to another where different major modes are being used
> in the two buffers.

> That is something I would really like to have.

It would appear that buffer-local faces can not be created.  I don't know
why this should be so.  It seems to be an inconsistency in Emacs, because
just about anything else can be made buffer local.

[ .... ]

> Regardless, the idea that next-error eliminates the need for using
> goto-line is only true for people doing certain kinds of editing.  It
> is great for C programming, but even there it doesn't solve all
> problems (and the suggestion that the compilation buffer is still
> available is ridiculous compared to the ease of using M-g for
> goto-line).

I'd have to agree with you there.  In particular, beginning users need
goto-line, because it takes time to learn how to use next-error and
friends, and beginners already have enough new stuff to cope with.  It
takes even more time to learn how to set the regexp to extract line
numbers from the messages from an arbitrary compiler.

Personally, my M-g is bound to the face stuff, and I find M-g M-g to fix
fontification useful.  I also use M-g d quite a bit, after copying
fontified program text into a plaintext log.  But I do get tired of
typing M-x goto-l<tab>.  Maybe C-x M-g would be an unbad binding for me.
It's not a very good one.  Actually, C-M-g would be better for me, but
something in Emacs is discarding the "M-" bit and converting it to a
plain C-g.  :-(

> I think the significance of all this is that we all use a very
> configurable editor *because* we do so many different things in so many
> different ways.  It doesn't bother me a bit that GNU Emacs uses one
> binding for M-g and XEmacs uses a different binding, because in either
> case it is easy to bind M-g to whatever I want.

Well said, that man!

> I do take offense at someone suggesting that M-g should not be rebound
> to goto-line (or whatever).  Bindings aren't sacred at the user level.
> And command usage varies with each user and with the type of work being
> done.

Well, don't take too much offence.  Eli Z. is a member of the Emacs core
development team, so from his viewpoint the default bindings are
critically important.  I think the Emacs team gets quite a few tirades
along the lines "the standard bindings are idiotic, change them to my
way!", and it's easy to become oversensitive to a post which looks a bit
like that.  (I'm not suggesting your post was such a tirade - it clearly
wasn't.)  Also, Eli's native language isn't English.

At the same time, Eli keeps an eye open for genuine problems normal users
are having, so as to be able to fix them and feed improvements through to
the next Emacs version.  His questions to you would have been more about
trying to understand your problems and make you aware of alternatives,
rather than trying to persuade you to do things the "right" way.

> Floyd L. Davidson

Alan Mackenzie (Munich, Germany)
Email: address@hidden; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").

reply via email to

[Prev in Thread] Current Thread [Next in Thread]