From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Alex Wei" Newsgroups: gmane.emacs.help Subject: Re: How to rebind keys "C-j" to join-line Date: Tue, 7 Aug 2007 10:25:30 +0800 Message-ID: <46A6C2CAF59A4244AB5AC27ED3F33CBB@array8f42e753d> References: <1EA8C5CAFEE34474B0BC8809A468377F@array8f42e753d><87r6mkngx6.fsf@debby.local.net> <87ejigjs46.fsf@debby.local.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0655342566==" X-Trace: sea.gmane.org 1186457515 22549 80.91.229.12 (7 Aug 2007 03:31:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 7 Aug 2007 03:31:55 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "Dieter Wilhelm" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 07 05:31:53 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IIFnU-0005gY-2g for geh-help-gnu-emacs@m.gmane.org; Tue, 07 Aug 2007 05:31:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IIFnO-0002fn-Kx for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Aug 2007 23:31:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IIFn8-0002fi-Oq for help-gnu-emacs@gnu.org; Mon, 06 Aug 2007 23:31:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IIFn5-0002du-Bx for help-gnu-emacs@gnu.org; Mon, 06 Aug 2007 23:31:30 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IIFn5-0002dg-1y for help-gnu-emacs@gnu.org; Mon, 06 Aug 2007 23:31:27 -0400 Original-Received: from w98.arrayinc.com ([207.190.196.98] helo=barracuda.arrayinc.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IIFn1-0002CN-I1 for help-gnu-emacs@gnu.org; Mon, 06 Aug 2007 23:31:25 -0400 X-ASG-Debug-ID: 1186453521-65b9001e0000-2yy5ZX X-Barracuda-URL: http://172.22.0.241:8000/cgi-bin/mark.cgi X-Barracuda-Connect: unknown[59.37.5.20] X-Barracuda-Start-Time: 1186453521 Original-Received: from array8f42e753d (unknown [59.37.5.20]) by barracuda.arrayinc.com (Spam Firewall) with ESMTP id 372B72C4F; Mon, 6 Aug 2007 22:25:23 -0400 (EDT) X-ASG-Orig-Subj: Re: How to rebind keys "C-j" to join-line X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 12.0.1184 X-MimeOLE: Produced By Microsoft MimeOLE V12.0.1184 X-Barracuda-Virus-Scanned: by Barracuda Spam Firewall at arrayinc.com X-Detected-Kernel: Linux 2.4-2.6 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:46366 Archived-At: This is a multi-part message in MIME format. --===============0655342566== Content-Type: multipart/alternative; boundary="----=_NextPart_000_0036_01C7D8DD.4793D070" This is a multi-part message in MIME format. ------=_NextPart_000_0036_01C7D8DD.4793D070 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi=20 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=20 Sierra Atlantic ----- Original Message -----=20 From: Dieter Wilhelm=20 To: Alex Wei=20 Cc: help-gnu-emacs@gnu.org=20 Sent: Tuesday, August 07, 2007 5:00 AM Subject: Re: How to rebind keys "C-j" to join-line "Alex Wei" writes: > Thanks H. Dieter Wilhelm > =20 > 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. > =20 > 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. --=20 Best wishes H. Dieter Wilhelm Darmstadt, Germany ------=_NextPart_000_0036_01C7D8DD.4793D070 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi
 
Thanks for your replay, I still can't figure out why yet, both=20 global-set-key and local-set-key can't rebind the C-j keys to=20 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:=20 Dieter Wilhelm
Cc: help-gnu-emacs@gnu.org =
Sent: Tuesday, August 07, 2007 = 5:00=20 AM
Subject: Re: How to rebind keys = "C-j" to=20 join-line

"Alex Wei" <swei@arrayinc.com> = writes:

>=20 Thanks    H. Dieter Wilhelm

> I = don't need=20 the original C-j keybinding, the "M-^" needs to press 3 keys = at

I see,=20 (I, personally, count M+SHIFT as one key, pressed at the same time=20 ;-)

> same time, so I want to rebind the C-j to join-line. I = am just=20 wondering how to
> rebind the key or how can I find the=20 hook.

> After opening the Emacs, I type =20 (local-set-key (kbd "C-j") 'join-line)  and
> then Cx Ce, = It=20 works!!

Have you tried (global-set-key)?  Maybe = local-set-key=20 works only in
the *scratch* buffer at start-up?  Sorry I'm not = sure.

--
    Best = wishes

   =20 H. Dieter Wilhelm
    Darmstadt,=20 Germany ------=_NextPart_000_0036_01C7D8DD.4793D070-- --===============0655342566== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --===============0655342566==--