all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Babel results in other lang code
@ 2015-08-01  2:35 Satoru KURASHIKI
  2015-08-01 19:20 ` Charles C. Berry
  0 siblings, 1 reply; 3+ messages in thread
From: Satoru KURASHIKI @ 2015-08-01  2:35 UTC (permalink / raw)
  To: emacs-orgmode

hi,

I've tried to write babel extension for typescript.
cf. https://github.com/lurdan/ob-typescript

Because "results: code" forces same language in results,
it outputs transpile results enclosed with #BEGIN_SRC js #END_SRC
assuming "results: raw".

I want it to do this with more sane way (not disturbing header parameters),
are there any nice tweaks?

regards,
-- 
KURASHIKI Satoru

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

* Re: Babel results in other lang code
  2015-08-01  2:35 Babel results in other lang code Satoru KURASHIKI
@ 2015-08-01 19:20 ` Charles C. Berry
  2015-08-04 11:18   ` Satoru KURASHIKI
  0 siblings, 1 reply; 3+ messages in thread
From: Charles C. Berry @ 2015-08-01 19:20 UTC (permalink / raw)
  To: Satoru KURASHIKI; +Cc: emacs-orgmode

On Sat, 1 Aug 2015, Satoru KURASHIKI wrote:

> hi,
>
> I've tried to write babel extension for typescript.
> cf. https://github.com/lurdan/ob-typescript
>
> Because "results: code" forces same language in results,
> it outputs transpile results enclosed with #BEGIN_SRC js #END_SRC
> assuming "results: raw".
>
> I want it to do this with more sane way (not disturbing header parameters),
> are there any nice tweaks?

Not sure what you mean about 'disturbing header parameters', but using

 	:wrap src <lang>

where <lang> is the resulting language will fontify suitably.

For example, this shell script:

#+BEGIN_SRC shell :wrap src emacs-lisp
echo "(format fmt abc) ;; alphabet"
#+END_SRC

produces this result:

#+RESULTS:
#+BEGIN_src emacs-lisp
(format fmt abc) ;; alphabet
#+END_src

Perhaps, you want `org-babel-default-header-args:typescript' to include
(:wrap . "src js") and drop (:results . "raw").

HTH,

Chuck

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

* Re: Babel results in other lang code
  2015-08-01 19:20 ` Charles C. Berry
@ 2015-08-04 11:18   ` Satoru KURASHIKI
  0 siblings, 0 replies; 3+ messages in thread
From: Satoru KURASHIKI @ 2015-08-04 11:18 UTC (permalink / raw)
  To: emacs-orgmode

hi,

On Sun, Aug 2, 2015 at 4:20 AM, Charles C. Berry <ccberry@ucsd.edu> wrote:
> Not sure what you mean about 'disturbing header parameters', but using

I want this extension to avoid ocupying header area/keywords as prereq,
and leave them for user.
(For now, it presets :results raw, and user can't use other option)

... Do I make myself understood?

>
>         :wrap src <lang>
>
> where <lang> is the resulting language will fontify suitably.

Thanks, I think it had better use this way instead of introducing
special keywords!

regards,
-- 
KURASHIKI Satoru

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

end of thread, other threads:[~2015-08-04 11:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-01  2:35 Babel results in other lang code Satoru KURASHIKI
2015-08-01 19:20 ` Charles C. Berry
2015-08-04 11:18   ` Satoru KURASHIKI

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.