[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Queestion concerning lists - was: [babel][PATCHES] ob-R patches
From: |
Eric Schulte |
Subject: |
Re: [O] Queestion concerning lists - was: [babel][PATCHES] ob-R patches for review |
Date: |
Mon, 12 May 2014 09:23:59 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) |
>
> I am working on it, but I have a question concerning strings and lists
> in elisp.
>
> In the function org-babel-execute:R it says:
>
> ,----
> | (inside
> | (list (org-babel-expand-body:R body params graphics-file)))
> `----
>
> I now want to convert "inside" to a comma separated string. I am doing
> now the following:
>
> ,----
> | (replace-regexp-in-string "\n" ", " (format "%s" inside))
> `----
>
> but this does not look elegant to me, as I am converting inside to a
> string and then do a replace. There is the function mapconcat, but I
> don't get it to work:
>
> ,----
> | (replace-regexp-in-string "\n" ", " (format "%s" inside))
> | "( createOrgVariablesEnvironment(), plot(1))"
> |
> | (mapconcat 'identity inside ", ")
> | " createOrgVariablesEnvironment()
> | plot(1)"
> `----
>
> What am I missing?
>
The following should work.
(mapconcat #'identity inside ", ")
If that doesn't give the expected result, maybe share an example value
of inside, with the expected results.
Best,
Eric
>
> Thanks,
>
> Rainer
>
>>
>> As it needs to be sourced for each R process once, the right place would
>> be in org-babel-R-initiate-session - correct?
>>
>> What would be the best place to put these R files?
>>
>>> One lesson I've certainly learned from the Org-mode mailing list is
>>> that you can't anticipate all of the ways that your code will be used,
>>> so up-front customizability generally pays off.
>>
>> OK - point taken - and I am definitely one of those users who thinks
>> about unusual usages of certain features.
>>
>> Cheers,
>>
>> Rainer
>>
>>>
>>> Thanks,
>>> Eric
>>>
>>>>
>>>> Thanks
>>>>
>>>> Rainer
--
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D
- Re: [O] [babel][PATCHES] ob-R patches for review, (continued)
Re: [O] [babel][PATCHES] ob-R patches for review, Rainer M Krug, 2014/05/08
- Re: [O] [babel][PATCHES] ob-R patches for review, Bastien, 2014/05/09
- Re: [O] [babel][PATCHES] ob-R patches for review, Rainer M Krug, 2014/05/09
- Re: [O] [babel][PATCHES] ob-R patches for review, Eric Schulte, 2014/05/09
- Re: [O] [babel][PATCHES] ob-R patches for review, Rainer M Krug, 2014/05/12
- Re: [O] [babel][PATCHES] ob-R patches for review, Suvayu Ali, 2014/05/12
- Re: [O] [babel][PATCHES] ob-R patches for review, Rainer M Krug, 2014/05/12
[O] Queestion concerning lists - was: [babel][PATCHES] ob-R patches for review, Rainer M Krug, 2014/05/12
Re: [O] Queestion concerning lists - was: [babel][PATCHES] ob-R patches for review,
Eric Schulte <=
Re: [O] [babel][PATCHES] ob-R patches for review, Eric Schulte, 2014/05/12
Re: [O] [babel][PATCHES] ob-R patches for review, Rainer M Krug, 2014/05/12
Re: [O] [babel][PATCHES] ob-R patches for review, Charles C. Berry, 2014/05/12
Message not availableRe: [O] [babel][PATCHES] ob-R patches for review, Charles C. Berry, 2014/05/16