[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Linefeeds (\n) to stdout
From: |
Thorsten Jolitz |
Subject: |
Re: Linefeeds (\n) to stdout |
Date: |
Thu, 10 Oct 2013 11:42:33 +0200 |
User-agent: |
Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.3 (gnu/linux) |
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   <span class="tag"><span
| class="home">home</span> <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   <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   <span class=\"tag\"><span
| class=\"home\">home</span> <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   <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