From mboxrd@z Thu Jan 1 00:00:00 1970 From: stardiviner Subject: Re: Is it possible to add a :results type for ob-shell to interpret it's some special characters? Date: Sat, 24 Mar 2018 23:42:04 +0800 Message-ID: References: <80a60d0c-4aa0-3220-0506-c42a27c722e6@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------9CCCB4084AE23D555A16AA59" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54481) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ezlK8-0002XD-27 for emacs-orgmode@gnu.org; Sat, 24 Mar 2018 11:44:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ezlJ4-0005to-6F for emacs-orgmode@gnu.org; Sat, 24 Mar 2018 11:43:16 -0400 Received: from mail-pg0-x22e.google.com ([2607:f8b0:400e:c05::22e]:42625) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ezlJ3-0005t0-Rb for emacs-orgmode@gnu.org; Sat, 24 Mar 2018 11:42:10 -0400 Received: by mail-pg0-x22e.google.com with SMTP id f10so5517203pgs.9 for ; Sat, 24 Mar 2018 08:42:09 -0700 (PDT) Received: from [0.0.0.0] ([119.28.89.243]) by smtp.gmail.com with ESMTPSA id e8sm20106934pfd.116.2018.03.24.08.42.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Mar 2018 08:42:07 -0700 (PDT) In-Reply-To: <80a60d0c-4aa0-3220-0506-c42a27c722e6@gmail.com> Content-Language: en-US List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: org-mode This is a multi-part message in MIME format. --------------9CCCB4084AE23D555A16AA59 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit I found new possible solution: comint-based modes like shell-mode use functions in hook. Like - ansi-color-process-output And I found similar project "xterm-color": https://github.com/atomontage/xterm-color I can't implement it on Org-moderesult processing. But someone might be interested this and can take a try. Thanks. On 03/24/2018 09:14 AM, stardiviner wrote: > > When I have following src block > > #+begin_src shell :dir /sudo:: > sudo pacman -S --noconfirm lilypond > #+end_src > > It will display result literately. include "^M". > > I wish org-mode (or ob-shell) can add a result type like `:results > term` (maybe other name) to replace those "^M" etc special characters > and might convert some shell color highlight special sequences like > [[45 similar things. > --------------9CCCB4084AE23D555A16AA59 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit

I found new possible solution:

comint-based modes like shell-mode use functions in hook.

Like

- ansi-color-process-output

And I found similar project "xterm-color":

https://github.com/atomontage/xterm-color

I can't implement it on Org-mode result processing.

But someone might be interested this and can take a try. Thanks.


On 03/24/2018 09:14 AM, stardiviner wrote:

When I have following src block

#+begin_src shell :dir /sudo::
sudo pacman -S --noconfirm lilypond
#+end_src

It will display result literately. include "^M".

I wish org-mode (or ob-shell) can add a result type like `:results term` (maybe other name) to replace those "^M" etc special characters and might convert some shell color highlight special sequences like [[45 similar things.


--------------9CCCB4084AE23D555A16AA59--