【问题标题】:How to change the language of a result of ":results output code" in emacs org-mode如何在emacs org-mode中更改“:results输出代码”结果的语言
【发布时间】:2021-06-22 14:39:07
【问题描述】:

我有一个 org 文件,其中包含这样的块:

#+BEGIN_SRC sh :exports results :results output code
sed -n '9,36 p' ./code/convert.c
#+END_SRC

BEGIN_SRC 上的C-c C-c 会给我以下结果:

#+RESULTS:
#+begin_src sh
 // here is some C code
#+end_src

如何更改 ":results output code" 结果的语言,以便我可以得到这样的输出:

#+RESULTS:
#+begin_src C
 // here is some C code
#+end_src

【问题讨论】:

    标签: emacs org-mode org-babel


    【解决方案1】:
    #+BEGIN_SRC sh :exports results :results output code :wrap SRC C
    sed -n '9,36 p' ./code/convert.c
    #+END_SRC
    

    #+BEGIN_SRC#+END_SRCSRC:wrap XXX 替换后将是 #+BEGIN_XXX#+END_XXX

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多