From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: Is there a way to abort loading .el file on condition? Date: Fri, 03 May 2019 04:07:44 +0200 Message-ID: <86tvece1e7.fsf@zoho.eu> 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 Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="22213"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 03 04:08:10 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 1hMNcP-0005bZ-VD for geh-help-gnu-emacs@m.gmane.org; Fri, 03 May 2019 04:08:10 +0200 Original-Received: from localhost ([127.0.0.1]:33017 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMNcO-0007uC-PF for geh-help-gnu-emacs@m.gmane.org; Thu, 02 May 2019 22:08:08 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51054) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMNc9-0007u2-Ur for help-gnu-emacs@gnu.org; Thu, 02 May 2019 22:07:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMNc8-0005WZ-Tm for help-gnu-emacs@gnu.org; Thu, 02 May 2019 22:07:53 -0400 Original-Received: from [195.159.176.226] (port=41508 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hMNc8-0005Tv-Kx for help-gnu-emacs@gnu.org; Thu, 02 May 2019 22:07:52 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hMNc6-00056e-IG for help-gnu-emacs@gnu.org; Fri, 03 May 2019 04:07:50 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Mail-Copies-To: never Cancel-Lock: sha1:HhiS0/iExbRdhBy6ot9YT5NQKFc= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 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:120148 Archived-At: Tomas Nordin wrote: > 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? Yes, have it all empty but for an `if' clause to go to either file A or file B depending on version. Then put all other configuration/extensions in neat files (a, b, c ... n) In A, put A-specific stuff _only_ and then load (a ... n) explicitly at your discretion. In B, do the same, only have the B-specific stuff there, as you understand of course. Simple in theory and simple to setup in practice! To deal with it in the long run when you do changes to (a ... n) - perhaps not so simple neither in theory nor practice... :( -- underground experts united http://user.it.uu.se/~embe8573