From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: wael-zwaiter@gmx.com Newsgroups: gmane.emacs.help Subject: Re: Elisp - Store path only once Date: Sat, 9 Jan 2021 12:30:57 +0100 Message-ID: References: <87a6tie5yv.fsf@omarpolo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9376"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Omar Polo Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 09 12:31:57 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kyCTN-0002Kd-Pn for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 09 Jan 2021 12:31:57 +0100 Original-Received: from localhost ([::1]:33946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kyCTM-0006is-SM for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 09 Jan 2021 06:31:56 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyCT2-0006il-12 for help-gnu-emacs@gnu.org; Sat, 09 Jan 2021 06:31:36 -0500 Original-Received: from mout.gmx.net ([212.227.15.15]:52619) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyCSz-00062V-JB for help-gnu-emacs@gnu.org; Sat, 09 Jan 2021 06:31:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1610191857; bh=g4AlMNH+lKOja/avzke1okK98jOzEuUpbe8D2l0ivaY=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=lKijvJQs7thKcnRyYfCB1uP/5jcWmPv89Q0xZqDcwB2YRkmXkYg6ZxLnv5HP91H7n +JZ3XHDieNk7GfeaX/GdPyEM2ekUQAIxGuqu4kzOzCuTgjhrvuND8AS5OgQ0wBxMv6 bmIUXL0LNd9m/YFzcFmiDtgtwE8OczZ4KLqou0lY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs15.server.lan [172.19.170.183]) (via HTTP); Sat, 9 Jan 2021 12:30:57 +0100 Importance: normal Sensitivity: Normal In-Reply-To: <87a6tie5yv.fsf@omarpolo.com> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:sU6I96Bi4JzhN8zaZLPTeeEYDCOMGoJRMzaRgsVkBLlmFxtbrrhy9uU5HcS+bEXmFqMlG 2bRGlvnrYVc4T7NMZQewvEALDo3gI5IyCC06rry/jltsetJbn/CDxNvVE8UCzbEnt8YkEgava2AL UMuqMHIt4XIAaiNit3sW5G6wEBjo+O4irHdFV4gMtHKekT0Kys1eAAqwZaGmDRPDklpr4VB0lyuS HTdg3dmkeSMHXiNjqS1Zsc9wvNw/DF6U5j0YtZZRGxzb5Swb1tMA5MABcwXkcky2Sd7cmWmXui/m Dg= X-UI-Out-Filterresults: notjunk:1;V03:K0:EwAL4ym1/8U=:sA070wrLZGhav4qLRnBymY XsXkqhwPFIryXJeMq2g0pusXWB8n+0ID7lXVq+ZbFYeHB3kfFyudAQKtX6rFXgTLOw7Kc1LY9 SGpxPEL4JJCbIrgKC8oM5jUYpVYINPIFFT7wwqrcLXXdX3XI7Poc36PAhaneya2pMCuBiJGha iTL7PbT93T0Z4h+/LdphW5w5fEXzi5izyxU7TMucf8wx51o7etQVelT4QXTFdyjkkEcVXJKsq MyYmxkOYecjybwmdMR2LbCrthZST6GW9nAm1b6QijSPqCZVGdTFP0tMpCQkVfc+qCZ0tI8Qox XuTN5e686KQt6EuXL2vmpbzBrM6U13r7c7KEcVfX5zeCkqmX5ILtzBUz4dKLXTz7IK3c8SUU7 P+Hwj8Q1hKBd8ywdak5np3oxGkCGNtqfN+LCAr76DL0ow+j5ZeyhDU5stjFlKzTDnSjV6kfn2 Zoa86ToiaaCdv3l4w3uIKeJd9S+vnfLYKQxbWwmtnQI4kLEM1d57HpaqDE9hwkiDe/4/bzVlQ iLfjcmIwj1F01Cmr+g5bVg8VtzF+Tcdv/EecPhH9mM4tlEqF2hStvEBEFSM+1pIubz40eiFbM xSrSxwjLc4vOg= Received-SPF: pass client-ip=212.227.15.15; envelope-from=wael-zwaiter@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:127125 Archived-At: 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" > 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? > >