Skip to content

ConceptMap tool written in ELisp

License

Notifications You must be signed in to change notification settings

toracle/el-cmap

Repository files navigation

A ConceptMap authoring tool powered by Emacs.

Build Status

Create concept maps with Emacs. Choose a main node and connect it to other nodes with links. Each node has a local graph of connected concepts. The whole graph is shown as an image.

The graph data is saved in Elisp format and converted to graphviz dot file for visualization.

./docs/screen.png

Getting Started

This mode is not yet uploaded to Melpa. You may clone or download to your local device and add it to load-path.

Invoke M-x and execute (cmap-mode-main), it will lead you to an empty cmap graph.

You can add a node with n key, see a graph image with v key, it requires you to save graph data before render an image.

Features

  • New graph
  • Save or load graph data
  • Add node or edge (inward, outward)
  • Represent a local graph to navigate to or add a neighbor node/edge
  • Delete a node or edge
  • Draw a graph image with graphviz

Key bindings

  • C-x C-f: Open a new graph file
  • v: Export a dot file and draw a graph image, show it
  • n: Add a node
  • e: Add an (outward) edge
  • E: Add an (inward) edge
  • x: Remove a node or edge at cursor
  • r: Rename label of a node or edge at cursor
  • t: Toggle a toolbar between visible/invisible
  • f: Select a node as a focal
  • TAB: Step between buttons

To-do [0/1]

  • [ ] Rename a node or edge label

Development

Running Tests

Tests can be run using the run-tests.sh script:

# Run all tests
./run-tests.sh

# Run specific test suite
./run-tests.sh model
./run-tests.sh repr
./run-tests.sh buffer
./run-tests.sh enhanced
./run-tests.sh pure

Code Coverage

You can run tests with code coverage reporting:

# Generate coverage reports
./run-tests.sh --coverage

# Or directly use the coverage target
./run-tests.sh coverage

# Generate coverage with HTML report
./run-tests.sh --coverage --html-report

# Or use the combined target
./run-tests.sh html-report

Viewing Coverage Reports

In Emacs (with line highlighting)

To view coverage in Emacs with gutter indicators:

  1. Install cov-mode: M-x package-install RET cov RET
  2. Load the coverage viewer: M-x load-file RET path/to/el-cmap/show-coverage.el RET
  3. Enable coverage overlay: M-x el-cmap-coverage-show RET

This will highlight covered lines in green, uncovered lines in red, and partially covered lines in yellow.

HTML Report

Generate an HTML report that can be viewed in any browser:

# If you have lcov installed
genhtml coverage/lcov.info --output-directory coverage/html

# Or from Emacs
M-x load-file RET path/to/el-cmap/show-coverage.el RET
M-x el-cmap-coverage-html RET

The HTML report will be generated in coverage/html/index.html.

Summary in Terminal

View a quick summary in the terminal:

# If you have lcov installed
lcov --summary coverage/lcov.info

CI Integration

GitHub Actions automatically runs the test suite with coverage on every push and pull request. The coverage report is generated as an artifact that can be downloaded from the GitHub Actions workflow summary page.

About

ConceptMap tool written in ELisp

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published