From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: mar@centrum.cz (Martin) Newsgroups: gmane.emacs.help Subject: Re: change autocompletion key in emacs Date: Sat, 16 Jul 2011 10:12:05 +0200 Message-ID: <20110716081205.GA9673@chocholous.lan> References: <201107151204.12427.psdc1978@gmail.com> <4E206B0C.5030800@dogan.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1310804035 13615 80.91.229.12 (16 Jul 2011 08:13:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 16 Jul 2011 08:13:55 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jul 16 10:13:48 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qi00S-00006r-8c for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Jul 2011 10:13:48 +0200 Original-Received: from localhost ([::1]:55402 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qi00P-0006pL-Hw for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Jul 2011 04:13:45 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:45271) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QhzzB-0006p7-VJ for help-gnu-emacs@gnu.org; Sat, 16 Jul 2011 04:12:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QhzzB-0005rK-1U for help-gnu-emacs@gnu.org; Sat, 16 Jul 2011 04:12:29 -0400 Original-Received: from smtp-out3.iol.cz ([194.228.2.91]:36545) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QhzzA-0005qv-M5 for help-gnu-emacs@gnu.org; Sat, 16 Jul 2011 04:12:29 -0400 Original-Received: from antivir5.iol.cz (unknown [192.168.30.212]) by smtp-out3.iol.cz (Postfix) with ESMTP id 629D1BD0346 for ; Sat, 16 Jul 2011 08:12:20 +0000 (UTC) Original-Received: from localhost (antivir5.iol.cz [127.0.0.1]) by antivir5.iol.cz (Postfix) with ESMTP id 49DD01E804A for ; Sat, 16 Jul 2011 10:12:20 +0200 (CEST) X-Virus-Scanned: amavisd-new at iol.cz Original-Received: from antivir5.iol.cz ([127.0.0.1]) by localhost (antivir5.iol.cz [127.0.0.1]) (amavisd-new, port 10224) with LMTP id HNZPO-Mwdm+m for ; Sat, 16 Jul 2011 10:12:20 +0200 (CEST) Original-Received: from port1.iol.cz (unknown [192.168.30.91]) by antivir5.iol.cz (Postfix) with ESMTP id 22F7E1E8031 for ; Sat, 16 Jul 2011 10:12:20 +0200 (CEST) X-SBRS: None X-SBRS-none: None X-RECVLIST: MTA-OUT-IOL X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvNHADlHIU5VoHbR/2dsb2JhbABThUGTMop0hAt4iHzCBoVbXwSjPQ Original-Received: from ip-85-160-118-209.eurotel.cz (HELO chocholous.lan) ([85.160.118.209]) by port1.iol.cz with ESMTP; 16 Jul 2011 10:12:06 +0200 Original-Received: by chocholous.lan (Postfix, from userid 1000) id 61F8324026D; Sat, 16 Jul 2011 10:12:05 +0200 (CEST) Content-Disposition: inline In-Reply-To: <4E206B0C.5030800@dogan.se> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 194.228.2.91 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:81612 Archived-At: just a small tip -- in case you haven't try already -- use hippie-expand instead of simple dabbrev-expand. (when (load "hippie-exp" t) (global-unset-key "\M-/") (global-set-key "\M-/" 'hippie-expand)) in your case use (M-_) If you change it because your local keybord mapping (ie. not english) has different symbol on the same physical key, you may like to have *-expand being mapped to both keys, just as i do for Czech keyboard layout: My .emacs contains: (when (load "hippie-exp" t) (global-unset-key "\M-/") (global-set-key "\M-/" 'hippie-expand) ;; for CZE keybord mapping if in use: '/' == '-' (global-unset-key "\M--") (global-set-key "\M--" 'hippie-expand)) m. On Fri, Jul 15, 2011 at 06:30:04PM +0200, Deniz Dogan wrote: > On 2011-07-15 13:04, Pedro Sa Costa wrote: > >Hi, > > > >I would like to change the autocompletion shortcut (M-/) im emacs to (M- _). > >How can I do that? > > > > > > Put this in your init file: > > (global-set-key (kbd "M-_") 'dabbrev-expand) > > Deniz >