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 19:59:05 -0800 (PST) Message-ID: <7d55f9f3-8c16-49f4-b55c-8c0c75d4a59e@default> References: <87pp8okti4.fsf@gmail.com> 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 1425527979 6042 80.91.229.3 (5 Mar 2015 03:59:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Mar 2015 03:59:39 +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 04:59:26 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 1YTMwY-0002AI-1t for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Mar 2015 04:59:26 +0100 Original-Received: from localhost ([::1]:48003 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTMwX-0001g8-65 for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Mar 2015 22:59:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTMwL-0001g3-Ch for help-gnu-emacs@gnu.org; Wed, 04 Mar 2015 22:59:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YTMwI-0007m6-42 for help-gnu-emacs@gnu.org; Wed, 04 Mar 2015 22:59:13 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:46312) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTMwH-0007m2-Tt for help-gnu-emacs@gnu.org; Wed, 04 Mar 2015 22:59:10 -0500 Original-Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t253x77w019970 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 5 Mar 2015 03:59:08 GMT Original-Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id t253x6Yc002050 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 5 Mar 2015 03:59:07 GMT Original-Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by userz7022.oracle.com (8.14.5+Sun/8.14.4) with ESMTP id t253x6fo009646; Thu, 5 Mar 2015 03:59:06 GMT In-Reply-To: <87pp8okti4.fsf@gmail.com> 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: ucsinet21.oracle.com [156.151.31.93] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 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:103027 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. B= ut > when I run batch, it loads my entire emacs (most of which is not necessar= y > for this operation) and sometimes chokes on lines that are apparently > incompatible. Is there a way to avoid loading the whole init file, or to > prepend lines with something that would except them from batch runs? You can test the variable `noninteractive' in your init file, and load or invoke code conditionally, depending on the value.