emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Org-mode list <emacs-orgmode@gnu.org>
Subject: Re: org-babel, position and indentation of resname
Date: Tue, 22 Sep 2009 19:57:59 -0600	[thread overview]
Message-ID: <m2ljk6pgld.fsf@gmail.com> (raw)
In-Reply-To: 87k4zqg9a7.fsf@gmail.com

[-- Attachment #1: Type: text/plain, Size: 592 bytes --]

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Hello,
>
> I would like to put all my asymptote code in the header of the org file,
> and then, display the result later. I tried to move #+resname: but it is
> recreated just beneath the corresponding code at each export. I tried to
> use #+srcname: without success either. 
>

Ah!

You have found a bug in the existing code.  The mechanism for replacing
results was overly complex and I have now cleaned it up somewhat.  After
grabbing the latest version of Org-mode the attached file insert the
asymptote results in the appropriate place.


[-- Attachment #2: resname.org --]
[-- Type: text/plain, Size: 625 bytes --]

* demonstrating use of =#+srcname:= with =#+resname:=

#+srcname: circles
#+begin_src asymptote :file circles.png
  import graph;
  
  size(0,4cm);
  
  real f(real t) {return cos(t);}
  
  path g=polargraph(f,0,2pi,operator ..)--cycle;
  filldraw(g,pink);
  
  for(int i=0; i < 8; ++i) {
    real j = 0.125 + 0.125*i;
    real h(real t) {return j;};
    path k=polargraph(h, -(acos(j)), acos(j), operator ..);
    draw(k,blue);
  }
  
  xaxis("$x$",above=true);
  yaxis("$y$",above=true);
  
  dot("$(pi,0)$",(1,0),N);
#+end_src

** a sub-header
sub-stuff

** another sub-header

and finally the results

#+resname: circles

[-- Attachment #3: Type: text/plain, Size: 585 bytes --]



>
> Is it possible to achieve this ? If I can't put #+resname: anywhere but
> beneath the block, is it possible to get the #+resname: and the name of
> the file indented like the corresponding block ?
>

I believe that in the current setup the block can be indented
but #+resname: lines can _not_ be indented.

Best -- Eric

>
> Regards,
>
> --
> Nicolas Goaziou
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

[-- Attachment #4: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

      reply	other threads:[~2009-09-23  2:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-22 17:48 org-babel, position and indentation of resname Nicolas Goaziou
2009-09-23  1:57 ` Eric Schulte [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2ljk6pgld.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).