* Re: How to rebind keys "C-j" to join-line
[not found] <mailman.4283.1186118330.32220.help-gnu-emacs@gnu.org>
@ 2007-08-03 11:57 ` Daniel Jensen
0 siblings, 0 replies; 9+ messages in thread
From: Daniel Jensen @ 2007-08-03 11:57 UTC (permalink / raw)
To: help-gnu-emacs
"Alex Wei" <swei@arrayinc.com> writes:
> I add the following lines into my .emacs file, but it dosen't work, How can I
> rebind the key "C-j" to join-line ?
>
> (global-set-key (kbd "C-j") 'join-line)
There's nothing wrong with this line. Why doesn't it work for you? It
binds a key in the global map. Did you expect a different result?
> (local-set-key (kbd "C-j") 'join-line)
You can delete this line. It's fine in a hook function, not stand-alone
like this. To bind the key for a specific mode, use something like this:
(add-hook 'foo-mode-hook
(lambda ()
(local-set-key (kbd "C-j") 'join-line)))
^ permalink raw reply [flat|nested] 9+ messages in thread
* How to rebind keys "C-j" to join-line
@ 2007-08-03 5:18 Alex Wei
2007-08-04 2:59 ` Dieter Wilhelm
0 siblings, 1 reply; 9+ messages in thread
From: Alex Wei @ 2007-08-03 5:18 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1.1: Type: text/plain, Size: 272 bytes --]
Hi All
I add the following lines into my .emacs file, but it dosen't work, How can I rebind the key "C-j" to join-line ?
(global-set-key (kbd "C-j") 'join-line)
(local-set-key (kbd "C-j") 'join-line)
Thanks in advance for ur kind helps
Sunding Wei
[-- Attachment #1.2: Type: text/html, Size: 989 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] 9+ messages in thread
* Re: How to rebind keys "C-j" to join-line
2007-08-03 5:18 Alex Wei
@ 2007-08-04 2:59 ` Dieter Wilhelm
2007-08-06 2:17 ` Alex Wei
0 siblings, 1 reply; 9+ messages in thread
From: Dieter Wilhelm @ 2007-08-04 2:59 UTC (permalink / raw)
To: Alex Wei; +Cc: help-gnu-emacs
"Alex Wei" <swei@arrayinc.com> writes:
> I add the following lines into my .emacs file, but it dosen't work, How can I
> rebind the key "C-j" to join-line ?
May I ask why the standard key-binding of join-line (M-^) is not
sufficient for you?
--
Best wishes
H. Dieter Wilhelm
Darmstadt, Germany
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to rebind keys "C-j" to join-line
2007-08-04 2:59 ` Dieter Wilhelm
@ 2007-08-06 2:17 ` Alex Wei
2007-08-06 14:37 ` Nikolaj Schumacher
2007-08-06 21:00 ` Dieter Wilhelm
0 siblings, 2 replies; 9+ messages in thread
From: Alex Wei @ 2007-08-06 2:17 UTC (permalink / raw)
To: Dieter Wilhelm; +Cc: help-gnu-emacs
[-- Attachment #1.1: Type: text/plain, Size: 1000 bytes --]
Thanks H. Dieter Wilhelm
I don't need the original C-j keybinding, the "M-^" needs to press 3 keys at same time, so I want to rebind the C-j to join-line. I am just wondering how to rebind the key or how can I find the hook.
After opening the Emacs, I type (local-set-key (kbd "C-j") 'join-line) and then Cx Ce, It works!!
But it dosen't work at .emacs, can you help, I guess I need to find the last setup's hook.
Thanks
Alex Wei
----- Original Message -----
From: Dieter Wilhelm
To: Alex Wei
Cc: help-gnu-emacs@gnu.org
Sent: Saturday, August 04, 2007 10:59 AM
Subject: Re: How to rebind keys "C-j" to join-line
"Alex Wei" <swei@arrayinc.com> writes:
> I add the following lines into my .emacs file, but it dosen't work, How can I
> rebind the key "C-j" to join-line ?
May I ask why the standard key-binding of join-line (M-^) is not
sufficient for you?
--
Best wishes
H. Dieter Wilhelm
Darmstadt, Germany
[-- Attachment #1.2: Type: text/html, Size: 2555 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] 9+ messages in thread
* Re: How to rebind keys "C-j" to join-line
2007-08-06 2:17 ` Alex Wei
@ 2007-08-06 14:37 ` Nikolaj Schumacher
2007-08-07 2:15 ` Alex Wei
2007-08-06 21:00 ` Dieter Wilhelm
1 sibling, 1 reply; 9+ messages in thread
From: Nikolaj Schumacher @ 2007-08-06 14:37 UTC (permalink / raw)
To: Alex Wei; +Cc: help-gnu-emacs
"Alex Wei" <swei@arrayinc.com> wrote:
> After opening the Emacs, I type (local-set-key (kbd "C-j") 'join-line)
> and then Cx Ce, It works!! But it dosen't work at .emacs,
Does adding anything else work?
Maybe you have an old .emacs.elc in the directory that gets loaded first?
regards,
Nikolaj Schumacher
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to rebind keys "C-j" to join-line
2007-08-06 14:37 ` Nikolaj Schumacher
@ 2007-08-07 2:15 ` Alex Wei
2007-08-08 4:46 ` Kevin Rodgers
0 siblings, 1 reply; 9+ messages in thread
From: Alex Wei @ 2007-08-07 2:15 UTC (permalink / raw)
To: Nikolaj Schumacher; +Cc: help-gnu-emacs
[-- Attachment #1.1: Type: text/plain, Size: 760 bytes --]
Hi
Thanks for your reply, I don't have .emacs.elc in my home direcory, I am using the emacs-22.1.
There's only one .emacs there, not sure why I can't rebind the C-j key to join-line.
Alex Wei
Aug. 7, 2007
----- Original Message -----
From: Nikolaj Schumacher
To: Alex Wei
Cc: help-gnu-emacs@gnu.org
Sent: Monday, August 06, 2007 10:37 PM
Subject: Re: How to rebind keys "C-j" to join-line
"Alex Wei" <swei@arrayinc.com> wrote:
> After opening the Emacs, I type (local-set-key (kbd "C-j") 'join-line)
> and then Cx Ce, It works!! But it dosen't work at .emacs,
Does adding anything else work?
Maybe you have an old .emacs.elc in the directory that gets loaded first?
regards,
Nikolaj Schumacher
[-- Attachment #1.2: Type: text/html, Size: 2161 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] 9+ messages in thread
* Re: How to rebind keys "C-j" to join-line
2007-08-07 2:15 ` Alex Wei
@ 2007-08-08 4:46 ` Kevin Rodgers
0 siblings, 0 replies; 9+ messages in thread
From: Kevin Rodgers @ 2007-08-08 4:46 UTC (permalink / raw)
To: help-gnu-emacs
Alex Wei wrote:
> Hi
>
> Thanks for your reply, I don't have .emacs.elc in my home direcory, I am
> using the emacs-22.1.
> There's only one .emacs there, not sure why I can't rebind the C-j key
> to join-line.
What does `C-h v initial-major-mode' say? What major mode do you do
most of your editing in?
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to rebind keys "C-j" to join-line
2007-08-06 2:17 ` Alex Wei
2007-08-06 14:37 ` Nikolaj Schumacher
@ 2007-08-06 21:00 ` Dieter Wilhelm
2007-08-07 2:25 ` Alex Wei
1 sibling, 1 reply; 9+ messages in thread
From: Dieter Wilhelm @ 2007-08-06 21:00 UTC (permalink / raw)
To: Alex Wei; +Cc: help-gnu-emacs
"Alex Wei" <swei@arrayinc.com> writes:
> Thanks H. Dieter Wilhelm
>
> I don't need the original C-j keybinding, the "M-^" needs to press 3 keys at
I see, (I, personally, count M+SHIFT as one key, pressed at the same time ;-)
> same time, so I want to rebind the C-j to join-line. I am just wondering how to
> rebind the key or how can I find the hook.
>
> After opening the Emacs, I type (local-set-key (kbd "C-j") 'join-line) and
> then Cx Ce, It works!!
Have you tried (global-set-key)? Maybe local-set-key works only in
the *scratch* buffer at start-up? Sorry I'm not sure.
--
Best wishes
H. Dieter Wilhelm
Darmstadt, Germany
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to rebind keys "C-j" to join-line
2007-08-06 21:00 ` Dieter Wilhelm
@ 2007-08-07 2:25 ` Alex Wei
0 siblings, 0 replies; 9+ messages in thread
From: Alex Wei @ 2007-08-07 2:25 UTC (permalink / raw)
To: Dieter Wilhelm; +Cc: help-gnu-emacs
[-- Attachment #1.1: Type: text/plain, Size: 1222 bytes --]
Hi
Thanks for your replay, I still can't figure out why yet, both global-set-key and local-set-key can't rebind the C-j keys to join-line, only local-set-key works by issueing C-x C-e after Emacs started.
I guess I need to find the last setup's hook.
Best Regards
Alex Wei
Sierra Atlantic
----- Original Message -----
From: Dieter Wilhelm
To: Alex Wei
Cc: help-gnu-emacs@gnu.org
Sent: Tuesday, August 07, 2007 5:00 AM
Subject: Re: How to rebind keys "C-j" to join-line
"Alex Wei" <swei@arrayinc.com> writes:
> Thanks H. Dieter Wilhelm
>
> I don't need the original C-j keybinding, the "M-^" needs to press 3 keys at
I see, (I, personally, count M+SHIFT as one key, pressed at the same time ;-)
> same time, so I want to rebind the C-j to join-line. I am just wondering how to
> rebind the key or how can I find the hook.
>
> After opening the Emacs, I type (local-set-key (kbd "C-j") 'join-line) and
> then Cx Ce, It works!!
Have you tried (global-set-key)? Maybe local-set-key works only in
the *scratch* buffer at start-up? Sorry I'm not sure.
--
Best wishes
H. Dieter Wilhelm
Darmstadt, Germany
[-- Attachment #1.2: Type: text/html, Size: 2815 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] 9+ messages in thread
end of thread, other threads:[~2007-08-08 4:46 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.4283.1186118330.32220.help-gnu-emacs@gnu.org>
2007-08-03 11:57 ` How to rebind keys "C-j" to join-line Daniel Jensen
2007-08-03 5:18 Alex Wei
2007-08-04 2:59 ` Dieter Wilhelm
2007-08-06 2:17 ` Alex Wei
2007-08-06 14:37 ` Nikolaj Schumacher
2007-08-07 2:15 ` Alex Wei
2007-08-08 4:46 ` Kevin Rodgers
2007-08-06 21:00 ` Dieter Wilhelm
2007-08-07 2:25 ` Alex Wei
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.