From: Mike Mattie <codermattie@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: multiple load-paths?
Date: Wed, 5 Dec 2007 01:58:13 -0800 [thread overview]
Message-ID: <20071205015813.37b00664@reforged> (raw)
In-Reply-To: <yoijmyt3wrwk.fsf@remote1.student.chalmers.se>
[-- Attachment #1.1: Type: text/plain, Size: 1546 bytes --]
On Sat, 24 Nov 2007 17:05:15 +0100
bojohan+news@dd.chalmers.se (Johan Bockgård) wrote:
> someusernamehere <someusernamehere@gmail.com> writes:
>
> > (setq load-path (cons (expand-file-name "~/lisp") load-path))
> > (setq load-path (cons (expand-file-name "~/repos") load-path))
> > (setq load-path (cons (expand-file-name "~/testing") load-path))
> > (setq load-path (cons (expand-file-name "~/elisp") load-path))
> >
> > there is a way to do this more "posh" ?, I mean may be in one line o
> > something similar?
>
> I'd prefer
>
> (add-to-list 'load-path "~/lisp")
> (add-to-list 'load-path "~/repos")
> (add-to-list 'load-path "~/testing")
> (add-to-list 'load-path "~/elisp")
>
> (add-to-list is shorter and avoids adding duplicates to load-path if
> .emacs is reloaded. expand-file-name shouldn't be necessary)
>
> You could use a loop, but having one line per entry is more
> grep-friendly.
>
this is my flavor. The version above is superior in that it filters dups, but I don't see that
as a serious problem for small cases.
(setq load-path
(append
;; overide distributed elisp with local modifications by
;; inserting a "local" directory at the beginning of the
;; load list
(cons localized-source-dir load-path)
;; add the extras to the end of the list.
(list extras-source-dir)
))
in this version anything you want to override emacs goes in localized-source-dir, while anything that is an add-on
can simply go in the list at the end.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
next prev parent reply other threads:[~2007-12-05 9:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-24 15:30 multiple load-paths? someusernamehere
2007-11-24 15:57 ` Juanma Barranquero
2007-11-24 16:05 ` Johan Bockgård
2007-12-05 9:58 ` Mike Mattie [this message]
2007-12-05 10:57 ` Sebastian Tennant
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=20071205015813.37b00664@reforged \
--to=codermattie@gmail.com \
--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).