Emacsist RSS --- If never, make it ever: C-h C-h

Exploring Noweb Refs with Arguments

6680

这里 查看更多 Emacs 相关推荐文章最新 Emacs 圈的动态. 欢迎关注微信公众账号: Emacsist

I’m studying Noweb Refs. Here is something helping me make sense of it. I asked about it on-list, too, with more details. I’m still playing with it.

I didn’t understand the relationship between :wrap and :results drawer; there seems to be some overlap in some cases.

Not sure why the first column has single quotes and the 3rd result has them escaped. When the table is output in org, the result is a record without double quotes and the other with them. That is different than I expected and probably reflects my lack of understanding of what Org-Babel is doing here.

#+begin_src emacs-lisp :tangle "test.el" :results value table code replace :noweb yes
(let ((a <<ucase("hEllO, yOU.")>>)
      (b <<ucase(emacs-lisp-data)>>))
  (list a
        (type-of a)
        b
        (type-of b)))
#+end_src

#+RESULTS:
#+BEGIN_SRC emacs-lisp
| ("\"HELLO, YOU.\"" string "\"\\\"\\\\\\\"HELLO, WORLD.\\\\\\\"\\\"\"" string) |
#+END_SRC

#+name: ucase
#+begin_src emacs-lisp :var x="WeAthEr" :results value scalar code replace
(upcase x)
#+end_src

#+RESULTS: ucase
#+BEGIN_SRC emacs-lisp
"\"WEATHER\""
#+END_SRC

#+name: emacs-lisp-data
#+begin_src emacs-lisp :results value scalar code replace
"Hello, world."
#+end_src

#+RESULTS: emacs-lisp-data
#+BEGIN_SRC emacs-lisp
"\"Hello, world.\""
#+END_SRC
原文出处: Grant Rettke
原文地址: http://www.wisdomandwonder.com/article/10002/exploring-noweb-refs-with-arguments
原文时间: 2015-09-13 01:30
本文地址: http://emacsist.com/10452
整理时间: 2015-09-15 01:03

本文由 Hick 整理,转载请保留以上信息;
COPYLEFTThe articles on this site come from Internet, thanks to all the original authors.
      If anything about COPYRIGHT, or LEFT, please contact Emacsist at gmail dot com .