From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.help Subject: Re: Is there a way to abort loading .el file on condition? Date: Sun, 12 May 2019 06:06:48 +0200 Organization: GOLDIVANTI GOLD LIMITED Message-ID: <20190512040648.GK8819@protected.rcdrun.com> References: <20190429054908.GC10317@protected.rcdrun.com> <87muk7qx3w.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="44617"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: help-gnu-emacs@gnu.org To: Tomas Nordin Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun May 12 06:07:39 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hPfly-000BUR-Cv for geh-help-gnu-emacs@m.gmane.org; Sun, 12 May 2019 06:07:38 +0200 Original-Received: from localhost ([127.0.0.1]:38391 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hPflx-0006d5-Cb for geh-help-gnu-emacs@m.gmane.org; Sun, 12 May 2019 00:07:37 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:43073) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hPflm-0006cy-Sg for help-gnu-emacs@gnu.org; Sun, 12 May 2019 00:07:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hPfll-0004Py-Rn for help-gnu-emacs@gnu.org; Sun, 12 May 2019 00:07:26 -0400 Original-Received: from stw1.rcdrun.com ([217.170.207.13]:34611) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hPflj-0004C9-QF for help-gnu-emacs@gnu.org; Sun, 12 May 2019 00:07:25 -0400 Original-Received: from protected.rcdrun.com ([::ffff:31.223.149.211]) (AUTH: PLAIN admin, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA; Sat, 11 May 2019 21:06:50 -0700 id 0000000000020871.000000005CD79BDA.00006B37 Original-Received: from localhost (localhost [127.0.0.1]) (uid 1001) by protected.rcdrun.com with local id 00000000000C91C9.000000005CD79BD8.000030C2; Sun, 12 May 2019 06:06:48 +0200 Content-Disposition: inline In-Reply-To: <87muk7qx3w.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.170.207.13 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:120309 Archived-At: * Tomas Nordin [2019-04-30 18:25]: > Jean Louis writes: > > > Hello, > > > > I would like to abort loading the .el file, the > > ~/.emacs file on the condition, in particular, I > > have two versions of GNU Emacs, the standard one > > 25.3.1 which I would not like to read the .emacs > > file and the one which I use for work, which > > should read the ~/.emacs file. > > > > Is there a way that a condition is inserted on top > > of the ~/.emacs file so that based on the version > > information the file loading gets aborted? > > There is "non-local exits", but it is supposed to be used in relation to > errors and wouldn't maybe feel right in this case. > > What about having your .emacs basically empty with only a conditional > load of a .emacs-work.el or .emacs-gnu.el file based on the version of > Emacs reading the .emacs file? That is good idea, thank you.