emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: R C <recifx@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [BABEL] Editing asymptote source code blocks
Date: Sun, 17 Nov 2019 16:50:45 -0500	[thread overview]
Message-ID: <CAD_Xbc4f3zp6m77p-Raq7X2wUjXmkj1oayB0JxkKuwrvAQYSuQ@mail.gmail.com> (raw)

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

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.

[-- Attachment #2: Type: text/html, Size: 1017 bytes --]

             reply	other threads:[~2019-11-17 21:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-17 21:50 R C [this message]
2019-11-23 12:00 ` [BABEL] Editing asymptote source code blocks stardiviner

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=CAD_Xbc4f3zp6m77p-Raq7X2wUjXmkj1oayB0JxkKuwrvAQYSuQ@mail.gmail.com \
    --to=recifx@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).