From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: How to get to work non-interactive publishing? Date: Sat, 19 May 2012 18:38:37 -0400 Message-ID: <87pq9zbxua.fsf@gmx.com> References: <005401cd349f$a4382600$eca87200$@us> <87r4uhk7df.fsf@gmx.com> <4FB8373D.2030305@gmx.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56421) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVuAi-0005Sw-Kb for emacs-orgmode@gnu.org; Sat, 19 May 2012 20:38:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SVuAg-0008Tm-9j for emacs-orgmode@gnu.org; Sat, 19 May 2012 20:38:56 -0400 Received: from mailout-us.gmx.com ([74.208.5.67]:50868) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SVuAg-0008Tg-3H for emacs-orgmode@gnu.org; Sat, 19 May 2012 20:38:54 -0400 In-Reply-To: <4FB8373D.2030305@gmx.us> (Mikhail Titov's message of "Sat, 19 May 2012 19:13:49 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Mikhail Titov Cc: emacs-orgmode@gnu.org Mikhail Titov writes: > On 05/18/2012 07:19 AM, Eric Schulte wrote: >>> I can publish project if I don=E2=80=99t use =E2=80=93-batch . So the f= ollowing works >>> just fine: emacs -nw --eval '(org-publish-project "myproj")' >>> >>> However nothing happens if I try emacs --batch --eval '(org-publish-pro= ject "myproj")' >>> >>> Does anybody have an idea how to pin point the problem? It just >>> returns almost instantaneously with no output to stderr. >>> >>> I do use ESS, and I have lots of R code some of which is intentionally >>> non-cached. I=E2=80=99m running GNU Emacs 24.1.50.2 (revno: 108254) with >>> default orgmode if it makes any difference. >> Using batch mode shouldn't be causing any problems with the export >> process, is it possible that something in your personal config is not >> compatible with batch-mode? I have a number of projects in which I >> export using a batch Emacs process (generally from a make file). My >> Makefile rules tend to look like the following. >> >> EMACS=3Demacs >> BATCH_EMACS=3D$(EMACS) --batch -Q -l init.el document.org >> >> ... >> >> document.tex: document.org init.el >> $(BATCH_EMACS) -f org-export-as-latex >> >> where init.el contains all of the init necessary for the particular >> project. For a complete working example see the replication materials >> at http://www.jstatsoft.org/v46/i03. > I really did not want to create a separate init file as I was quite > happy with existing dot emacs. You are right. Something was in the way. > After I created a separate file that loads only necessary stuff, it > published fine. > Happy it works, if you find the offending element of your persona configuration you could remove it and continue to use your personal config for batch publishing. > > So weird emacs did not give any error before that something is not > quite right. Is there an option for emacs so that some module can say > it can't work in a batch mode? > I don't believe that there is an automated way to raise such warnings. You could do a binary search through your init. > > I mean what is the point to make a separate init file other than > speed? > Your main init file is used to customize Emacs for interactive editing, many (if not most) of these settings won't apply to batch evaluation. By separating your personal customization from the project init file used for publishing it becomes possible to distribute your project with the publication init file without sharing your personal configuration. Best, > > M. > --=20 Eric Schulte http://cs.unm.edu/~eschulte