From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Handling errors in command line exporting of agenda? Date: Mon, 08 Aug 2011 16:37:38 -0400 Message-ID: <4691.1312835858@alphaville.americas.hpqcorp.net> References: Reply-To: nicholas.dokos@hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:42518) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqWaq-0002Pi-G9 for emacs-orgmode@gnu.org; Mon, 08 Aug 2011 16:38:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QqWap-0008JZ-7W for emacs-orgmode@gnu.org; Mon, 08 Aug 2011 16:38:36 -0400 Received: from g4t0017.houston.hp.com ([15.201.24.20]:42042) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqWap-0008JS-04 for emacs-orgmode@gnu.org; Mon, 08 Aug 2011 16:38:35 -0400 In-Reply-To: Message from John Hendy of "Mon\, 08 Aug 2011 14\:48\:44 CDT." 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: John Hendy Cc: emacs-orgmode , nicholas.dokos@hp.com John Hendy wrote: > On Mon, Aug 8, 2011 at 1:59 PM, suvayu ali = wrote: > > Hi John, > > > > On Mon, Aug 8, 2011 at 8:53 PM, John Hendy wrote: > >>> If you can use wildcards to specify your files, it might be possible = by > >>> just one extra call to --eval. Something like this might work: > >>> > >>> emacs --batch -l ~/.emacs --eval '(find-file-read-only "" t= )' \ > >>> =C2=A0 =C2=A0 =C2=A0--eval '(org-batch-agenda "w")' > ~/org/aux/agend= a-export.txt > >>> > >> > >> Hmm. That might work. Everything I pull from is in ~/org... could the > >> wildcard simply be "~/*.org"? Forgive my emacs wildcard ignorance. > > > > As far as I know, emacs accepts any wildcard that is valid in the shell. > > Since all your files are in ~/org, I would say try "~/org/*.org". The > > '~/org/' limits it to files within your org directory and the '*.org'[1] > > limits it to all files with a .org extension. Not true - if you want wildcards expanded, you have to do it yourself. E.g. C-h f file-expand-wildcards ,---- | file-expand-wildcards is a compiled Lisp function in `files.el'. |=20 | (file-expand-wildcards PATTERN &optional FULL) |=20 | Expand wildcard pattern PATTERN. | This returns a list of file names which match the pattern. |=20 | If PATTERN is written as an absolute file name, | the values are absolute also. |=20 | If PATTERN is written as a relative file name, it is interpreted | relative to the current default directory, `default-directory'. | The file names returned are normally also relative to the current | default directory. However, if FULL is non-nil, they are absolute. `---- Nick > > >=20 > Bummer, this is not working: >=20 > ,--- > | emacs -batch -l ~/.emacs -eval '(find-file-read-only "~/org/*.org" t)' \ > | -eval '(org-batch-agenda "e")' > ~/org/aux/agenda-export.txt > `--- >=20 > Do you see anything wrong with that? I guess I wonder what that first > part will do as perhaps the org-batch-agenda command is not > necessarily going to follow suit with the read-only command. As in, > does the first eval command affect anything that the org-batch-agenda > command is going to do? Is it trying to do the equivalent of opening > up all *.org files in read-only buffers and then run the agenda > export? >=20 >=20 > Thanks, > John > > I hope this helps. :) > > > > Footnotes: > > > > [1] The asterisk (*) stands for zero or more characters. You can find > > =C2=A0 =C2=A0more details in `man bash` under the heading "Pattern Matc= hing". > > > > -- > > Suvayu > > > > Open source is the future. It sets us free. > > >=20