From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: org-babel, src blocks and asymptote Date: Wed, 16 Sep 2009 11:01:32 -0600 Message-ID: References: <87ocpboxxp.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MnxtQ-0002ZT-Fl for emacs-orgmode@gnu.org; Wed, 16 Sep 2009 13:02:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MnxtM-0002VC-Qr for emacs-orgmode@gnu.org; Wed, 16 Sep 2009 13:02:08 -0400 Received: from [199.232.76.173] (port=57244 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MnxtM-0002Ux-J9 for emacs-orgmode@gnu.org; Wed, 16 Sep 2009 13:02:04 -0400 Received: from mail-px0-f198.google.com ([209.85.216.198]:44073) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MnxtL-0001Rs-Vx for emacs-orgmode@gnu.org; Wed, 16 Sep 2009 13:02:04 -0400 Received: by pxi36 with SMTP id 36so4094306pxi.6 for ; Wed, 16 Sep 2009 10:02:02 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org-mode list Hi Nicolas, Nicolas Goaziou writes: > Hello, > > Org-babel looks very interesting. I am pleased to see an asymptote > module included in it. While testing it, I think I found 2 problems : > > > To activate the asymptote module, you have to begin the source block, > for example, with > #+begin_src asymptote :file bezier.pdf > > Unfortunately, the major mode used to edit asymptote code is named > asy-mode. This leads to the following error when you edit the block > with C-c ' : no such language mode: asymptote-mode. > > Perhaps that module should be named org-babel-asy ? > Thanks for the catch, I'm now mentioning asy-mode in the requirements of org-babel-asymptote.el, and asy-mode is now listed as the major-mode for asymptote blocks in the `org-src-lang-modes' variable. After grabbing the latest Org-mode you should be able to edit asymptote source-code blocks using C-c ' > > The second problem, related to Org Src handling, is that the code is > put in a temporary buffer. I don't know about other languages, but, > in asy-mode, you can't compile code while in that kind of buffer. > This can be quite problematic in a language oriented towards > graphics, as you need to often make previews of your work. > > In other words, is there an option to associate a temporary file to > the process (even in a per-language basis) instead of a buffer ? Or do I > have to mess with org-src-mode-hook to try to fix it ? > I don't believe that anything like this currently exists, but I agree that it would be generally useful. In the current setup the best way to preview your work would probably be to... 1) jump out of edit-src-mode C-c ' 2) re-run the source-code block from the Org-mode buffer C-c C-c Some better options which come to mind are... - use either a header argument or a language specific setting to specify that Org-edit-src should associate the src buffer with a temporary file - add a command to org-edit-src-mode which writes the buffer to a temporary file - something else... Dan has more experience than myself in dealing with Org-edit-src so he may have better ideas. I do think this is an issue that deserves further thought/discussion. Thanks -- 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