tasks/01-project-setup.md done

This commit is contained in:
2026-01-24 13:47:18 +01:00
parent 3ca9c10678
commit 61ccba3548
5 changed files with 120 additions and 0 deletions

20
.gitignore vendored Normal file
View File

@@ -0,0 +1,20 @@
# Byte-compiled files
*.elc
# Eldev
.eldev/
Eldev-local
# Package archives
/packages/
# Test artifacts
/test/tmp/
# Editor
*~
\#*\#
.#*
# OS
.DS_Store

13
Eldev Normal file
View File

@@ -0,0 +1,13 @@
; -*- mode: emacs-lisp; lexical-binding: t; -*-
(eldev-use-package-archive 'gnu)
(eldev-use-package-archive 'melpa)
;; Test dependencies
(eldev-add-extra-dependencies 'test 'ert)
;; Use ERT for testing
(setf eldev-test-framework 'ert)
;; Lint configuration
(setf eldev-lint-default '(elisp package))

24
Makefile Normal file
View File

@@ -0,0 +1,24 @@
EMACS ?= emacs
BATCH = $(EMACS) -Q -batch -L .
.PHONY: all compile test lint clean
all: compile test
compile:
$(BATCH) -f batch-byte-compile ob-elixir.el
test:
$(BATCH) -l ert -l test/test-ob-elixir.el \
-f ert-run-tests-batch-and-exit
lint:
$(BATCH) --eval "(require 'package)" \
--eval "(package-initialize)" \
--eval "(package-refresh-contents)" \
--eval "(package-install 'package-lint)" \
-l package-lint \
-f package-lint-batch-and-exit ob-elixir.el
clean:
rm -f *.elc test/*.elc

41
ob-elixir.el Normal file
View File

@@ -0,0 +1,41 @@
;;; ob-elixir.el --- Org Babel functions for Elixir -*- lexical-binding: t; -*-
;; Copyright (C) 2024 Your Name
;; Author: Your Name <your.email@example.com>
;; URL: https://github.com/username/ob-elixir
;; Keywords: literate programming, reproducible research, elixir
;; Version: 0.1.0
;; Package-Requires: ((emacs "27.1") (org "9.4"))
;; This file is not part of GNU Emacs.
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;; Commentary:
;; Org Babel support for evaluating Elixir code blocks.
;;
;; Features:
;; - Execute Elixir code in org-mode source blocks
;; - Support for :results value and :results output
;; - Variable passing with :var header argument
;; - Mix project context support
;;
;; Usage:
;; Add (elixir . t) to `org-babel-load-languages':
;;
;; (org-babel-do-load-languages
;; 'org-babel-load-languages
;; '((elixir . t)))
;;; Code:
(require 'ob)
(require 'ob-eval)
(provide 'ob-elixir)
;;; ob-elixir.el ends here

22
test/test-ob-elixir.el Normal file
View File

@@ -0,0 +1,22 @@
;;; test-ob-elixir.el --- Tests for ob-elixir -*- lexical-binding: t; -*-
;;; Commentary:
;; Test suite for ob-elixir package.
;;; Code:
(require 'ert)
;; Add parent directory to load path
(let ((dir (file-name-directory (or load-file-name buffer-file-name))))
(add-to-list 'load-path (expand-file-name ".." dir)))
(require 'ob-elixir)
(ert-deftest ob-elixir-test-package-loads ()
"Test that the package loads successfully."
(should (featurep 'ob-elixir)))
(provide 'test-ob-elixir)
;;; test-ob-elixir.el ends here