help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Elisp - Store path only once


From: wael-zwaiter
Subject: Re: Elisp - Store path only once
Date: Sat, 9 Jan 2021 12:30:57 +0100

Am unsure whether I can  require on the elisp files I have written.

(require 'g-eshell)
(require 'g-utils)

Aw getting confused, as I was simply doing

(setq g-eshell
   "/home/bard/Genadm/build/gadin-1.0/elisp/g-eshell.el")

(setq g-utils
   "/home/bard/Genadm/build/gadin-1.0/elisp/g-utils.el")

(load 'g-eshell)
(load 'g-utils)

> Sent: Saturday, January 09, 2021 at 10:54 PM
> From: "Omar Polo" <op@omarpolo.com>
> To: wael-zwaiter@gmx.com
> Cc: help-gnu-emacs@gnu.org
> Subject: Re: Elisp - Store path only once
>
>
> wael-zwaiter@gmx.com writes:
>
> > I have a lot of customisation files for emacs stored in the
> > directory /home/bard/Genadm/build/gadin-1.0/elisp/.
> >
> > Would like to store the path so that I can define it only once.
> > How can I do this in Emacs Lisp.
> >
> >
> >   (setq g-eshell
> >      "/home/bard/Genadm/build/gadin-1.0/elisp/g-eshell.el")
> >
> >   (setq g-utils
> >      "/home/bard/Genadm/build/gadin-1.0/elisp/g-utils.el")
>
> Couldn't you just
>
>     (add-to-list 'load-path "/home/bard/Genadm/build/gadin-1.0/elisp")
>
> and then
>
>     (require 'g-eshell)
>     (require 'g-utils)
>
> when needed?
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]