all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Linefeeds (\n) to stdout
@ 2013-10-07 20:24 Thorsten Jolitz
  2013-10-10  9:42 ` Thorsten Jolitz
  0 siblings, 1 reply; 4+ messages in thread
From: Thorsten Jolitz @ 2013-10-07 20:24 UTC (permalink / raw)
  To: help-gnu-emacs


Hi List,

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

Another problem I face is that sending a parse-tree containing strings with
only a linefeed (printed with '(print-escape-newlines t)')

#+begin_src emacs-lisp
#(\"\\n\" 0 1 (:parent #3))
#+end_src

to another Lisp (that only knows about "^J", not about "\n") via
stdout/stdin results, after the other Lisp's reader did its work, into
something like 

#+begin_src picolisp
(\# ("n" 0 1 (:parent \#3)))
#+end_src

[ignore the # stuff, but note that the linefeed was read as "n" string].

Now I wonder:

 - what does Emacs sends to stdout when it sends a linefeed? I use
   `prin1-to-string' and then `buffer-substring-no-properties' to produce the
   string I send from Emacs.
 - why are there differences between standalone Emacs and Emacsclient?

--
cheers,
Thorsten




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-10-10 17:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-07 20:24 Linefeeds (\n) to stdout Thorsten Jolitz
2013-10-10  9:42 ` Thorsten Jolitz
2013-10-10 11:49   ` Stefan Monnier
2013-10-10 17:17     ` Thorsten Jolitz

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.