From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: A bit more feedback on org-publish-all Date: Mon, 06 Feb 2012 10:27:53 -0500 Message-ID: <24223.1328542073@alphaville> References: <87ty351gl6.fsf@iro.umontreal.ca> <871uq821ez.fsf@iro.umontreal.ca> <17364.1328499519@alphaville> <87ipjkau4c.fsf@iro.umontreal.ca> 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]:53635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuQU8-00068S-Kr for emacs-orgmode@gnu.org; Mon, 06 Feb 2012 10:28:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RuQU1-0006jo-Qb for emacs-orgmode@gnu.org; Mon, 06 Feb 2012 10:28:04 -0500 Received: from g5t0007.atlanta.hp.com ([15.192.0.44]:29038) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuQU1-0006jO-N1 for emacs-orgmode@gnu.org; Mon, 06 Feb 2012 10:27:57 -0500 In-Reply-To: Message from pinard@iro.umontreal.ca (=?us-ascii?Q?=3D=3Futf-?= =?us-ascii?Q?8=3FQ=3FFran=3DC3=3DA7ois=3F=3D?= Pinard) of "Mon\, 06 Feb 2012 09\:56\:03 EST." <87ipjkau4c.fsf@iro.umontreal.ca> 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: =?us-ascii?Q?=3D=3Futf-8=3FQ=3FFran=3DC3=3DA7?= =?us-ascii?Q?ois=3F=3D?= Pinard Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org Fran=C3=A7ois Pinard wrote: > ...=20 > This is more similar to my actual usage, which really is: >=20 > [...] > write =3D sys.stderr.write > for line in os.popen('emacs 2>&1 -batch' > ' -l ~/fp/notes/publish.el' > ' -f org-publish-all'): > write(repr(line) + '\n') > sys.stderr.flush() > [...] >=20 > The write(...) and the flush() are only there for debugging: I wanted to > see if the lines are delivered timely or not (and I'm seemingly getting > the Emacs output in one blow). I just do not understand why the > behavior differs between the "... | cat" line and the Python excerpt. > I'm surely missing something somewhere... Sigh! >=20 I would recommend that you chuck the obsolete os.popen() permanently and learn the subprocess module: you will be much happier. Setting bufsize=3D0 (which is the default) should give you unbuffered output from the process. Nick