From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.help Subject: Re: Is there a way to abort loading .el file on condition? Date: Tue, 30 Apr 2019 12:51:08 -0400 Message-ID: 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" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="39026"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Help Gnu Emacs mailing list , Jean Louis To: Tomas Nordin Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 30 19:19:58 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 1hLWQ9-000A1D-Q8 for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Apr 2019 19:19:57 +0200 Original-Received: from localhost ([127.0.0.1]:50551 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLWQ8-00078U-KU for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Apr 2019 13:19:56 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLW2M-00048d-2a for help-gnu-emacs@gnu.org; Tue, 30 Apr 2019 12:55:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hLVyS-0007pm-6h for help-gnu-emacs@gnu.org; Tue, 30 Apr 2019 12:51:21 -0400 Original-Received: from mail-oi1-x22c.google.com ([2607:f8b0:4864:20::22c]:34930) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hLVyS-0007pC-1i for help-gnu-emacs@gnu.org; Tue, 30 Apr 2019 12:51:20 -0400 Original-Received: by mail-oi1-x22c.google.com with SMTP id w197so11834425oia.2 for ; Tue, 30 Apr 2019 09:51:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OBLkZji4fWbCMxdnEZBF1x7k56mNEwPP4HMomtv4X1I=; b=W8NLio/QC7bG5jcWEmYPR7ZvKyYzjmNGaltLIWHeQ1kPEcinyyBXzAmzYSih5bpvfR dgrO5IykwnwdjoGYOoL02gmikPs82bhwt3z4WkISepT6oOhTvW9m6P6JDs0ss2Pl9tkY Wc/nQ/05+dG8GDH/xoDvonclc6MYaEGiaRhzX1WyenTgSKfi20pzGI4qhxOUDOGWu1FF cxnYtBAmTGhNwfh6GQBKVMyAY+jP/mi3ELyI8IMRhLfFusjTVO3hrfh/qVhPUV0Q8B5Q 9unEjPCT4lHHz4WMvPwg06F8R4o/p0w9ZjPoCFEwPLwLJ/mw1gKPari+g/Wdl++5/Rnx BvUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OBLkZji4fWbCMxdnEZBF1x7k56mNEwPP4HMomtv4X1I=; b=NcUIz83qwWPuMF52hf1ByVluRDbABkaBPDSxjbQ6FSF5HyQVCBqzf9bUpRDENskycQ g+mO7i8KyZetG+85cInUEtXOi8WcVOKzsdFCHf1Fv+M1dW/ilPzG6SLhjOYi0b7CYd5z 7FRajzIOUt5tNrH3bYDUEJZhziiB5INizN6MIoo9kJpeFG0pl19igtmZloyxfaJizx13 Dw/b6yS/5uCQvXNMG+DgqWtVLtGjzz7ANZtDS8wAdpXKbSt8uB7rrYIbfrt7ssun3DdL nQ+1xIxQmyDSlBZrFfdQAgj37/IWzsrQxWEsEQbSw28fS8xBpwqht6617Gjp+RRcocIV eAKg== X-Gm-Message-State: APjAAAV2cIQAol5wM5H/8NhrK75CMXIZVii+by93qQzix8aEikGJeYK2 BWfnEONEOt4AJZYfTe0M7XVp48I/sYYyRZuzcA0= X-Google-Smtp-Source: APXvYqx+Tcfo4ZLnOd4QE4IhEZBuH/d6mU/ZD+CNo4izxQ8YUSTWIqKx8EKTLFawo7cBv2TUZ+0fpi6KP/zddaOY0yg= X-Received: by 2002:aca:bbc3:: with SMTP id l186mr3820322oif.23.1556643079100; Tue, 30 Apr 2019 09:51:19 -0700 (PDT) In-Reply-To: <87muk7qx3w.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::22c 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:120114 Archived-At: On Tue, 30 Apr 2019 at 12:28, Tomas Nordin wrote: > > Jean Louis writes: > > I would like to abort loading the .el file, the > > ~/.emacs file on the condition > > 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. I call keyboard-quit for this of thing (I abort when the server is already running, which usually indicates I forgot the '-Q' when trying to run 'emacs -Q'), which signals `quit' (which is not a subtype of error, so it doesn't trigger the "An error occurred while loading..." thing).