[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Noweb: Same function, two string results differ one with double-quot

From: Grant Rettke
Subject: [O] Noweb: Same function, two string results differ one with double-quotes the other without
Date: Fri, 11 Sep 2015 20:41:14 -0500

Good evening,

I am studying Noweb-Ref usage. I set up this example:

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

| HELLO, YOU. | string | "HELLO, WORLD." | string |

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

#+RESULTS: ucase

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

#+RESULTS: emacs-lisp-data
"Hello, world."
;; ✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂

Then I executed each source block.

I was expecting as a result of the first source block to be a list
containing 4 items: double-quoted string, symbol,
double-quoted-string, symbol. Instead what I got was the first string
was not double quoted and the second was. Why doesn't the first value
have double quotes and the third value does have them? The scalar
values return the string and output with double quotes in the last two
source blocks.

Here is how I set up this ECM.

Emacs version: "GNU Emacs 24.4.1 (x86_64-apple-darwin13.4.0, NS
apple-appkit-1265.21)\n of 2015-03-16 on orion"

Org-Mode: "8.3.1" from Git at commit 8c85c990521cc833df9179894f6f8b2934d2231a

Updated autoloads.

I use a ECM startup file to start emacs and org mode for ECMS like this:

=open /Applications/Emacs.app --args --quick --load
~/src/help/.org-mode-ecm.emacs.el= which contains

;; ✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂
;; -*- lexical-binding: t -*-
(setq load-prefer-newer t)
(add-to-list 'load-path "~/src/org-mode/lisp")
(add-to-list 'load-path "~/src/org-mode/contrib/lisp")
(setq org-list-allow-alphabetical t)
(setq org-enforce-todo-checkbox-dependencies t)
(require 'org)
;; ✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂

reply via email to

[Prev in Thread] Current Thread [Next in Thread]