From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/16127 Path: news.gmane.org!not-for-mail From: wgreenhouse-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org (W. Greenhouse) Newsgroups: gmane.emacs.gnus.user Subject: Re: gnus-agent-fetch in batch mode in a cron job Date: Fri, 22 Feb 2013 06:32:12 +0000 Message-ID: <87621koo43.fsf@riseup.net> References: <87liarooj7.fsf@free.fr> <878v6jszx6.fsf@riseup.net> <87r4k8lvyr.fsf@free.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2207005349132792553==" X-Trace: ger.gmane.org 1361514759 24275 80.91.229.3 (22 Feb 2013 06:32:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Feb 2013 06:32:39 +0000 (UTC) To: info-gnus-english-mXXj517/zsQ@public.gmane.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org-mXXj517/zsQ@public.gmane.org Fri Feb 22 07:33:02 2013 Return-path: Envelope-to: gegu-info-gnus-english@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 1U8mBo-0001K9-BM for gegu-info-gnus-english@m.gmane.org; Fri, 22 Feb 2013 07:33:00 +0100 Original-Received: from localhost ([::1]:41489 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8mBU-0000f3-0F for gegu-info-gnus-english@m.gmane.org; Fri, 22 Feb 2013 01:32:40 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:54062) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8mBP-0000et-TF for info-gnus-english-mXXj517/zsQ@public.gmane.org; Fri, 22 Feb 2013 01:32:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U8mBM-0004Cs-Or for info-gnus-english-mXXj517/zsQ@public.gmane.org; Fri, 22 Feb 2013 01:32:35 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:37759) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8mBM-0004Ci-Hx for info-gnus-english-mXXj517/zsQ@public.gmane.org; Fri, 22 Feb 2013 01:32:32 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1U8mBe-0001Ch-6v for info-gnus-english-mXXj517/zsQ@public.gmane.org; Fri, 22 Feb 2013 07:32:50 +0100 Original-Received: from torrouter.ucar.edu ([192.43.244.42]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 Feb 2013 07:32:50 +0100 Original-Received: from wgreenhouse by torrouter.ucar.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 Feb 2013 07:32:50 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 72 Original-X-Complaints-To: usenet-dbVV3NMTNubNLxjTenLetw@public.gmane.org X-Gmane-NNTP-Posting-Host: torrouter.ucar.edu X-Archive: encrypt User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) Cancel-Lock: sha1:OktNBaSLCbSYljwlovpsdVBgOhE= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: info-gnus-english-mXXj517/zsQ@public.gmane.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org-mXXj517/zsQ@public.gmane.org Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org-mXXj517/zsQ@public.gmane.org Xref: news.gmane.org gmane.emacs.gnus.user:16127 Archived-At: --===============2207005349132792553== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Julien, Julien Cubizolles writes: > From what I understand Emacs outputs the whole *Messages* buffer to > stdout. So there is nothing the shell can do to sort error messages from > information messages. Is that right=C2=A0? Hrm, you're not quite correct, but I'm not sure it actually matters. From=20(info "(emacs) Initial Options"): > `-batch' > `--batch' > Run Emacs in "batch mode". Batch mode is used for running > programs written in Emacs Lisp from shell scripts, makefiles, and > so on. To invoke a Lisp program, use the `-batch' option in > conjunction with one or more of `-l', `-f' or `--eval' (*note > Action Arguments::). *Note Command Example::, for an example. > In batch mode, Emacs does not display the text being edited, and > the standard terminal interrupt characters such as `C-z' and `C-c' > have their usual effect. Emacs functions that normally print a > message in the echo area will print to either the standard output > stream (`stdout') or the standard error stream (`stderr') instead. > (To be precise, functions like `prin1', `princ' and `print' print > to `stdout', while `message' and `error' print to `stderr'.) > Functions that normally read keyboard input from the minibuffer > take their input from the terminal's standard input stream > (`stdin') instead. etc. So which file descriptor emacs --batch sends printed output to does actually depend on the function being called. And looking at the source of gnus-agent, it does look like functions like `signal' and `error' are consistently used as they should be, for actual network errors--which is good. However, `message' is also used frequently, e.g. for the "Checking new news..." in `gnus-group-check-new-news.' So it's not guaranteed that stderr will only contain errors. So, you might actually be better off either redirecting all output to /dev/null (as the example in (info "(gnus) Batching Agents") does), or else redirect to a log file. =2D- Regards, WGG --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBAgAGBQJRJxDtAAoJEC6LG3QNLT+e0woQANyJDuUHz+lTKxbQkwPgqcUg gKyugRQErky5qd1s2TyyCzcbDyVU8zo5Lq39MMvgEkcgx0BS0s/ZIzp51eEjHdK/ Tx0zqvQlHIlXcT+HOn2Pd3z6P1sayF5JOEq7jTnxEVYEEEKawAfNyIix8Wd2OXMX dzWmF3TUA+Mlv6Zr7Ox/uksgMGxKvKwx3t2Df9hCc/QbxR29kYBN3AoWK7HavA/g 6O3ELRNhj+uUQpdtSGsHHDUK/scVGbQIHtKjC+zw+ys7PvVTgt4wfRdBnnhjd/n/ 4uWLW2bYiUEVmFrUGPwu8ggovTD28vujKFsWxZggkwCKBvl4aWW1/ee3hNFc7LIw eBkErXgik96iQT9cWQ3sNzgkbLT31Xz7qf1sm3hhfwKqVzNgF8rZD24eMx/fP5e4 rUpXvZTRvs7SDtT5OpTVk40qWmV8Zal0xWT2uZCftVmPZcJhZ8ViK/O6gWrCep2W Gel27mobfzh7eAtooBW4yF1R+qHxCX6RrkGZYGqnB5BUMutWUndA9gVWxbDi7JbN 9aDQVNy1WogUeMeezh8wz6m/K2L+/ruHJZ6DWGt47gM4xhg/P1qlXU7KmQl1H9hu Hvw7JKiwarvj7yd4hFxdww3sovRQDf+ngyT/ebPx+xgjfFsa0tbfHrLdsMxKeIDb FoNLNyq89cI+lMq4Bdn6 =2VB5 -----END PGP SIGNATURE----- --=-=-=-- --===============2207005349132792553== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ info-gnus-english mailing list info-gnus-english-mXXj517/zsQ@public.gmane.org https://lists.gnu.org/mailman/listinfo/info-gnus-english --===============2207005349132792553==--