From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Writing to STDOUT from elisp Date: Thu, 10 Jul 2014 18:03:53 +0300 Message-ID: <83vbr5b6hy.fsf@gnu.org> References: <83mwcjdhp8.fsf@gnu.org> <871ttvu6kx.fsf@uwakimon.sk.tsukuba.ac.jp> <87oawzfzi0.fsf@igel.home> <83zjgiaq3i.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1405004676 26824 80.91.229.3 (10 Jul 2014 15:04:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Jul 2014 15:04:36 +0000 (UTC) Cc: schwab@suse.de, stephen@xemacs.org, mathias.dahl@gmail.com, emacs-devel@gnu.org To: Craig Muth Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 10 17:04:29 2014 Return-path: Envelope-to: ged-emacs-devel@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 1X5FtS-0001YC-S8 for ged-emacs-devel@m.gmane.org; Thu, 10 Jul 2014 17:04:18 +0200 Original-Received: from localhost ([::1]:38452 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5FtS-0005NZ-EX for ged-emacs-devel@m.gmane.org; Thu, 10 Jul 2014 11:04:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5FtJ-0005MD-Fn for emacs-devel@gnu.org; Thu, 10 Jul 2014 11:04:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X5FtC-0004fw-5V for emacs-devel@gnu.org; Thu, 10 Jul 2014 11:04:09 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:40170) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5FtB-0004fS-Su for emacs-devel@gnu.org; Thu, 10 Jul 2014 11:04:02 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0N8I0030041Z2F00@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Thu, 10 Jul 2014 18:04:00 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N8I003P24IE1630@a-mtaout23.012.net.il>; Thu, 10 Jul 2014 18:03:51 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.175 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:172933 Archived-At: > Date: Wed, 9 Jul 2014 22:40:09 -0700 > From: Craig Muth > Cc: Andreas Schwab , "Stephen J. Turnbull" , emacs-devel@gnu.org, > Mathias Dahl > > > If you want to do this in an interactive session > > Yes, in an interactive session. > > > please tell what > > exactly are you trying to do and why. For example, is this only > > needed when you exit Emacs > > Doing it when exiting emacs would work. Then one way of doing this is call kill-emacs with a non-nil argument, then wrap Emacs in a shell script that would do whatever you want depending on the Emacs exit code. Of course, submitting (trivial) patches for adding a command to write to stdout would probably be welcome as well. But please note that sometimes Emacs is invoked with stdout redirected to some obscure file, or even with stdout being closed/invalid.