All Projects → hasu → emacs-ob-racket

hasu / emacs-ob-racket

Licence: GPL-3.0 license
Emacs Org-Mode Babel code block Racket support

Programming Languages

emacs lisp
2029 projects
racket
414 projects
Makefile
30231 projects

Projects that are alternatives of or similar to emacs-ob-racket

Braindump
knowledge repository managed with org-mode and org-roam.
Stars: ✭ 184 (+736.36%)
Mutual labels:  org-mode
Doct
DOCT: Declarative Org Capture Templates for Emacs
Stars: ✭ 210 (+854.55%)
Mutual labels:  org-mode
org-preview-html
Automatically preview org-exported HTML files within Emacs.
Stars: ✭ 160 (+627.27%)
Mutual labels:  org-mode
Orger
Tool to convert data into searchable and interactive org-mode views
Stars: ✭ 192 (+772.73%)
Mutual labels:  org-mode
Verb
Organize and send HTTP requests from Emacs
Stars: ✭ 205 (+831.82%)
Mutual labels:  org-mode
Emacs Easy Hugo
Emacs major mode for managing hugo
Stars: ✭ 235 (+968.18%)
Mutual labels:  org-mode
Go Org
Org mode parser with html & pretty printed org rendering. also shitty static site generator.
Stars: ✭ 177 (+704.55%)
Mutual labels:  org-mode
dotfiles
I showed you my source code, pls respond
Stars: ✭ 45 (+104.55%)
Mutual labels:  org-mode
Org Cliplink
Insert org-mode links from clipboard
Stars: ✭ 207 (+840.91%)
Mutual labels:  org-mode
ox-leanpub
Org-mode exporter for Leanpub books - mirrored from GitLab
Stars: ✭ 18 (-18.18%)
Mutual labels:  org-mode
Grasp
A reliable org-capture browser extension for Chrome/Firefox
Stars: ✭ 193 (+777.27%)
Mutual labels:  org-mode
Toc Org
toc-org is an Emacs utility to have an up-to-date table of contents in the org files without exporting (useful primarily for readme files on GitHub)
Stars: ✭ 202 (+818.18%)
Mutual labels:  org-mode
Evil Org Mode
Supplemental evil-mode keybindings to emacs org-mode
Stars: ✭ 241 (+995.45%)
Mutual labels:  org-mode
Ob Http
make http request within org-mode babel
Stars: ✭ 191 (+768.18%)
Mutual labels:  org-mode
trio
Datatype agnostic triple store & query engine API
Stars: ✭ 78 (+254.55%)
Mutual labels:  org-mode
Org Books
Reading list management with org mode
Stars: ✭ 186 (+745.45%)
Mutual labels:  org-mode
Spongedown
Markdown with svg bob support
Stars: ✭ 234 (+963.64%)
Mutual labels:  org-mode
dotfiles
My dotfiles - Emacs centric OSX Big Sur
Stars: ✭ 29 (+31.82%)
Mutual labels:  org-mode
org-recent-headings
Go to recently used Org headings
Stars: ✭ 47 (+113.64%)
Mutual labels:  org-mode
Ob Async
Asynchronous src_block execution for org-babel
Stars: ✭ 249 (+1031.82%)
Mutual labels:  org-mode

An Emacs feature that defines support for Org-Mode Babel code blocks written in Racket.

Includes support for many of the usual Org SRC block header arguments (with the notable exception of :session), as well as some extras for controlling the way that code blocks are evaluated. The additional controls are perhaps more important for Racket than for most other languages, since Racket is not just one language. Rather, Racket is an open-ended, user-extensible collection of languages (including, e.g., Racket, Scribble, Slideshow, Redex, and Magnolisp), which may not always be evaluated in the Racket VM in the usual way of just invoking the racket executable.

Pre-Requisites

To use ob-racket, first ensure that Org-Mode is installed in Emacs, as it probably is. For a richer editing experience you may also want to ensure that a major mode (such as racket-mode) has been configured for editing racket code blocks in Org.

If your mode for editing Racket code is not called racket-mode, you’ll want to specify the mode to use with something like:

(add-to-list 'org-src-lang-modes '("racket" . geiser))

Installation

Firstly, you may want to byte compile the “ob-racket.el” file, for example by invoking the byte-compile-file function under Emacs.

Then make sure the ob-racket feature is on Emacs’ load-path so that it can be loaded on demand:

(add-to-list 'load-path "/my/path/to/emacs-ob-racket")

Furthermore, you should enable racket code for evaluation (e.g., upon invoking org-babel-execute-src-block, by default bound to C-c C-c under Org) by making available the *:racket definitions of the ob-racket feature. One way to do that is to simply require the feature, but Org can also be made to load ob-racket by having the customizable org-babel-load-languages variable include racket. Programmatically, something like this should do the trick:

(org-babel-do-load-languages
 'org-babel-load-languages
 '((emacs-lisp . t)
   (racket . t)
   ;;(scribble . t) ;; if Scribble support is available
   ))

Code evaluation may still require confirmation, depending on the value of the org-confirm-babel-evaluate variable, which is customizable, and may also be set file locally.

Some ob-racket functionality relies on a Racket module for converting Racket values to Emacs Lisp ones, and it can be worthwhile to byte-compile that module:

raco make ob-racket-runtime.rkt

Installation with straight.el

The cloning, byte-compilation, loading, and configuration can all be done declaratively with straight.el, use-package, and the included ob-racket-raco-make-runtime-library function:

(use-package ob-racket
  :after org
  :config
  (add-hook 'ob-racket-pre-runtime-library-load-hook
	      #'ob-racket-raco-make-runtime-library)
  :straight (ob-racket
	       :type git :host github :repo "hasu/emacs-ob-racket"
	       :files ("*.el" "*.rkt")))

Documentation

There is no separate documentation for ob-racket, so look at the source code, and the Emacs Lisp docstrings of the functions and variables appearing there. You will probably also find the relevant Org documentation useful:

(progn
  (info-display-manual "org")
  (Info-goto-node "Working With Source Code"))
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].