all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thorsten Jolitz <tjolitz@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Linefeeds (\n) to stdout
Date: Thu, 10 Oct 2013 11:42:33 +0200	[thread overview]
Message-ID: <87y561lawm.fsf@gmail.com> (raw)
In-Reply-To: 87y564q176.fsf@gmail.com

Thorsten Jolitz <tjolitz@gmail.com> writes:


> I'm trying to figure out some strange issues I have with linefeeds:
>
>  1. with standalone Emacs
>
> #+begin_src sh
>       $ emacs -Q -e ...
> #+end_src
>
>     sending an Org-mode text from another program Emacs and receiving
>     the HTML produced by Org-mode's exporter (stdout and stdin) works
>     fine.

>  2. doing exactly the same thing with emacs server/client
>
> #+begin_src sh
>       $ emacsclient -e ...
> #+end_src
>
>     results in HTML cluttered with \n that are printed verbatim in the
>     webpage


Just for the record: after much research I found out that apparently

,-----------------------------------------------------
| "emacsclient compresses double and tripple slashes."
`-----------------------------------------------------

so its no wonder that calling emacs from another program to do some
html-exporting results in something like this

,-------------------------------------------------------------------------
| <div id="outline-container-sec-1" class="outline-2">
| <h2 id="sec-1"><span class="section-number-2">1</span> NEXT
| A1&#xa0;&#xa0;&#xa0;<span class="tag"><span
| class="home">home</span>&#xa0;<span class="iorg">iorg</span></span></h2>
| <div class="outline-text-2" id="text-1">
| <p>
| B1
| </p>
| </div>
|
| <div id="outline-container-sec-1-1" class="outline-3">
| <h3 id="sec-1-1"><span class="section-number-3">1.1</span> <span
| class="todo TODO">TODO</span> B1&#xa0;&#xa0;&#xa0;<span
| class="tag"><span class="ARCHIVED">ARCHIVED</span></span></h3>
| <div class="outline-text-3" id="text-1-1">
| <p>
| Text B1
| </p>
| </div>
| </div>
`-------------------------------------------------------------------------

when emacs is called standalone

#+begin_src sh
  $ emacs -Q -e ...
#+end_src

and something like this

,----------------------------------------------------------------------
| "\n<div id=\"outline-container-sec-1\" class=\"outline-2\">\n<h2
| id=\"sec-1\"><span class=\"section-number-2\">1</span> NEXT
| A1&#xa0;&#xa0;&#xa0;<span class=\"tag\"><span
| class=\"home\">home</span>&#xa0;<span
| class=\"iorg\">iorg</span></span></h2>\n<div class=\"outline-text-2\"
| id=\"text-1\">\n<p>\nB1\n</p>\n</div>\n\n<div
| id=\"outline-container-sec-1-1\" class=\"outline-3\">\n<h3
| id=\"sec-1-1\"><span class=\"section-number-3\">1.1</span> <span
| class=\"todo TODO\">TODO</span> B1&#xa0;&#xa0;&#xa0;<span
| class=\"tag\"><span
| class=\"ARCHIVED\">ARCHIVED</span></span></h3>\n<div
| class=\"outline-text-3\" id=\"text-1-1\">\n<p>\nText
| B1\n</p>\n</div>\n</div>
`----------------------------------------------------------------------

when exactly the same html-exporting functionality is called via

#+begin_src sh
   $ emacsclient -e ...
#+end_src

I would call that at least strange behaviour, if not a bug.

--
cheers,
Thorsten




  reply	other threads:[~2013-10-10  9:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-07 20:24 Linefeeds (\n) to stdout Thorsten Jolitz
2013-10-10  9:42 ` Thorsten Jolitz [this message]
2013-10-10 11:49   ` Stefan Monnier
2013-10-10 17:17     ` Thorsten Jolitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y561lawm.fsf@gmail.com \
    --to=tjolitz@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.