From mboxrd@z Thu Jan 1 00:00:00 1970 From: stardiviner Subject: Re: [BABEL] Editing asymptote source code blocks Date: Sat, 23 Nov 2019 20:00:40 +0800 Message-ID: <87h82uu7iv.fsf@gmail.com> References: Reply-To: numbchild@gmail.com Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:34534) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iYUE2-0001XC-Bj for emacs-orgmode@gnu.org; Sat, 23 Nov 2019 07:09:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iYUE1-0007hM-7N for emacs-orgmode@gnu.org; Sat, 23 Nov 2019 07:09:18 -0500 Received: from [122.236.26.237] (port=49654 helo=dark.localdomain) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iYUE0-0007ci-NW for emacs-orgmode@gnu.org; Sat, 23 Nov 2019 07:09:17 -0500 In-reply-to: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org R C writes: > I am trying to use `org-edit-src-code` to edit an `asymptote` source code block. > By default, this editing is done in a temporary buffer. However, trying to execute the file using `asy-compile` gives an error: > file-name-sans-extension: Wrong type argument: stringp, nil > > As asy-compile works with standalone files with the asy extension, I thought that the error was because it required a buffer with an asy extension. I set the optional > parameters according to the docstring > > (defun rc/org-edit-src-code () > "Set file name for org-edit-src-code." > (interactive) > (org-edit-src-code (org-element-property :value (org-element-at-point)) "tmp.asy" )) > > and on calling this function, the editing buffer opens with the filename 'tmp.asy' and the correct source code block contents, but I still get the same error on > calling `asy-compile`. > > I would appreciate any suggestions to fix this problem. You need to use ADVICE to change the org babel generate/create template file under =/tmp/ob-*=. Make sure the generate temporary file has correct file extension "=.asy=". -- [ stardiviner ] I try to make every word tell the meaning what I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3