* 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; 15+ 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] 15+ messages in thread
* Re: Trouble with global-set-key to map meta-g with 'goto-line
2006-04-20 16:20 ` Trouble with global-set-key to map meta-g with 'goto-line B. T. Raven
@ 2006-04-20 16:43 ` B. T. Raven
0 siblings, 0 replies; 15+ 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] 15+ 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 ` Trouble with global-set-key to map meta-g with 'goto-line 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; 15+ 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] 15+ 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 ` Trouble with global-set-key to map meta-g with 'goto-line B. T. Raven
2006-04-20 18:26 ` Stefan Monnier
@ 2006-04-20 21:00 ` Giorgos Pontikakis
2 siblings, 0 replies; 15+ 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] 15+ 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; 15+ 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] 15+ 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; 15+ 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] 15+ 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; 15+ 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] 15+ 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
[not found] ` <mailman.720.1145639922.9609.help-gnu-emacs@gnu.org>
2006-04-22 2:31 ` Trouble with global-set-key to map meta-g with 'goto-line Barry Margolin
1 sibling, 2 replies; 15+ 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] 15+ 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; 15+ 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] 15+ 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
[not found] ` <mailman.720.1145639922.9609.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 15+ 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] 15+ messages in thread
* trouble with tabs [Re: Trouble with global-set-key to map meta-g with 'goto-line]
[not found] ` <mailman.720.1145639922.9609.help-gnu-emacs@gnu.org>
@ 2006-04-21 18:56 ` Sven Urbanski
2006-04-22 0:58 ` Miles Bader
[not found] ` <mailman.751.1145667494.9609.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 15+ messages in thread
From: Sven Urbanski @ 2006-04-21 18:56 UTC (permalink / raw)
Miles Bader wrote:
> 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
I agree.
> unless your mail reader uses a non-standard tab width.
No, it uses 8. The problem is the combination of a character (in this
example a space) and a tab. That combo produces a tab which is only 7 chars
long (because the space is also taken into account).
=>
I hate tabs.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: trouble with tabs [Re: Trouble with global-set-key to map meta-g with 'goto-line]
2006-04-21 18:56 ` trouble with tabs [Re: Trouble with global-set-key to map meta-g with 'goto-line] Sven Urbanski
@ 2006-04-22 0:58 ` Miles Bader
[not found] ` <mailman.751.1145667494.9609.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 15+ messages in thread
From: Miles Bader @ 2006-04-22 0:58 UTC (permalink / raw)
Sven Urbanski <inf8237@fh-wedel.de> writes:
> No, it uses 8. The problem is the combination of a character (in this
> example a space) and a tab. That combo produces a tab which is only 7 chars
> long (because the space is also taken into account).
Why is there a problem? Stefan's (space-only) text took that effect into
account, so in his post things line up perfectly.
Of course in the _followups_ to Stefan's post, which quote the whole
mess, things aren't lined up correctly (because the extra quotation
prefix shifts his space-space only text, but not the preceeding
tab-using text) ... but that's presumably not what Barry was complaining
about.
To be honest I don't know what Barry was complaining about, unless it's
perhaps "This damn MUA uses non-fixed-width fonts!" That's a complaint
I also have with e.g. gmail, but surely the answer is "fix the MUA."
-Miles
--
(\(\
(^.^)
(")")
*This is the cute bunny virus, please copy this into your sig so it can spread.
^ permalink raw reply [flat|nested] 15+ 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; 15+ 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] 15+ messages in thread
* Re: trouble with tabs [Re: Trouble with global-set-key to map meta-g with 'goto-line]
[not found] ` <mailman.751.1145667494.9609.help-gnu-emacs@gnu.org>
@ 2006-04-22 2:41 ` Barry Margolin
0 siblings, 0 replies; 15+ messages in thread
From: Barry Margolin @ 2006-04-22 2:41 UTC (permalink / raw)
In article <mailman.751.1145667494.9609.help-gnu-emacs@gnu.org>,
Miles Bader <miles@gnu.org> wrote:
> Sven Urbanski <inf8237@fh-wedel.de> writes:
> > No, it uses 8. The problem is the combination of a character (in this
> > example a space) and a tab. That combo produces a tab which is only 7 chars
> > long (because the space is also taken into account).
>
> Why is there a problem? Stefan's (space-only) text took that effect into
> account, so in his post things line up perfectly.
>
> Of course in the _followups_ to Stefan's post, which quote the whole
> mess, things aren't lined up correctly (because the extra quotation
> prefix shifts his space-space only text, but not the preceeding
> tab-using text) ... but that's presumably not what Barry was complaining
> about.
>
> To be honest I don't know what Barry was complaining about, unless it's
> perhaps "This damn MUA uses non-fixed-width fonts!" That's a complaint
> I also have with e.g. gmail, but surely the answer is "fix the MUA."
I'm using MT-Newswatcher, and I have it set to display in a fixed-width
font (Monaco 10).
I've figured out the problem. It displays TAB as a single space, rather
than indenting to a tab stop. I had no idea that the single line of
code was indented with a tab rather than a space -- I had to cut and
paste from MT-NW to Emacs to see this.
--
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] 15+ 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; 15+ 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] 15+ messages in thread
end of thread, other threads:[~2006-04-24 8:44 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.642.1145542481.9609.help-gnu-emacs@gnu.org>
2006-04-20 16:20 ` Trouble with global-set-key to map meta-g with 'goto-line 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
[not found] ` <mailman.720.1145639922.9609.help-gnu-emacs@gnu.org>
2006-04-21 18:56 ` trouble with tabs [Re: Trouble with global-set-key to map meta-g with 'goto-line] Sven Urbanski
2006-04-22 0:58 ` Miles Bader
[not found] ` <mailman.751.1145667494.9609.help-gnu-emacs@gnu.org>
2006-04-22 2:41 ` Barry Margolin
2006-04-22 2:31 ` Trouble with global-set-key to map meta-g with 'goto-line Barry Margolin
2006-04-24 8:44 ` Stefan Monnier
2006-04-21 1:33 ` Lee David
2006-04-20 21:00 ` Giorgos Pontikakis
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.