From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Newsgroups: gmane.emacs.help Subject: Re: Binding C-i without losing functionality Date: Fri, 24 Oct 2008 01:44:27 -0700 (PDT) Organization: http://groups.google.com Message-ID: <3deda649-9c04-4472-a28b-7271ad26abe7@f37g2000pri.googlegroups.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1224841347 629 80.91.229.12 (24 Oct 2008 09:42:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Oct 2008 09:42:27 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 24 11:43:27 2008 connect(): Connection refused 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 1KtJCS-0007pX-U8 for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Oct 2008 11:43:21 +0200 Original-Received: from localhost ([127.0.0.1]:52679 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KtJBN-00047k-64 for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Oct 2008 05:42:13 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!f37g2000pri.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 50 Original-NNTP-Posting-Host: 24.6.185.159 Original-X-Trace: posting.google.com 1224837867 1527 127.0.0.1 (24 Oct 2008 08:44:27 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Fri, 24 Oct 2008 08:44:27 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: f37g2000pri.googlegroups.com; posting-host=24.6.185.159; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.22, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:163776 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:59117 Archived-At: On Oct 23, 5:56 pm, Joseph Peterson wrote: > Hello all, > > I'm trying to bind C-i to isearch-forward, but I'm having some problems. > > It doesn't change anything when I do this or variations of this: > (global-set-key [?\C-i] 'isearch-forward) > > Sometimes it seems like it will work, but it rebinds the tab key, too > (I may be remembering when I bound TAB, though...) > > If I bind both and C-i, then it seems that I can rebind C-i to be > different than . Like this: > (global-set-key [tab] 'c-indent-command) > (global-set-key [?\C-i] 'isearch-forward) > > Then it seems to work, but then I lose all the mode-specific bindings. > (Most annoying is the loss of mini-buffer completion). How do I bind > C-i without affecting the Tab key? not sure if you can. Because i think internally Ctrl+i and Tab are both rerpresented by ascii 9. (ascii 9 is named Horizontal Tab with standard notation ^I) similar other pairs i noticed are Return and Ctrl+m (which is ascii 13; ^M). i might be wrong though. Reference: http://xahlee.org/elisp/Character-Type.html quote: =C2=AB Control characters may be represented using yet another read syntax. This consists of a question mark followed by a backslash, caret, and the corresponding non-control character, in either upper or lower case. For example, both `?\^I' and `?\^i' are valid read syntax for the character C-i, the character whose value is 9. Instead of the `^', you can use =E2=80=9CC-=E2=80=9D; thus, `?\C-i' is equi= valent to `? \^I' and to `?\^i': ?\^I =E2=87=92 9 ?\C-I =E2=87=92 9 =C2=BB Xah =E2=88=91 http://xahlee.org/ =E2=98=84