From 234fbc545b7d5b389a4ed0ff2503fabce6dc968c Mon Sep 17 00:00:00 2001 From: Simon Johnston Date: Wed, 21 Aug 2024 11:48:27 -0700 Subject: [PATCH] docs: sync README and header comments --- README.md | 36 ++++++++++++++++-------------------- ob-sdml.el | 22 ++++++++++++++++++---- 2 files changed, 34 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 288cb02..2765273 100644 --- a/README.md +++ b/README.md @@ -7,27 +7,18 @@ This package provides support for SDML (the [Simple Domain Modeling Language](ht ## Installing -Currently the package is not published and so installation has to be done -manually. - -### Install manually - -First clone the Git repository to a local path. - -```bash - git clone https://github.com/johnstonskj/emacs-ob-sdml.git -``` - -The following uses `use-package` but any equivalent package manager should work. -Note that you will need to add the `'sdml` name to the org-babel language list. +Install is easiest from MELPA, here's how with `use-package`. Note the hook clause +to ensure this minor mode is always enabled for SDML source files. ```elisp (use-package ob-sdml :after (ob sdml-mode) - :load-path "/path/to/repo" - :init (add-to-list 'org-babel-load-languages '(sdml . t))) + :init (ob-sdml-setup)) ``` +Or, interactively; `M-x package-install RET sdml-ispell RET` and then +run `M-x ob-sdml-setup RET` to add SDML to the Babel list of languages. + You will also need to install the SDML command-line tool to execute commands against source blocks. @@ -92,12 +83,17 @@ parameters and has it's own results block as well. ## Contributing -The packages in this repository should pass the standard package checks, -including: +This package includes an [Eldev](https://github.com/emacs-eldev/eldev) file and the following MUST be run before +creating any PR. + +- `eldev lint` +- `eldev doctor` +- `eldev package --load-before-compiling --stop-on-failure --warnings-as-errors` +- `eldev test` +- `eldev test --undercover auto,coveralls,merge,dontsent -U simplecov.json` +- `eldev release -nU 9.9.9` -* `byte-compile-file` -* `package-lint` -* `checkdoc` +The script [eldev-check.sh](https://gist.github.com/johnstonskj/6af5ef6866bfb1288f4962a6ba3ef418) may be useful to you if you do not have your own Eldev workflow. ## License diff --git a/ob-sdml.el b/ob-sdml.el index 2a28557..026aa99 100644 --- a/ob-sdml.el +++ b/ob-sdml.el @@ -24,11 +24,26 @@ ;;; Commentary: -;; Provides Babel integration for SDML source blocks. This relies on the +;; Provides Org-Babel integration for SDML source blocks. This relies on the ;; command-line tool `sdml' (https://github.com/johnstonskj/rust-sdml) to ;; run checkers, diagram generators, and conversion tools. ;; +;; Install +;; +;; Install is easiest from MELPA, here's how with `use-package`. Note the hook clause +;; to ensure this minor mode is always enabled for SDML source files. +;; +;; `(use-package ob-sdml +;; :after (ob sdml-mode) +;; :init (ob-sdml-setup))' +;; +;; Or, interactively; `M-x package-install RET sdml-ispell RET' and then +;; run `M-x ob-sdml-setup RET' to add SDML to the Babel list of languages. +;; +;; You will also need to install the SDML command-line tool to execute commands +;; against source blocks. + ;; Usage ;; ;; The following header arguments are specifically used on source blocks: @@ -121,11 +136,10 @@ Note that this uses the variables `sdml-mode-cli-name' and ;;;###autoload (defun ob-sdml-setup () "Set up SDML language mapping for Org-Babel." + (interactive) + (message "Adding sdml to org-babel-load-languages") (add-to-list 'org-babel-load-languages '(sdml . t))) -;;;###autoload -(ob-sdml-setup) - (provide 'ob-sdml) ;;; ob-sdml.el ends here