* Working with =src= blocks :results header argument
@ 2010-12-05 20:51 Chris Malone
2010-12-05 23:23 ` Eric Schulte
0 siblings, 1 reply; 2+ messages in thread
From: Chris Malone @ 2010-12-05 20:51 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 815 bytes --]
Hi,
I've been looking through the manual to get more familiar with Babel and
using source code in general. Below is a simple example, which I'm not sure
is working as intended.
#+tblname:
example-table
| 1 | a
|
| 2 | b
|
| 3 | c
|
| 4 | d
|
#+begin_src emacs-lisp :var data=example-table[-3,1] :results value raw
data
#+end_src
Upon =C-c C-c= this produces the expected result:
#+results:
b
=C-c C-c= /again/, however, results in:
#+results:
b
b
In other words, the default results handling of =replace= appears to not
work with a =raw= results type. I tried explicitly adding the handling via
a =:results value raw replace= header argument but again this didn't seem to
fix things.
Is this what is intended for the =raw= type of results - no replacement
effect at all - or is this a bug?
Chris
[-- Attachment #1.2: Type: text/html, Size: 1643 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Working with =src= blocks :results header argument
2010-12-05 20:51 Working with =src= blocks :results header argument Chris Malone
@ 2010-12-05 23:23 ` Eric Schulte
0 siblings, 0 replies; 2+ messages in thread
From: Eric Schulte @ 2010-12-05 23:23 UTC (permalink / raw)
To: Chris Malone; +Cc: emacs-orgmode
Hi Chris,
This is the expected behavior for the raw results type. This is because
there is no way to know where raw results begin or end so it wouldn't be
safe to remove them from the Org-mode file. Take the following example.
#+begin_src emacs-lisp :results raw
"* just another heading
It probably wouldn't be wise to remove this text.
- is it the product of a code block or not?
- how would it be possible to tell programatically?"
#+end_src
Best -- Eric
Chris Malone <chris.m.malone@gmail.com> writes:
> Hi,
>
> I've been looking through the manual to get more familiar with Babel and
> using source code in general. Below is a simple example, which I'm not sure
> is working as intended.
>
> #+tblname:
> example-table
> | 1 | a
> |
> | 2 | b
> |
> | 3 | c
> |
> | 4 | d
> |
>
>
> #+begin_src emacs-lisp :var data=example-table[-3,1] :results value raw
>
> data
>
> #+end_src
>
>
> Upon =C-c C-c= this produces the expected result:
>
> #+results:
>
> b
>
> =C-c C-c= /again/, however, results in:
>
> #+results:
>
> b
>
> b
>
> In other words, the default results handling of =replace= appears to not
> work with a =raw= results type. I tried explicitly adding the handling via
> a =:results value raw replace= header argument but again this didn't seem to
> fix things.
>
> Is this what is intended for the =raw= type of results - no replacement
> effect at all - or is this a bug?
>
> Chris
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-12-05 23:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-05 20:51 Working with =src= blocks :results header argument Chris Malone
2010-12-05 23:23 ` Eric Schulte
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).