From: <tomas@tuxteam.de>
To: help-gnu-emacs@gnu.org
Subject: Re: loading local abbrevs
Date: Thu, 29 Jun 2017 11:59:02 +0200 [thread overview]
Message-ID: <20170629095902.GA21929@tuxteam.de> (raw)
In-Reply-To: <20170629092135.GA3672@workstation>
-----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-----
next prev parent reply other threads:[~2017-06-29 9:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-29 9:21 loading local abbrevs Héctor Lahoz
2017-06-29 9:59 ` tomas [this message]
2017-06-29 10:31 ` Héctor Lahoz
2017-06-29 13:26 ` Stefan Monnier
2017-06-29 15:20 ` tomas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170629095902.GA21929@tuxteam.de \
--to=tomas@tuxteam.de \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).