unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* key bindings
@ 2002-11-01 16:20 Jeff Rancier
  2002-11-01 16:56 ` Kevin Rodgers
  2002-11-02  0:23 ` Henrik Enberg
  0 siblings, 2 replies; 26+ messages in thread
From: Jeff Rancier @ 2002-11-01 16:20 UTC (permalink / raw)


Hello All.

I have the function redo bound to C-M-/, in my .emacs as follows:

(global-set-key [M-C-/] 'redo)

The default binding for that sequence is dabbrev-completion, which I don't
use, so I thought I'd override it.  But, when I execute the key sequence,
emacs runs dabbrev-completion.  When I C-h k it reports dabbrev-completion,
which makes sense, but when I manually run redo, emacs reports:

You can run the command 'redo' with <M-C-/>

Something appears confused (other than me!).  Can someone tell me the
correct way to perform this, and have the binding persist?

BTW, I'm running:

GNU Emacs 21.2.1 (i386-msvc-nt5.1.2600) of 2002-03-19 on buffy

--

Thanks,
Jeff

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

* Re: key bindings
  2002-11-01 16:20 Jeff Rancier
@ 2002-11-01 16:56 ` Kevin Rodgers
  2002-11-01 18:37   ` Jeff Rancier
  2002-11-02  0:23 ` Henrik Enberg
  1 sibling, 1 reply; 26+ messages in thread
From: Kevin Rodgers @ 2002-11-01 16:56 UTC (permalink / raw)


Jeff Rancier wrote:

> Hello All.
> 
> I have the function redo bound to C-M-/, in my .emacs as follows:
> 
> (global-set-key [M-C-/] 'redo)
> 
> The default binding for that sequence is dabbrev-completion, which I don't
> use, so I thought I'd override it.  But, when I execute the key sequence,
> emacs runs dabbrev-completion.  When I C-h k it reports dabbrev-completion,
> which makes sense, but when I manually run redo, emacs reports:
> 
> You can run the command 'redo' with <M-C-/>
> 
> Something appears confused (other than me!).  Can someone tell me the
> correct way to perform this, and have the binding persist?


The angle brackets indicate that redo is bound to the M-C-/ function key,

which doesn't exist.  You want it bound to the meta- and control-modified
/ character:


	(global-set-key "\M-\C-/" 'redo)


-- 
<a href="mailto:&lt;kevinr&#64;ihs.com&gt;">Kevin Rodgers</a>

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

* Re: key bindings
  2002-11-01 16:56 ` Kevin Rodgers
@ 2002-11-01 18:37   ` Jeff Rancier
  2002-11-05 17:12     ` Michael Hudson
  0 siblings, 1 reply; 26+ messages in thread
From: Jeff Rancier @ 2002-11-01 18:37 UTC (permalink / raw)


Thanks Kevin,

But when I evaluate this, I get the following error:  Debugger entered--Lisp
error: (error "Invalid modifier in string")

Jeff

"Kevin Rodgers" <kevinr@ihs.com> wrote in message
news:3DC2B228.8020809@ihs.com...
> Jeff Rancier wrote:
>
> > Hello All.
> >
> > I have the function redo bound to C-M-/, in my .emacs as follows:
> >
> > (global-set-key [M-C-/] 'redo)
> >
> > The default binding for that sequence is dabbrev-completion, which I
don't
> > use, so I thought I'd override it.  But, when I execute the key
sequence,
> > emacs runs dabbrev-completion.  When I C-h k it reports
dabbrev-completion,
> > which makes sense, but when I manually run redo, emacs reports:
> >
> > You can run the command 'redo' with <M-C-/>
> >
> > Something appears confused (other than me!).  Can someone tell me the
> > correct way to perform this, and have the binding persist?
>
>
> The angle brackets indicate that redo is bound to the M-C-/ function key,
>
> which doesn't exist.  You want it bound to the meta- and control-modified
> / character:
>
>
> (global-set-key "\M-\C-/" 'redo)
>
>
> --
> <a href="mailto:&lt;kevinr&#64;ihs.com&gt;">Kevin Rodgers</a>
>

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

* Re: key bindings
  2002-11-01 16:20 Jeff Rancier
  2002-11-01 16:56 ` Kevin Rodgers
@ 2002-11-02  0:23 ` Henrik Enberg
  1 sibling, 0 replies; 26+ messages in thread
From: Henrik Enberg @ 2002-11-02  0:23 UTC (permalink / raw)


"Jeff Rancier" <jeff.rancier@softechnics.com> writes:

> Hello All.
>
> I have the function redo bound to C-M-/, in my .emacs as follows:
>
> (global-set-key [M-C-/] 'redo)

(global-set-key (kbd "C-M-/") 'redo)

`kbd' is almost always the solution to keybinding problems.

-- 
Booting... /vmemacs.el

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

* Re: key bindings
  2002-11-01 18:37   ` Jeff Rancier
@ 2002-11-05 17:12     ` Michael Hudson
  0 siblings, 0 replies; 26+ messages in thread
From: Michael Hudson @ 2002-11-05 17:12 UTC (permalink / raw)


"Jeff Rancier" <jeff.rancier@softechnics.com> writes:

> Thanks Kevin,
> 
> But when I evaluate this, I get the following error:  Debugger entered--Lisp
> error: (error "Invalid modifier in string")

You could use [(control meta ?/)] or (kbd "M-C-/").

Cheers,
M.

-- 
  ARTHUR:  Ford, you're turning into a penguin, stop it.
                    -- The Hitch-Hikers Guide to the Galaxy, Episode 2

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

* key bindings
@ 2002-12-13 18:01 sdieselil
  2002-12-13 19:51 ` Kevin Rodgers
                   ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: sdieselil @ 2002-12-13 18:01 UTC (permalink / raw)


Hello to everyone!
Recently I first downloaded Emacs (windows version for now). I was
very impressed by its power but the most interesting feature for me
was  system of key bindings which was completely different from
CUA-windows style. However I don't want to say that it's better than
windows bindings. But I find cursor movement in Emacs much more
powerful because it doesn't use keypad, which is placed so far from
main keyboard block on standard 101-key keyboards. C-b, C-f, C-n, C-p
are much more quickly to use (thought no so intuitive) than keypad
arrow keys.

On the other side arrow keys and C-z, C-x, C-c, C-v (for clipboard
operations) are still very comfortable for me so I decide to make a
mixed key bindings map: I propose to forget about keypad and instead
implement it using C-<letter> keys but leave CUA key bindings for
clipboard operations. For example , this is the most suitable map for
me: C-j is left, C-l is right, C-i is up, C-, is down (since it looks
like keypad but can be quickly reached by hand during speed typing).
+---+---+---+
|   | I |   |
++--++--++--++
 | J |   | L |	 - looks like oblique keypad 
 +-+-+-+-+-+-+-+
   |   | , |   |
   +---+---+---+


Does anybody know something about this system ?

Or you can convince me that traditional Emacs system is better?

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

* Re: key bindings
  2002-12-13 18:01 sdieselil
@ 2002-12-13 19:51 ` Kevin Rodgers
  2002-12-16 11:53 ` Kester Clegg
  2002-12-18 23:32 ` Koyote
  2 siblings, 0 replies; 26+ messages in thread
From: Kevin Rodgers @ 2002-12-13 19:51 UTC (permalink / raw)


I'm sure someone else will be able to show you how to enable CUA keybindings,
but I have to take issue with your claim that C-f, C-b, C-n, and C-p are less
intuitive than C-j, C-l, C-i, and C-i.  The Emacs bindings have obvious
mnemonics: forward, backward, next, and previous.  Your suggested bindings
based on the keyboard layout are like vi's (h, j, k, and l), but you use the
top and bottom rows to represent vertical motion, which does make more sense.

So how would you represent horizontal and vertical motion to the beginning and
end of the line or buffer?
-- 
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>

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

* RE: key bindings
@ 2002-12-13 21:20 Bingham, Jay
  0 siblings, 0 replies; 26+ messages in thread
From: Bingham, Jay @ 2002-12-13 21:20 UTC (permalink / raw)


I have seen similar key patterns for cursor movement in other software.
If I remember correctly WordStar, the word processing program, used the
pattern i, j, k and m for cursor movement.

-_
J_)
C_)ingham
.    HP - NonStop Austin Software & Services - Software Quality
Assurance
.    Office:  2122                  Phone:  8945
. "Language is the apparel in which your thoughts parade in public.
.  Never clothe them in vulgar and shoddy attire."     -Dr. George W.
Crane-


-----Original Message-----
From: Kevin Rodgers [mailto:kevin.rodgers@ihs.com] 
Sent: Friday, December 13, 2002 1:52 PM
To: help-gnu-emacs@gnu.org
Subject: Re: key bindings

I'm sure someone else will be able to show you how to enable CUA
keybindings,
but I have to take issue with your claim that C-f, C-b, C-n, and C-p are
less
intuitive than C-j, C-l, C-i, and C-i.  The Emacs bindings have obvious
mnemonics: forward, backward, next, and previous.  Your suggested
bindings
based on the keyboard layout are like vi's (h, j, k, and l), but you use
the
top and bottom rows to represent vertical motion, which does make more
sense.

So how would you represent horizontal and vertical motion to the
beginning and
end of the line or buffer?
-- 
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>

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

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

* Re: key bindings
  2002-12-13 18:01 sdieselil
  2002-12-13 19:51 ` Kevin Rodgers
@ 2002-12-16 11:53 ` Kester Clegg
  2002-12-18 13:10   ` sdieselil
  2002-12-18 23:32 ` Koyote
  2 siblings, 1 reply; 26+ messages in thread
From: Kester Clegg @ 2002-12-16 11:53 UTC (permalink / raw)


sdieselil@yahoo.com (sdieselil) writes:

> On the other side arrow keys and C-z, C-x, C-c, C-v (for clipboard
> operations) are still very comfortable for me so I decide to make a
> mixed key bindings map: 

[...]

> Or you can convince me that traditional Emacs system is better?

I would stick to the traditional Emacs, simply because if you need to
work on someone else terminal, it's a pain when you've set up too many
personalised keybindings.  You're immediately rendered a newbie on
someone else's machine, or you can't use their emacs because they've
done their own weird bindings.  Plus, lot's of other apps use the
default emacs bindings, e.g. the bash CLI, Matlab, etc, etc..  And you
may not be able to make use of people's smart answers on this newsgroup
if you've overwritten some default binding or other.  :-)

The keys you suggest for the clipboard are heavily used already...

 
-- 
************************************************************************
Kester Clegg				Dept. of Computer Science,
Research Assistant (UTC)		University of York, 
Tel (01904) 43 27 49			email: kester at cs.york.ac.uk
************************************************************************

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

* Re: key bindings
  2002-12-16 11:53 ` Kester Clegg
@ 2002-12-18 13:10   ` sdieselil
  0 siblings, 0 replies; 26+ messages in thread
From: sdieselil @ 2002-12-18 13:10 UTC (permalink / raw)


Kester Clegg <kester@cs.york.ac.uk> wrote in message news:<yqr8yyqdvtn.fsf@cs.york.ac.uk>...
> sdieselil@yahoo.com (sdieselil) writes:
> 
> > On the other side arrow keys and C-z, C-x, C-c, C-v (for clipboard
> > operations) are still very comfortable for me so I decide to make a
> > mixed key bindings map: 
> 
> [...]
> 
> > Or you can convince me that traditional Emacs system is better?
> 
> I would stick to the traditional Emacs, simply because if you need to
> work on someone else terminal, it's a pain when you've set up too many
> personalised keybindings.  You're immediately rendered a newbie on
> someone else's machine, or you can't use their emacs because they've
> done their own weird bindings.  Plus, lot's of other apps use the
> default emacs bindings, e.g. the bash CLI, Matlab, etc, etc..  And you
> may not be able to make use of people's smart answers on this newsgroup
> if you've overwritten some default binding or other.  :-)
> 
> The keys you suggest for the clipboard are heavily used already...

I think you aren't right about "someone else terminal". I always can
bring my floppy with emacs configuration file. Other major apps I use
also allow me set my own keybindings so it's not a problem.

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

* Re: key bindings
  2002-12-13 18:01 sdieselil
  2002-12-13 19:51 ` Kevin Rodgers
  2002-12-16 11:53 ` Kester Clegg
@ 2002-12-18 23:32 ` Koyote
  2 siblings, 0 replies; 26+ messages in thread
From: Koyote @ 2002-12-18 23:32 UTC (permalink / raw)




Heh, nethack keybinding mode for emacs. I like it :)

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

* key bindings
@ 2003-06-13  4:49 john doe
  0 siblings, 0 replies; 26+ messages in thread
From: john doe @ 2003-06-13  4:49 UTC (permalink / raw)


Still trying to get two spaces between periods and
sentences; trying another approach now using key
bindings. I've tried the following in my dotfile:

(global-set-key "." ".  ")

But, this does not work. I get the following error in
the mode-line:

After 0 kbd macro iterations: Variable binding depth
exceeds max-specpdl-size 

This is only a problem when I use the same character
in the new string that I am trying to set globally.
That is, if I used:

(global-set-key "p" ".  ") it works fine.

Any suggestion?

Thanks.


>Greetings-
>
>I'm in the process of writing a manuscript whose
>format is required to have two spaces between
>sentences (ie. ieter periods, exclamation marks,
>etc.).  I'm trying to lessen this task by
>facilitating
>the "abbrev-mode".  However, I cannot get global
>expansion to recognize spaces after, say a period. 
>Is
>this possible.  Much thanks in advance for any help
>on
>this topic.
>
>MD

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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

* Re: key bindings
       [not found] <mailman.7825.1055479806.21513.help-gnu-emacs@gnu.org>
@ 2003-06-13  7:03 ` Kai Großjohann
  2003-06-13  8:57 ` Barman Brakjoller
  1 sibling, 0 replies; 26+ messages in thread
From: Kai Großjohann @ 2003-06-13  7:03 UTC (permalink / raw)


john doe <m0nkeyd0g2000@yahoo.com> writes:

> (global-set-key "." ".  ")

(defun john-insert-end-of-sentence ()
  (interactive)
  (insert ".  "))
(global-set-key (kbd ".") 'john-insert-end-of-sentence)

-- 
This line is not blank.

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

* Re: key bindings
       [not found] <mailman.7825.1055479806.21513.help-gnu-emacs@gnu.org>
  2003-06-13  7:03 ` key bindings Kai Großjohann
@ 2003-06-13  8:57 ` Barman Brakjoller
  1 sibling, 0 replies; 26+ messages in thread
From: Barman Brakjoller @ 2003-06-13  8:57 UTC (permalink / raw)


> Still trying to get two spaces between periods and
> sentences; trying another approach now using key
> bindings. I've tried the following in my dotfile:
> 
> (global-set-key "." ".  ")
> 
> But, this does not work. I get the following error in
> the mode-line:

How about something like this? Too ugly:

(defun one-dot-and-two-spaces ()
  (interactive)
  (insert ".  "))

(local-set-key "." 'one-dot-and-two-spaces)

Works here.

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

* Key bindings
@ 2005-07-22 19:32 Stefan Bienert
  2005-07-22 22:56 ` Peter Dyballa
  0 siblings, 1 reply; 26+ messages in thread
From: Stefan Bienert @ 2005-07-22 19:32 UTC (permalink / raw)


Hello emacs gurus and wannabees ;-)

I got a new problem...in the computer at the university, the meta-key is on 
"alt", at my hoem pc its on "esc". Is there a simple way to change it to 
"alt" for my home pc, too?
My system is a gentoo-linux. But I really got no idea about keyboards.

greetings,

bienchen

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

* Re: Key bindings
       [not found] <mailman.1327.1122065988.20277.help-gnu-emacs@gnu.org>
@ 2005-07-22 21:44 ` Charles philip Chan
  0 siblings, 0 replies; 26+ messages in thread
From: Charles philip Chan @ 2005-07-22 21:44 UTC (permalink / raw)



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

On 22 Jul 2005, StefanBienert@web.de wrote:

> Hello emacs gurus and wannabees ;-)
>
> I got a new problem...in the computer at the university, the meta-key is on 
> "alt", at my hoem pc its on "esc". Is there a simple way to change it to 
> "alt" for my home pc, too?

Add this to your /etc/X11/Xmodmap and restart X.

clear  Mod1
keysym Alt_L = Meta_L
add    Mod1  = Meta_L

Charles

-- 
"By golly, I'm beginning to think Linux really *is* the best thing since
sliced bread."
(By Vance Petree, Virginia Power)

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 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] 26+ messages in thread

* Re: Key bindings
  2005-07-22 19:32 Stefan Bienert
@ 2005-07-22 22:56 ` Peter Dyballa
  0 siblings, 0 replies; 26+ messages in thread
From: Peter Dyballa @ 2005-07-22 22:56 UTC (permalink / raw)
  Cc: emacs list


Am 22.07.2005 um 21:32 schrieb Stefan Bienert:

> I got a new problem...in the computer at the university, the meta-key 
> is on
> "alt", at my hoem pc its on "esc". Is there a simple way to change it 
> to
> "alt" for my home pc, too?
> My system is a gentoo-linux. But I really got no idea about keyboards.
>

When your Emacsen are not running in a terminal emulation but as X 
clients, it's not about keyboards.

There are two programmes in X11: xev and xmodmap. Xmodmap accepts 
arguments to print out the X modifiers or all keys. Xev tells you the 
keysyms and keycodes you press. So you can check out a key (or more) to 
work as meta modifier.

Comparing both worlds you can now write a little script .xmodmaprc like:

	keycode 66 = Meta_L
	keycode 69 = Meta_R
	
	clear Mod2
	add Mod2 = Meta_L Meta_R

In .xinitrc you can add:

	xmodmap .xmodmaprc

So upon launching X11 you'll have at home the same setup as at 
university.

--
Mit friedvollen Grüßen

   Pete

In a world without walls and fences, who needs gates and windows?

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

* Key bindings
@ 2007-03-29 10:19 SteveFKI
  0 siblings, 0 replies; 26+ messages in thread
From: SteveFKI @ 2007-03-29 10:19 UTC (permalink / raw)
  To: Help-gnu-emacs


I am trying to modify my .emacs file, so the HOME key behaves as follows;

HOME = Go to start of line
C-HOME = Go to start of buffer

My .emacs file looks like this

(custom-set-variables
   ;; custom-set-variables was added by Custom -- don't edit or cut/paste
it!
   ;; Your init file should contain only one such instance.
   '(setq debug-on-error t)
   '(case-fold-search t)
   '(current-language-environment "Latin-9")
   '(default-input-method "latin-9-prefix")
   '(hungry-delete t)
   ;(setq delete-key-deletes-forward t)
   '(global-font-lock-mode t nil (font-lock)))
	(setq indent-tabs-mode-nil)
	(mouse-wheel-mode t)
(custom-set-faces
  ;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.
 )

;; My modifications

   (setq delete-key-deletes-forward t)
	
   ;; C-Language customising
   (setq standard-indent 3)

   ;; My C Style
   (defconst myCStyle
     '(
       (c-offsets-alist . ((case-label . 3)
			   (substatement-open . 0)
			   (defun-block-intro . 3)
			   (statement-case-intro . 3)
			   (statement-block-intro . 3)
			   (topmost-intro . -1)
			   ))

     )
   "My C Programming Style")

   (defun myCModeCommonHook ()
      (c-add-style "personal" myCStyle t)
   )

   ;; Hook my C Style to the standard one
   (add-hook 'c-mode-common-hook 'myCModeCommonHook)

  ;; (c-add-style "myCStyle" '("bsd" (c-basic-offset . 3)))
  ;; (add-hook 'c-mode-common-hook '(lambda () (c-set-style "myCStyle")))

   ;; Key bindings
   ;; C-z is Undo
   (define-key global-map "\C-z" 'undo)
   ;; F5 - goto line
   (define-key global-map [f5] 'goto-line)
   ;; F6 - Replace String
   (define-key global-map [f6] 'replace-string)
   ;; F7 - Search forward for ^L (function breaks)
   (define-key global-map [f7] "\C-e\C-s\C-q\C-l")
   ;; C-F7 - Search backward for ^L (function breaks)
   (define-key global-map [C-f7] "\C-a\C-r\C-q\C-l")


;;   (define-key global-map [home] 'beginning-of-line)
   (global-set-key [home] 'beginning-of-line)
   (define-key global-map [end] 'end-of-line)
   (define-key global-map [C-home] 'beginning-of-buffer)
   (define-key global-map [C-end] 'end-of-buffer)


I think this should work, and as you will see I have tried two ways to map
the HOME key. However, every time I press HOME it opens Search in the
mini-buffer (as if it is mapped to C-s). The END key works fine.

It seems to me then that something else is mapping the key, and overriding
my mapping, but I can't see what.

Can anyone offer any guidance?

Thanks
-- 
View this message in context: http://www.nabble.com/Key-bindings-tf3485502.html#a9730443
Sent from the Emacs - Help mailing list archive at Nabble.com.

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

* Re: Key bindings
       [not found] <mailman.1572.1175163715.7795.help-gnu-emacs@gnu.org>
@ 2007-03-29 10:49 ` Tassilo Horn
  2007-03-29 13:19   ` SteveFKI
       [not found]   ` <mailman.1576.1175174562.7795.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 26+ messages in thread
From: Tassilo Horn @ 2007-03-29 10:49 UTC (permalink / raw)
  To: help-gnu-emacs

SteveFKI <stephen.brown@eu.fkilogistex.com> writes:

Hi Stephen,

>    (global-set-key [home] 'beginning-of-line)
>    (define-key global-map [end] 'end-of-line)
>    (define-key global-map [C-home] 'beginning-of-buffer)
>    (define-key global-map [C-end] 'end-of-buffer)
>
> I think this should work, and as you will see I have tried two ways to
> map the HOME key. However, every time I press HOME it opens Search in
> the mini-buffer (as if it is mapped to C-s). The END key works fine.

Use `C-h k' to get the binding string and use that with the `kbd'-macro.

,----[ C-h k <home> ]
| <home> runs the command move-beginning-of-line
[...]
`----

,----[ C-h k <C-home> ]
| <C-home> runs the command beginning-of-buffer
[...]
`----

You see, emacs 22 already has the bindings you want. :-)

Nevertheless, if you would want to rebind them, you would do

  (global-set-key (kbd "<C-home>") 'some-function)

Bye,
Tassilo
-- 
A child of five could understand this! Fetch me a child of five!

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

* Re: Key bindings
  2007-03-29 10:49 ` Tassilo Horn
@ 2007-03-29 13:19   ` SteveFKI
  2007-03-29 20:16     ` Peter Dyballa
       [not found]   ` <mailman.1576.1175174562.7795.help-gnu-emacs@gnu.org>
  1 sibling, 1 reply; 26+ messages in thread
From: SteveFKI @ 2007-03-29 13:19 UTC (permalink / raw)
  To: Help-gnu-emacs




Tassilo Horn-3 wrote:
> 
> SteveFKI <stephen.brown@eu.fkilogistex.com> writes:
> 
> Hi Stephen,
> 
>>    (global-set-key [home] 'beginning-of-line)
>>    (define-key global-map [end] 'end-of-line)
>>    (define-key global-map [C-home] 'beginning-of-buffer)
>>    (define-key global-map [C-end] 'end-of-buffer)
>>
>> I think this should work, and as you will see I have tried two ways to
>> map the HOME key. However, every time I press HOME it opens Search in
>> the mini-buffer (as if it is mapped to C-s). The END key works fine.
> 
> Use `C-h k' to get the binding string and use that with the `kbd'-macro.
> 
> ,----[ C-h k <home> ]
> | <home> runs the command move-beginning-of-line
> [...]
> `----
> 
> ,----[ C-h k <C-home> ]
> | <C-home> runs the command beginning-of-buffer
> [...]
> `----
> 
> You see, emacs 22 already has the bindings you want. :-)
> 
> Nevertheless, if you would want to rebind them, you would do
> 
>   (global-set-key (kbd "<C-home>") 'some-function)
> 
> Bye,
> Tassilo
> -- 
> A child of five could understand this! Fetch me a child of five!
> _______________________________________________
> help-gnu-emacs mailing list
> help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
> 
> 

I tried this, and I get the same problem. However, when I type C-h k <home>,
it emacs tells me that

"<find> runs the command search-forward
 (search-forward STRING &optional BOUND NOERROR COUNT)
      which is an interactive built-in function.

Sounds like I am trying to override a function, which cannot be overriden.

By the way I am using emacs  version 21.3.1, and not in aposition to
upgrade.

Any more ideas?

Thanks
-- 
View this message in context: http://www.nabble.com/Key-bindings-tf3485502.html#a9733089
Sent from the Emacs - Help mailing list archive at Nabble.com.

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

* Re: Key bindings
  2007-03-29 13:19   ` SteveFKI
@ 2007-03-29 20:16     ` Peter Dyballa
  2007-03-29 20:49       ` SteveFKI
  0 siblings, 1 reply; 26+ messages in thread
From: Peter Dyballa @ 2007-03-29 20:16 UTC (permalink / raw)
  To: SteveFKI; +Cc: Help-gnu-emacs


Am 29.03.2007 um 15:19 schrieb SteveFKI:

> I tried this, and I get the same problem. However, when I type C-h  
> k <home>,
> it emacs tells me that
>
> "<find> runs the command search-forward
>  (search-forward STRING &optional BOUND NOERROR COUNT)
>       which is an interactive built-in function.

Can you check what is bound to that "home" key in X11? (The utilities  
xmodmap and xev can give information.)

--
Greetings

   Pete

  "A designer knows he has arrived at perfection not when there is no  
longer anything to add, but when there is no longer anything to take  
away."
                                  -- Antoine de Saint-Exupéry

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

* Re: Key bindings
       [not found]   ` <mailman.1576.1175174562.7795.help-gnu-emacs@gnu.org>
@ 2007-03-29 20:16     ` Malte Spiess
  2007-03-29 21:02       ` SteveFKI
  2007-03-29 20:22     ` Tassilo Horn
  1 sibling, 1 reply; 26+ messages in thread
From: Malte Spiess @ 2007-03-29 20:16 UTC (permalink / raw)
  To: help-gnu-emacs

SteveFKI <stephen.brown@eu.fkilogistex.com> writes:

> Tassilo Horn-3 wrote:

>> Use `C-h k' to get the binding string and use that with the `kbd'-macro.
>> 
>> ,----[ C-h k <home> ]
>> | <home> runs the command move-beginning-of-line
>> [...]
>> `----
>> 
>> ,----[ C-h k <C-home> ]
>> | <C-home> runs the command beginning-of-buffer
>> [...]
>> `----
>> 
>> You see, emacs 22 already has the bindings you want. :-)
>> 
>> Nevertheless, if you would want to rebind them, you would do
>> 
>>   (global-set-key (kbd "<C-home>") 'some-function)
>> 
>> Bye,
>> Tassilo
>> -- 
>> A child of five could understand this! Fetch me a child of five!
>> _______________________________________________
>> help-gnu-emacs mailing list
>> help-gnu-emacs@gnu.org
>> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
>> 
>> 
>
> I tried this, and I get the same problem. However, when I type C-h k <home>,
> it emacs tells me that
>
> "<find> runs the command search-forward
>  (search-forward STRING &optional BOUND NOERROR COUNT)
>       which is an interactive built-in function.
>
> Sounds like I am trying to override a function, which cannot be overriden.
>
> By the way I am using emacs  version 21.3.1, and not in aposition to
> upgrade.

Okay, I would recommend it, too!

> Any more ideas?

Yes, it seems like the key you pressed is not recognised as <home>, but
as <find>. So you probably should write
(global-set-key (kbd "<C-find>") 'some-function)
instead. Very strange keyboard setup btw.

Greetings

Malte

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

* Re: Key bindings
       [not found]   ` <mailman.1576.1175174562.7795.help-gnu-emacs@gnu.org>
  2007-03-29 20:16     ` Malte Spiess
@ 2007-03-29 20:22     ` Tassilo Horn
  1 sibling, 0 replies; 26+ messages in thread
From: Tassilo Horn @ 2007-03-29 20:22 UTC (permalink / raw)
  To: help-gnu-emacs

SteveFKI <stephen.brown@eu.fkilogistex.com> writes:

Hi Stephen,

> I tried this, and I get the same problem. However, when I type C-h k
> <home>, it emacs tells me that
>
> "<find> runs the command search-forward
>  (search-forward STRING &optional BOUND NOERROR COUNT)
>       which is an interactive built-in function.

Huh? What's <find> for a key? Do you use exotic hardware, xmodmap or a
special xkb layout?

> Sounds like I am trying to override a function, which cannot be
> overriden.

No no. The problem is that your <home> key is a <find> key for any
reason.

So bind

  (global-set-key (kbd "<find>") 'beginning-of-line)
  (global-set-key (kbd "<C-find>") 'beginning-of-line)

and you'll be fine.

Bye,
Tassilo
-- 
No person,  no idea, and no  religion deserves to be  illegal to insult,
not even the Church of Emacs. (Richard M. Stallman)

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

* Re: Key bindings
  2007-03-29 20:16     ` Peter Dyballa
@ 2007-03-29 20:49       ` SteveFKI
  2007-03-29 21:22         ` Peter Dyballa
  0 siblings, 1 reply; 26+ messages in thread
From: SteveFKI @ 2007-03-29 20:49 UTC (permalink / raw)
  To: Help-gnu-emacs


Peter,

Thanks for this. xmodmap gives me this

xmodmap:  up to 2 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock      
control     Control_L (0x25),  Control_R (0x6d)
mod1        Alt_L (0x40),  Alt_R (0x71)
mod2      
mod3      
mod4      
mod5      

Which does not look too bad to me 9with my limited knowledge. Were you
expecting to see the HOME key mapped elsewhere?

Steve

Peter Dyballa wrote:
> 
> 
> Am 29.03.2007 um 15:19 schrieb SteveFKI:
> 
>> I tried this, and I get the same problem. However, when I type C-h  
>> k <home>,
>> it emacs tells me that
>>
>> "<find> runs the command search-forward
>>  (search-forward STRING &optional BOUND NOERROR COUNT)
>>       which is an interactive built-in function.
> 
> Can you check what is bound to that "home" key in X11? (The utilities  
> xmodmap and xev can give information.)
> 
> --
> Greetings
> 
>    Pete
> 
>   "A designer knows he has arrived at perfection not when there is no  
> longer anything to add, but when there is no longer anything to take  
> away."
>                                   -- Antoine de Saint-Exupéry
> 
> 
> 
> 
> _______________________________________________
> help-gnu-emacs mailing list
> help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
> 
> 

-- 
View this message in context: http://www.nabble.com/Key-bindings-tf3485502.html#a9742406
Sent from the Emacs - Help mailing list archive at Nabble.com.

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

* Re: Key bindings
  2007-03-29 20:16     ` Malte Spiess
@ 2007-03-29 21:02       ` SteveFKI
  0 siblings, 0 replies; 26+ messages in thread
From: SteveFKI @ 2007-03-29 21:02 UTC (permalink / raw)
  To: Help-gnu-emacs


Malte,

This is indeed right, but I cannot explain how/why my home key is mapped to
find. It's fixed now, and works.

Thanks

Steve


Malte Spiess-3 wrote:
> 
> SteveFKI <stephen.brown@eu.fkilogistex.com> writes:
> 
>> Tassilo Horn-3 wrote:
> 
>>> Use `C-h k' to get the binding string and use that with the `kbd'-macro.
>>> 
>>> ,----[ C-h k <home> ]
>>> | <home> runs the command move-beginning-of-line
>>> [...]
>>> `----
>>> 
>>> ,----[ C-h k <C-home> ]
>>> | <C-home> runs the command beginning-of-buffer
>>> [...]
>>> `----
>>> 
>>> You see, emacs 22 already has the bindings you want. :-)
>>> 
>>> Nevertheless, if you would want to rebind them, you would do
>>> 
>>>   (global-set-key (kbd "<C-home>") 'some-function)
>>> 
>>> Bye,
>>> Tassilo
>>> -- 
>>> A child of five could understand this! Fetch me a child of five!
>>> _______________________________________________
>>> help-gnu-emacs mailing list
>>> help-gnu-emacs@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
>>> 
>>> 
>>
>> I tried this, and I get the same problem. However, when I type C-h k
>> <home>,
>> it emacs tells me that
>>
>> "<find> runs the command search-forward
>>  (search-forward STRING &optional BOUND NOERROR COUNT)
>>       which is an interactive built-in function.
>>
>> Sounds like I am trying to override a function, which cannot be
>> overriden.
>>
>> By the way I am using emacs  version 21.3.1, and not in aposition to
>> upgrade.
> 
> Okay, I would recommend it, too!
> 
>> Any more ideas?
> 
> Yes, it seems like the key you pressed is not recognised as <home>, but
> as <find>. So you probably should write
> (global-set-key (kbd "<C-find>") 'some-function)
> instead. Very strange keyboard setup btw.
> 
> Greetings
> 
> Malte
> _______________________________________________
> help-gnu-emacs mailing list
> help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
> 
> 

-- 
View this message in context: http://www.nabble.com/Key-bindings-tf3485502.html#a9742624
Sent from the Emacs - Help mailing list archive at Nabble.com.

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

* Re: Key bindings
  2007-03-29 20:49       ` SteveFKI
@ 2007-03-29 21:22         ` Peter Dyballa
  0 siblings, 0 replies; 26+ messages in thread
From: Peter Dyballa @ 2007-03-29 21:22 UTC (permalink / raw)
  To: SteveFKI; +Cc: Help-gnu-emacs


Am 29.03.2007 um 22:49 schrieb SteveFKI:

> Were you expecting to see the HOME key mapped elsewhere?

In the output of 'xmodmap -pk' – this should list the key bindings/ 
key symbols as used in X11. GNU Emacs sees these names, too.

The output of 'xmodmap -pk' follows the geometry of your keyboard.  
Look in those lines output for symbols in the neighbourhood of Home.  
Or for "Find."

If you than create a file ~/.xmodmaprc with a contents like

	keycode <the number of Find in xmodmap's output> = Home

and add to ~/.xinitrc a line like

	xmodmap ${HOME}/.xmodmap

before the first X client is launched, your Home key will be known as  
your Home key.


If you won't change more keys, you can also use a line like

	xmodmap -e 'keycode <the number of Find in xmodmap's output> = Home'

directly – or on the command line for a test.

--
Greetings

   Pete

’Twas a woman who drove me to drink, and I never had the courtesy
  to thank her for it.         — W.C. Fields

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

end of thread, other threads:[~2007-03-29 21:22 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.1327.1122065988.20277.help-gnu-emacs@gnu.org>
2005-07-22 21:44 ` Key bindings Charles philip Chan
     [not found] <mailman.1572.1175163715.7795.help-gnu-emacs@gnu.org>
2007-03-29 10:49 ` Tassilo Horn
2007-03-29 13:19   ` SteveFKI
2007-03-29 20:16     ` Peter Dyballa
2007-03-29 20:49       ` SteveFKI
2007-03-29 21:22         ` Peter Dyballa
     [not found]   ` <mailman.1576.1175174562.7795.help-gnu-emacs@gnu.org>
2007-03-29 20:16     ` Malte Spiess
2007-03-29 21:02       ` SteveFKI
2007-03-29 20:22     ` Tassilo Horn
2007-03-29 10:19 SteveFKI
  -- strict thread matches above, loose matches on Subject: below --
2005-07-22 19:32 Stefan Bienert
2005-07-22 22:56 ` Peter Dyballa
     [not found] <mailman.7825.1055479806.21513.help-gnu-emacs@gnu.org>
2003-06-13  7:03 ` key bindings Kai Großjohann
2003-06-13  8:57 ` Barman Brakjoller
2003-06-13  4:49 john doe
2002-12-13 21:20 Bingham, Jay
2002-12-13 18:01 sdieselil
2002-12-13 19:51 ` Kevin Rodgers
2002-12-16 11:53 ` Kester Clegg
2002-12-18 13:10   ` sdieselil
2002-12-18 23:32 ` Koyote
2002-11-01 16:20 Jeff Rancier
2002-11-01 16:56 ` Kevin Rodgers
2002-11-01 18:37   ` Jeff Rancier
2002-11-05 17:12     ` Michael Hudson
2002-11-02  0:23 ` Henrik Enberg

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).