unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Trouble with global-set-key to map meta-g with 'goto-line
@ 2006-04-20 14:14 David Lee
  2006-04-20 15:21 ` Peter Dyballa
  0 siblings, 1 reply; 14+ messages in thread
From: David Lee @ 2006-04-20 14:14 UTC (permalink / raw)


Hi, all
I am a beginner with GNU Emacs(21.3.1). I added this line to ~/.emacs
	(global-set-key [(meta-g)] 'goto-line)
but it doesn't work for me, and minibuffer gave this hint:
  Set face: default (M-g d), bold (M-g b), italic (M-g i)..

Seems that my settings didn't take effects.

Anything wrong?

[ I'm using SuSE 10.0, and I tried with failure under FC5, either. ]

Thanks in advance.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Trouble with global-set-key to map meta-g with 'goto-line
  2006-04-20 14:14 Trouble with global-set-key to map meta-g with 'goto-line David Lee
@ 2006-04-20 15:21 ` Peter Dyballa
  0 siblings, 0 replies; 14+ messages in thread
From: Peter Dyballa @ 2006-04-20 15:21 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 20.04.2006 um 16:14 schrieb David Lee:

> I am a beginner with GNU Emacs(21.3.1). I added this line to ~/.emacs
> 	(global-set-key [(meta-g)] 'goto-line)
> but it doesn't work for me, and minibuffer gave this hint:
>   Set face: default (M-g d), bold (M-g b), italic (M-g i)..

Could be you need GNU Emacs 21.4 or the version 22.0.50 from CVS!

--
Greetings

   Pete

To be is to do.
                        -- I. Kant
To do is to be.
                        -- A. Sartre
Yabba-Dabba-Doo!
                        -- F. Flintstone

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Trouble with global-set-key to map meta-g with 'goto-line
       [not found] <mailman.642.1145542481.9609.help-gnu-emacs@gnu.org>
@ 2006-04-20 16:20 ` B. T. Raven
  2006-04-20 16:43   ` B. T. Raven
  2006-04-20 18:26 ` Stefan Monnier
  2006-04-20 21:00 ` Giorgos Pontikakis
  2 siblings, 1 reply; 14+ messages in thread
From: B. T. Raven @ 2006-04-20 16:20 UTC (permalink / raw)



"David Lee" <live4thee@gmail.com> wrote in message
news:mailman.642.1145542481.9609.help-gnu-emacs@gnu.org...
> Hi, all
> I am a beginner with GNU Emacs(21.3.1). I added this line to ~/.emacs
> (global-set-key [(meta-g)] 'goto-line)
> but it doesn't work for me, and minibuffer gave this hint:
>   Set face: default (M-g d), bold (M-g b), italic (M-g i)..
>
> Seems that my settings didn't take effects.
>
> Anything wrong?
>
> [ I'm using SuSE 10.0, and I tried with failure under FC5, either. ]
>
> Thanks in advance.

It looks like M-g is already reserved as a prefix. In version 22.0.50 M-g
g runs 'goto-line. Try putting this in *scratch* and evaluating it. (C-j
after close paren of the form):

(global-set-key "\C-cg" ('goto-line)

I think that C-c is a mapping reserved for user bindings. That way you
won't have to mess with the default bindings into which a lot of thought
has gone. If C-c g is okay with you, you can put it in your .emacs.

Ed.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Trouble with global-set-key to map meta-g with 'goto-line
  2006-04-20 16:20 ` B. T. Raven
@ 2006-04-20 16:43   ` B. T. Raven
  0 siblings, 0 replies; 14+ messages in thread
From: B. T. Raven @ 2006-04-20 16:43 UTC (permalink / raw)



"B. T. Raven" <ecinmn@peoplepc.com> wrote in message
news:ZwO1g.9314$i41.7470@newsread1.news.atl.earthlink.net...
>
> "David Lee" <live4thee@gmail.com> wrote in message
> news:mailman.642.1145542481.9609.help-gnu-emacs@gnu.org...
> > Hi, all
> > I am a beginner with GNU Emacs(21.3.1). I added this line to ~/.emacs
> > (global-set-key [(meta-g)] 'goto-line)
> > but it doesn't work for me, and minibuffer gave this hint:
> >   Set face: default (M-g d), bold (M-g b), italic (M-g i)..
> >
> > Seems that my settings didn't take effects.
> >
> > Anything wrong?
> >
> > [ I'm using SuSE 10.0, and I tried with failure under FC5, either. ]
> >
> > Thanks in advance.
>
> It looks like M-g is already reserved as a prefix. In version 22.0.50
M-g
> g runs 'goto-line. Try putting this in *scratch* and evaluating it. (C-j
> after close paren of the form):
>
> (global-set-key "\C-cg" ('goto-line)
oops!
 (global-set-key "\C-cg" 'goto-line)
rather.

>
> I think that C-c is a mapping reserved for user bindings. That way you
> won't have to mess with the default bindings into which a lot of thought
> has gone. If C-c g is okay with you, you can put it in your .emacs.
>
> Ed.
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Trouble with global-set-key to map meta-g with 'goto-line
       [not found] <mailman.642.1145542481.9609.help-gnu-emacs@gnu.org>
  2006-04-20 16:20 ` B. T. Raven
@ 2006-04-20 18:26 ` Stefan Monnier
  2006-04-21  0:16   ` Barry Margolin
  2006-04-21  1:33   ` Lee David
  2006-04-20 21:00 ` Giorgos Pontikakis
  2 siblings, 2 replies; 14+ messages in thread
From: Stefan Monnier @ 2006-04-20 18:26 UTC (permalink / raw)


> I am a beginner with GNU Emacs(21.3.1). I added this line to ~/.emacs
> 	(global-set-key [(meta-g)] 'goto-line)
                              ^
                             ^^^

That should be a space, otherwise you're trying to bind the "meta-g" key,
which I'm pretty sure you don't have on your keyboard.


        Stefan

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Trouble with global-set-key to map meta-g with 'goto-line
       [not found] <mailman.642.1145542481.9609.help-gnu-emacs@gnu.org>
  2006-04-20 16:20 ` B. T. Raven
  2006-04-20 18:26 ` Stefan Monnier
@ 2006-04-20 21:00 ` Giorgos Pontikakis
  2 siblings, 0 replies; 14+ messages in thread
From: Giorgos Pontikakis @ 2006-04-20 21:00 UTC (permalink / raw)


David Lee <live4thee@gmail.com> writes:

> Hi, all
> I am a beginner with GNU Emacs(21.3.1). I added this line to ~/.emacs
> 	(global-set-key [(meta-g)] 'goto-line)
> but it doesn't work for me, and minibuffer gave this hint:
>   Set face: default (M-g d), bold (M-g b), italic (M-g i)..
>
> Seems that my settings didn't take effects.
>
> Anything wrong?
>
> [ I'm using SuSE 10.0, and I tried with failure under FC5, either. ]
>
> Thanks in advance.

I use 

(define-key global-map (kbd "M-g") 'goto-line)

and works fine in emacs 21.4 (which comes bundled with slackware 10)
and emacs 22.0.50.1 (from CVS). I don't know if this is a specific
problem with emacs 21.3 but I doubt it. 

Maybe you should try starting with emacs -q and try executing the
above expression within the scratch buffer. Does this work?

Hope this helps,

-- Giorgos

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Trouble with global-set-key to map meta-g with 'goto-line
  2006-04-20 18:26 ` Stefan Monnier
@ 2006-04-21  0:16   ` Barry Margolin
  2006-04-21  0:58     ` Miles Bader
                       ` (3 more replies)
  2006-04-21  1:33   ` Lee David
  1 sibling, 4 replies; 14+ messages in thread
From: Barry Margolin @ 2006-04-21  0:16 UTC (permalink / raw)


In article <874q0oqf2v.fsf-monnier+gnu.emacs.help@gnu.org>,
 Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> > I am a beginner with GNU Emacs(21.3.1). I added this line to ~/.emacs
> > 	(global-set-key [(meta-g)] 'goto-line)
>                               ^
>                              ^^^
> 
> That should be a space, otherwise you're trying to bind the "meta-g" key,
> which I'm pretty sure you don't have on your keyboard.

If you're going to use ASCII art as a pointer, mae sure you're using a 
fixed-width font.  Your arrow is pointing to the quote before goto-line, 
not the hyphen in meta-g.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Trouble with global-set-key to map meta-g with 'goto-line
  2006-04-21  0:16   ` Barry Margolin
@ 2006-04-21  0:58     ` Miles Bader
  2006-04-21 12:00     ` Hadron Quark
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 14+ messages in thread
From: Miles Bader @ 2006-04-21  0:58 UTC (permalink / raw)


Barry Margolin <barmar@alum.mit.edu> writes:
> If you're going to use ASCII art as a pointer, mae sure you're using a 
> fixed-width font.  Your arrow is pointing to the quote before goto-line, 
> not the hyphen in meta-g.

Er, normal email doesn't include font information, so it's your job to
make sure the font your use for reading mail is correct, not the message
sender's (and indeed, Stefan's message displays correctly if you use a
fixed-width font to read it).

-Miles
-- 
We have met the enemy, and he is us.  -- Pogo

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Trouble with global-set-key to map meta-g with 'goto-line
  2006-04-20 18:26 ` Stefan Monnier
  2006-04-21  0:16   ` Barry Margolin
@ 2006-04-21  1:33   ` Lee David
  1 sibling, 0 replies; 14+ messages in thread
From: Lee David @ 2006-04-21  1:33 UTC (permalink / raw)
  Cc: help-gnu-emacs


[-- Attachment #1.1: Type: text/plain, Size: 697 bytes --]

Oops! Yes I did misplace one hyphen between 'meta' and 'g'.
After removing it now it works.

Thank you all.

2006/4/21, Stefan Monnier <monnier@iro.umontreal.ca>:
>
> > I am a beginner with GNU Emacs(21.3.1). I added this line to ~/.emacs
> >       (global-set-key [(meta-g)] 'goto-line)
>                               ^
>                              ^^^
>
> That should be a space, otherwise you're trying to bind the "meta-g" key,
> which I'm pretty sure you don't have on your keyboard.
>
>
>         Stefan
> _______________________________________________
> help-gnu-emacs mailing list
> help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
>

[-- Attachment #1.2: Type: text/html, Size: 1446 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Trouble with global-set-key to map meta-g with 'goto-line
       [not found]     ` <mailman.679.1145581160.9609.help-gnu-emacs@gnu.org>
@ 2006-04-21  6:25       ` Sven Urbanski
  2006-04-21 17:18         ` Miles Bader
  2006-04-22  2:31       ` Barry Margolin
  1 sibling, 1 reply; 14+ messages in thread
From: Sven Urbanski @ 2006-04-21  6:25 UTC (permalink / raw)


Miles Bader wrote:

> Barry Margolin <barmar@alum.mit.edu> writes:
>> If you're going to use ASCII art as a pointer, mae sure you're using a
>> fixed-width font.  Your arrow is pointing to the quote before goto-line,
>> not the hyphen in meta-g.
> 
> Er, normal email doesn't include font information, so it's your job to
> make sure the font your use for reading mail is correct, not the message
> sender's (and indeed, Stefan's message displays correctly if you use a
> fixed-width font to read it).

Well, the sender _and_ the reader have to use a fixed font, otherwise it
won't work as expected ( or they have to use the _same_ font ).
I get the arrow pointing to the 't' in meta, not pointing to the '-'.
I tried several fixed fonts. The problem is the 'tab' used by Stefan.

Sven

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Trouble with global-set-key to map meta-g with 'goto-line
  2006-04-21  0:16   ` Barry Margolin
  2006-04-21  0:58     ` Miles Bader
@ 2006-04-21 12:00     ` Hadron Quark
       [not found]     ` <mailman.679.1145581160.9609.help-gnu-emacs@gnu.org>
  2006-04-24  8:44     ` Stefan Monnier
  3 siblings, 0 replies; 14+ messages in thread
From: Hadron Quark @ 2006-04-21 12:00 UTC (permalink / raw)


 "Barry"posted on 2006-04-21:

> In article <874q0oqf2v.fsf-monnier+gnu.emacs.help@gnu.org>,
>  Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>
>> > I am a beginner with GNU Emacs(21.3.1). I added this line to ~/.emacs
>> > 	(global-set-key [(meta-g)] 'goto-line)
>>                               ^
>>                              ^^^
>> 
>> That should be a space, otherwise you're trying to bind the "meta-g" key,
>> which I'm pretty sure you don't have on your keyboard.
>
> If you're going to use ASCII art as a pointer, mae sure you're using a 
> fixed-width font.  Your arrow is pointing to the quote before goto-line, 
> not the hyphen in meta-g.
>

err, he did. Looks fine on my fixed width *reader*. Sounds like you
are not using fixed width font.

LOL.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Trouble with global-set-key to map meta-g with 'goto-line
  2006-04-21  6:25       ` Sven Urbanski
@ 2006-04-21 17:18         ` Miles Bader
  0 siblings, 0 replies; 14+ messages in thread
From: Miles Bader @ 2006-04-21 17:18 UTC (permalink / raw)


Sven Urbanski <inf8237@fh-wedel.de> writes:
> Well, the sender _and_ the reader have to use a fixed font, otherwise it
> won't work as expected ( or they have to use the _same_ font ).
> I get the arrow pointing to the 't' in meta, not pointing to the '-'.
> I tried several fixed fonts. The problem is the 'tab' used by Stefan.

Actually Stefan didn't use a tab, the original poster did (Stefan just
quoted his text verbatim) -- but still it should cause no problems
unless your mail reader uses a non-standard tab width.

-Miles
-- 
We are all lying in the gutter, but some of us are looking at the stars.
-Oscar Wilde

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Trouble with global-set-key to map meta-g with 'goto-line
       [not found]     ` <mailman.679.1145581160.9609.help-gnu-emacs@gnu.org>
  2006-04-21  6:25       ` Sven Urbanski
@ 2006-04-22  2:31       ` Barry Margolin
  1 sibling, 0 replies; 14+ messages in thread
From: Barry Margolin @ 2006-04-22  2:31 UTC (permalink / raw)


In article <mailman.679.1145581160.9609.help-gnu-emacs@gnu.org>,
 Miles Bader <miles@gnu.org> wrote:

> Barry Margolin <barmar@alum.mit.edu> writes:
> > If you're going to use ASCII art as a pointer, mae sure you're using a 
> > fixed-width font.  Your arrow is pointing to the quote before goto-line, 
> > not the hyphen in meta-g.
> 
> Er, normal email doesn't include font information, so it's your job to
> make sure the font your use for reading mail is correct, not the message
> sender's (and indeed, Stefan's message displays correctly if you use a
> fixed-width font to read it).

I *am* using a fixed-width font.

Another common problem with ASCII art is the use of TABs, since the 
sender and reader may not be using the same TAB width.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Trouble with global-set-key to map meta-g with 'goto-line
  2006-04-21  0:16   ` Barry Margolin
                       ` (2 preceding siblings ...)
       [not found]     ` <mailman.679.1145581160.9609.help-gnu-emacs@gnu.org>
@ 2006-04-24  8:44     ` Stefan Monnier
  3 siblings, 0 replies; 14+ messages in thread
From: Stefan Monnier @ 2006-04-24  8:44 UTC (permalink / raw)


> If you're going to use ASCII art as a pointer, mae sure you're using a 
> fixed-width font.  Your arrow is pointing to the quote before goto-line, 
> not the hyphen in meta-g.

Sorry all for not realizing that the code I excerpted was using a TAB.


        Stef ;)

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2006-04-24  8:44 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-20 14:14 Trouble with global-set-key to map meta-g with 'goto-line David Lee
2006-04-20 15:21 ` Peter Dyballa
     [not found] <mailman.642.1145542481.9609.help-gnu-emacs@gnu.org>
2006-04-20 16:20 ` B. T. Raven
2006-04-20 16:43   ` B. T. Raven
2006-04-20 18:26 ` Stefan Monnier
2006-04-21  0:16   ` Barry Margolin
2006-04-21  0:58     ` Miles Bader
2006-04-21 12:00     ` Hadron Quark
     [not found]     ` <mailman.679.1145581160.9609.help-gnu-emacs@gnu.org>
2006-04-21  6:25       ` Sven Urbanski
2006-04-21 17:18         ` Miles Bader
2006-04-22  2:31       ` Barry Margolin
2006-04-24  8:44     ` Stefan Monnier
2006-04-21  1:33   ` Lee David
2006-04-20 21:00 ` Giorgos Pontikakis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).