From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Tomas Nordin Newsgroups: gmane.emacs.help Subject: Re: Is there a way to abort loading .el file on condition? Date: Tue, 30 Apr 2019 18:25:07 +0200 Message-ID: <87muk7qx3w.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me> References: <20190429054908.GC10317@protected.rcdrun.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="34520"; mail-complaints-to="usenet@blaine.gmane.org" To: Jean Louis , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 30 18:28:26 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 1hLVcH-0008oL-If for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Apr 2019 18:28:25 +0200 Original-Received: from localhost ([127.0.0.1]:49789 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLVcG-0003Em-Gt for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Apr 2019 12:28:24 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:32919) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLVZA-0000jc-DK for help-gnu-emacs@gnu.org; Tue, 30 Apr 2019 12:25:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hLVZ9-0002NM-6i for help-gnu-emacs@gnu.org; Tue, 30 Apr 2019 12:25:12 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:55187) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hLVZ8-0002KG-LP for help-gnu-emacs@gnu.org; Tue, 30 Apr 2019 12:25:11 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 5BE3D2400E5 for ; Tue, 30 Apr 2019 18:25:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1556641508; bh=a4UhDLNv03V3F1loUIelwtpgNWDGwCrhqpam1EVteKQ=; h=From:To:Subject:Date:From; b=EDb2AfKnojXsgJPbQqVhgZRSHIScpLeRzAURlMoAkCo9fUmd/YznmGpRwGDY1MeF+ T7p7HGohQ1t6cB/K9WLEKADXxim5Xt4X4UWRY2R7cvWXZsnd6MNCCvfDWlr2Xzx/Sk OTz2CWEBpYXjHUsczh1KQd4Hod5QariA2p2KB81gE4xqp7V/Sb1A/GRBm/TW6RY9di Nl0d0hNm0VY08SMR2pF+vbEScMNcLu2a/FERymnIkl3E2tiI1SmCgVheapPp59XpxJ SBQ5y0Wj3O18GtYJN30xuM+mBdbgy+N1gCAYuv3s3IxLd8846AGb+2IGrz1kMK6jEP qOd4xtcELnvOg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 44tn1b4JYCz9rxH; Tue, 30 Apr 2019 18:25:07 +0200 (CEST) In-Reply-To: <20190429054908.GC10317@protected.rcdrun.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 185.67.36.66 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:120113 Archived-At: 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? Best regards -- Tomas