emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: [PATCH] ob-coq cleanup
Date: Wed, 10 Feb 2016 09:41:24 +0100	[thread overview]
Message-ID: <m2k2mdarez.fsf@charm-ecran.irisa.fr> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 51 bytes --]

Hello,

Here is a small patch cleaning up ob-coq.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-ox-coq.el-Clean-up.patch --]
[-- Type: text/x-patch, Size: 1477 bytes --]

From 4d3a37fbc078541bebb9bef73e6d81e85a95e048 Mon Sep 17 00:00:00 2001
From: Alan Schmitt <alan.schmitt@polytechnique.org>
Date: Wed, 10 Feb 2016 09:34:37 +0100
Subject: [PATCH] ox-coq.el: Clean up

* lisp/ob-coq.el: Create a variable `coq-program-name' and remove unused
  `org-babel-coq-eoe'.

  (org-babel-coq-initiate-session): use `coq-program-name'
---
 lisp/ob-coq.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/ob-coq.el b/lisp/ob-coq.el
index 4339a52..7aea5a6 100644
--- a/lisp/ob-coq.el
+++ b/lisp/ob-coq.el
@@ -35,11 +35,12 @@
 (declare-function run-coq "ext:coq-inferior.el" (cmd))
 (declare-function coq-proc "ext:coq-inferior.el" ())
 
+(defvar coq-program-name "coqtop"
+  "Name of the coq toplevel to run.")
+
 (defvar org-babel-coq-buffer "*coq*"
   "Buffer in which to evaluate coq code blocks.")
 
-(defvar org-babel-coq-eoe "org-babel-coq-eoe")
-
 (defun org-babel-coq-clean-prompt (string)
   (if (string-match "^[^[:space:]]+ < " string)
       (substring string 0 (match-beginning 0))
@@ -70,7 +71,7 @@ If there is not a current inferior-process-buffer in SESSION then
 create one.  Return the initialized session."
   (unless (fboundp 'run-coq)
     (error "`run-coq' not defined, load coq-inferior.el"))
-  (save-window-excursion (run-coq "coqtop"))
+  (save-window-excursion (run-coq coq-program-name))
   (sit-for 0.1)
   (get-buffer org-babel-coq-buffer))
 
-- 
2.7.0


[-- Attachment #1.3: Type: text/plain, Size: 121 bytes --]


Best,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂ (2016-01, Mauna Loa Obs.): 402.52

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

             reply	other threads:[~2016-02-10  8:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-10  8:41 Alan Schmitt [this message]
2016-02-10 12:13 ` [PATCH] ob-coq cleanup Nicolas Goaziou
2016-02-11  7:55   ` Alan Schmitt

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=m2k2mdarez.fsf@charm-ecran.irisa.fr \
    --to=alan.schmitt@polytechnique.org \
    --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).