Closed PeterMosmans closed 6 years ago
Hmmm, strange. Can you execute troubleshooting.org
and paste the contents here, or in a gist? That will help us rule out some sort of version inconsistency in Emacs/org-mode between the parent and child Emacs processes.
Hi @astahlman thanks for troubleshooting (so far :wink:) - see https://gist.github.com/PeterMosmans/7736f1d004942dd116c1ff342654ab73 (I think that will include the relevant parts, let me know if you want me to post more)
Interesting. Did you try turning on async debugging? (The section right after the output you posted.)
Let's also try eliminating org-babel
from the equation - what does this print to your *Messages*
buffer?
(require 'async)
(async-start
`(lambda () "Test string\r\nI'm on a Windows-style newline\nI'm on a Unix-style newline")
`(lambda (result) (message "%s" result)))
Yeah, I tried all steps in troubleshooting.org
.
Results from your steps:
async
#<process emacs>
Test string
I'm on a Windows-style newline
I'm on a Unix-style newline
..and with debug on...
t
Transmitting sexp {{{'(lambda nil "Test string
\nI'm on a Windows-style newline\nI'm on a Unix-style newline")
}}}
I believe this is a result of the way the emacs-async
library handles encoding of the messages passed between the parent and child Emacs processes. See details in https://github.com/jwiegley/emacs-async/issues/93.
The upstream (potential) fix is merged - can you try upgrading to the latest version of async (20180103.2312) and see if the problem persists?
Superb @astahlman , it works like a charm. Thank you so much for your time and your tenacity, much appreciated :thumbsup:
..and of course a happy 2018, that all of your goals will be attained :wink:
Peter
Excellent, glad it's working for you!
Hi,
I use ob-asycn, great package: thanks! I'm using Emacs 27.0.50 (git) on Windows x64. When using
:async
, the output shows^M
(carriage return / line feed) after each output line. Without:async
, the output is correct (no carriage returns, just line feeds)Example with
:async
:Note that the
^M
character is replaced here by two blank lines: Emacs shows^M
in the Org mode file.Example without
:async
:Cheers,
Peter