[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Limiting init loading when running --batch
From: |
Drew Adams |
Subject: |
RE: Limiting init loading when running --batch |
Date: |
Wed, 4 Mar 2015 19:59:05 -0800 (PST) |
> 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 necessary
> 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.