From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Jolitz Newsgroups: gmane.emacs.help Subject: Re: Linefeeds (\n) to stdout Date: Thu, 10 Oct 2013 19:17:50 +0200 Message-ID: <87mwmhkptt.fsf@gmail.com> References: <87y564q176.fsf@gmail.com> <87y561lawm.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1381425510 14598 80.91.229.3 (10 Oct 2013 17:18:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Oct 2013 17:18:30 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 10 19:18:33 2013 Return-path: Envelope-to: geh-help-gnu-emacs@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 1VUJse-00029l-VE for geh-help-gnu-emacs@m.gmane.org; Thu, 10 Oct 2013 19:18:33 +0200 Original-Received: from localhost ([::1]:49477 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUJse-0006pQ-HS for geh-help-gnu-emacs@m.gmane.org; Thu, 10 Oct 2013 13:18:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36244) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUJsO-0006pA-Nu for help-gnu-emacs@gnu.org; Thu, 10 Oct 2013 13:18:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VUJsF-00033W-5l for help-gnu-emacs@gnu.org; Thu, 10 Oct 2013 13:18:16 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:46844) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUJsE-00033I-VH for help-gnu-emacs@gnu.org; Thu, 10 Oct 2013 13:18:07 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VUJsD-0001qS-6U for help-gnu-emacs@gnu.org; Thu, 10 Oct 2013 19:18:05 +0200 Original-Received: from g231107059.adsl.alicedsl.de ([92.231.107.59]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 10 Oct 2013 19:18:05 +0200 Original-Received: from tjolitz by g231107059.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 10 Oct 2013 19:18:05 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 38 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: g231107059.adsl.alicedsl.de User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:99qIgZrNdXtiFKT1fo7IzMTEgTg= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:93923 Archived-At: Stefan Monnier writes: >> I would call that at least strange behaviour, if not a bug. > > M-x report-emacs-bug I can file a bug-report later, but currently I would rather need to know what is the matter with emacsclient? And find some kind of work-around pretty soon ... I output the html produced by Emacs with `princ', and with standalone Emacs, this is received by the calling program as expected - \n are actual line-breaks, \" are printed as " (unquoted) etc. But with emacsclient, \n are printed verbatim, just like the \" etc. Furthermore, the whole html string send by Emacs is printed enclosed in double-quotes. And there are some random underscores in the text parts of the html page, but I'm not sure if this only happens with emacsclient. To me it seems 'the right thing' to do ,--------------------------------------------- | (princ (function-that-returns-a-string ...)) `--------------------------------------------- and since emacsclient isn't really a brandnew feature, I wonder if nobody witnessed the same problem before? The guys who wrote 'org-protocol.el' obviously dealt with this problem, but on the Emacs side, when processing input from another application. I hacked together some code on the calling PicoLisp-program side that post-processes the html-string received from Emacs (via emacsclient) - but is this really the only way to deal with this problem? -- cheers, Thorsten