From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Newsgroups: gmane.emacs.help Subject: Re: loading local abbrevs Date: Thu, 29 Jun 2017 11:59:02 +0200 Message-ID: <20170629095902.GA21929@tuxteam.de> References: <20170629092135.GA3672@workstation> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1498730473 27637 195.159.176.226 (29 Jun 2017 10:01:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 29 Jun 2017 10:01:13 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 29 12:01:01 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQWFq-0006BU-OV for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Jun 2017 12:00:54 +0200 Original-Received: from localhost ([::1]:38096 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dQWFs-0002qQ-Uo for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Jun 2017 06:00:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38391) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dQWFM-0002iq-GJ for help-gnu-emacs@gnu.org; Thu, 29 Jun 2017 06:00:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dQWFH-0007Jz-Iq for help-gnu-emacs@gnu.org; Thu, 29 Jun 2017 06:00:24 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:55088 helo=tomasium.tuxteam.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dQWFH-0007EO-Cv for help-gnu-emacs@gnu.org; Thu, 29 Jun 2017 06:00:19 -0400 Original-Received: from tomas by tomasium.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1dQWE2-0005q6-ST for help-gnu-emacs@gnu.org; Thu, 29 Jun 2017 11:59:02 +0200 In-Reply-To: <20170629092135.GA3672@workstation> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 5.199.139.25 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:113598 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, Jun 29, 2017 at 11:21:35AM +0200, Héctor Lahoz wrote: > Hi. > > I'd like to load a file with local abbrevs when I edit any file in > a given directory. So I put a local variable like: > > eval: (read-abbrev-file "abbrev_defs") > > but it can't find the abbrev_defs. I think it has to do with > load-path. What can I do? I don't want to use an absolute > path because the path might be changed. `read-abbrev-file' calls on `load', which uses the variable `load-path' to decide where to look for the file. So perhaps one possibility would be to include "." (i.e. the current directory) in `load-path': I wouldn't recommend that (to be honest, I'd be a bit scared to do that, but YMMV). The other possibility would be to provide an absolute path, along the lines of (read-abbrev-file (concat default-directory "abbrev_defs")) or thereabouts. Season to taste ;-) cheers - -- t -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAllUz2YACgkQBcgs9XrR2kZlowCfSTIFAL/ZPwcjc42HV2OaK4ht nvMAn1k6WXTrgWGq60lusbUPxvqx8rey =4gkm -----END PGP SIGNATURE-----