From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: Limiting init loading when running --batch Date: Wed, 4 Mar 2015 20:00:31 -0800 (PST) Message-ID: <44d850c0-fe05-4c7d-b50e-5baa68e45181@default> References: <87pp8okti4.fsf@gmail.com> <7d55f9f3-8c16-49f4-b55c-8c0c75d4a59e@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1425528065 7429 80.91.229.3 (5 Mar 2015 04:01:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Mar 2015 04:01:05 +0000 (UTC) To: torys.anderson@gmail.com, Emacs Help List Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 05 05:00:54 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YTMxx-0003Hl-IP for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Mar 2015 05:00:53 +0100 Original-Received: from localhost ([::1]:48011 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTMxw-0002K3-Sy for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Mar 2015 23:00:52 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47214) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTMxl-0002Jn-8S for help-gnu-emacs@gnu.org; Wed, 04 Mar 2015 23:00:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YTMxh-0008MH-RO for help-gnu-emacs@gnu.org; Wed, 04 Mar 2015 23:00:41 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:22797) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTMxh-0008MB-J7 for help-gnu-emacs@gnu.org; Wed, 04 Mar 2015 23:00:37 -0500 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t2540Vo5030175 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 5 Mar 2015 04:00:32 GMT Original-Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t2540Vbl025595 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 5 Mar 2015 04:00:31 GMT Original-Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id t2540VIR010497; Thu, 5 Mar 2015 04:00:31 GMT In-Reply-To: <7d55f9f3-8c16-49f4-b55c-8c0c75d4a59e@default> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:103028 Archived-At: > > I use --batch as part of a shell script to export my orgmode agenda as = an > > ICS file and upload it to a server where it is read by Google Calendar. > But > > when I run batch, it loads my entire emacs (most of which is not necess= ary > > for this operation) and sometimes chokes on lines that are apparently > > incompatible. Is there a way to avoid loading the whole init file, or t= o > > prepend lines with something that would except them from batch runs? >=20 > You can test the variable `noninteractive' in your init file, and > load or invoke code conditionally, depending on the value. http://www.gnu.org/software/emacs/manual/html_node/elisp/Batch-Mode.html Which you can find by using `i' in the Elisp manual and typing `batch TAB'.