From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Omar Polo Newsgroups: gmane.emacs.help Subject: Re: Elisp - Store path only once Date: Sat, 09 Jan 2021 11:54:00 +0100 Message-ID: <87a6tie5yv.fsf@omarpolo.com> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11197"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.4.13; emacs 28.0.50 Cc: help-gnu-emacs@gnu.org To: wael-zwaiter@gmx.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 09 11:54:34 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 1kyBtC-0002aT-3R for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 09 Jan 2021 11:54:34 +0100 Original-Received: from localhost ([::1]:57512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kyBtB-0000vk-6T for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 09 Jan 2021 05:54:33 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33972) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyBsr-0000va-UP for help-gnu-emacs@gnu.org; Sat, 09 Jan 2021 05:54:13 -0500 Original-Received: from mail.omarpolo.com ([144.91.116.244]:55492) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyBso-0005Cd-A5 for help-gnu-emacs@gnu.org; Sat, 09 Jan 2021 05:54:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=omarpolo.com; s=20200327; t=1610189646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MhM8tz6kL8xko1woRGkTJA+4NEutFXgCxtKmQafM0bY=; b=qGpsvprWYnLs1ZYVNtqFGnC3GVzPDpGYx+BipYX6x4D3YRmmdS0CM0ZsNNtbz5Nsw/7KEI 7uf9mj75ewQqKbmbPpwrfLYQPlBY4ieNCLtAkOJdf9G06W3GmB3XTwIO5AJoTtY/FJRq3/ vuEzxxVhk7cUM7iYylcJLMAO+Renpqg= Original-Received: from localhost (host-80-116-112-105.retail.telecomitalia.it [80.116.112.105]) by mail.omarpolo.com (OpenSMTPD) with ESMTPSA id 7919d0b9 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 9 Jan 2021 11:54:06 +0100 (CET) Original-Received: from venera (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id bda0a653; Sat, 9 Jan 2021 11:54:00 +0100 (CET) In-reply-to: Received-SPF: pass client-ip=144.91.116.244; envelope-from=op@omarpolo.com; helo=mail.omarpolo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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:127124 Archived-At: 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?