From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ross@rosslaird.info (Ross A. Laird) Newsgroups: gmane.emacs.help Subject: Re: abbreviations Date: Fri, 17 Oct 2008 23:37:12 -0700 Message-ID: <87fxmupfxj.fsf@rosslaird.info> References: <48f88165$0$40312$4fafbaef@reader5.news.tin.it> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1224311879 28945 80.91.229.12 (18 Oct 2008 06:37:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Oct 2008 06:37:59 +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 Oct 18 08:39:00 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 1Kr5Sk-00046s-6I for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Oct 2008 08:38:58 +0200 Original-Received: from localhost ([127.0.0.1]:35457 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kr5Rf-0005y8-1e for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Oct 2008 02:37:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kr5RL-0005y3-Cn for help-gnu-emacs@gnu.org; Sat, 18 Oct 2008 02:37:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kr5RJ-0005xr-QC for help-gnu-emacs@gnu.org; Sat, 18 Oct 2008 02:37:30 -0400 Original-Received: from [199.232.76.173] (port=41084 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kr5RJ-0005xo-KB for help-gnu-emacs@gnu.org; Sat, 18 Oct 2008 02:37:29 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:64409) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kr5RJ-0005zo-R0 for help-gnu-emacs@gnu.org; Sat, 18 Oct 2008 02:37:30 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kr5RH-0007Au-S4 for help-gnu-emacs@gnu.org; Sat, 18 Oct 2008 02:37:28 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Kr5RF-0005C0-0r for help-gnu-emacs@gnu.org; Sat, 18 Oct 2008 06:37:25 +0000 Original-Received: from h24-207-48-89.dlt.dccnet.com ([24.207.48.89]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 18 Oct 2008 06:37:25 +0000 Original-Received: from ross by h24-207-48-89.dlt.dccnet.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 18 Oct 2008 06:37:25 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 68 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: h24-207-48-89.dlt.dccnet.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:A+pkHYASg4rJ3/mleMen7O5XdC0= X-detected-kernel: by mx20.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:58899 Archived-At: Joubert writes: > but I don't see my abbreviations autocompleting or anything at all for > that matter. Here's what I do (this may not be the best way to do it...): I have a file called .abbrev_defs (it can be called anything). In my .emacs file, I have this: (setq-default abbrev-mode t) (read-abbrev-file "~/.abbrev_defs") I put my abbreviations in this file, eg: (define-abbrev-table 'global-abbrev-table '( ( ("recieving" "receiving" nil 1) ("occurence" "occurrence" nil 1) ("recieves" "receives" nil 1) ("downlaod" "download" nil 1) ("recieve" "receive" nil 2) ("recieved" "received" nil 1) )) You can also use various keys to add abbreviations (from the info file for autocomplete): `C-x a g' Define an abbrev, using one or more words before point as its expansion (`add-global-abbrev'). `C-x a l' Similar, but define an abbrev specific to the current major mode (`add-mode-abbrev'). `C-x a i g' Define a word in the buffer as an abbrev (`inverse-add-global-abbrev'). `C-x a i l' Define a word in the buffer as a mode-specific abbrev (`inverse-add-mode-abbrev'). And: `M-x write-abbrev-file FILE ' Write a file FILE describing all defined abbrevs. `M-x read-abbrev-file FILE ' Read the file FILE and define abbrevs as specified therein. `M-x quietly-read-abbrev-file FILE ' Similar but do not display a message about what is going on. This works well for me. Cheers. Ross -- Ross A. Laird, PhD www.rosslaird.info