alanz / moldable-emacs

Adapting Emacs for moldable development

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Moldable Emacs

This is an extension of Emacs aiming to enable Moldable Development. Or better still, aiming to make you a better story teller when you deal with code.

TODO: I will detail dependencies and more information in a later change.

Ah! This is a pretty alpha release: I have a plan for quite few changes ahead! So avoid to build upon this prototype for now!!

Installation

The suggested way to install this package is via use-package. This is my installation configuration:

(use-package moldable-emacs
  :init (if (f-directory-p "~/.emacs.d/lisp/moldable-emacs")
            (shell-command "cd ~/.emacs.d/lisp/moldable-emacs; git pull;")
          (shell-command "cd ~/.emacs.d/lisp/; git clone git@github.com:ag91/moldable-emacs.git"))
  :load-path "~/.emacs.d/lisp/moldable-emacs/"
  :bind (("C-c m m" . me-mold)
         ("C-c m f" . me-go-forward)
         ("C-c m b" . me-go-back)
         ("C-c m o" . me-open-at-point)
         ("C-c m d" . me-mold-docs)
         ("C-c m e a" . me-mold-add-last-example)
         )
  :config
  (require 'moldable-emacs)
  (add-to-list 'me-files-with-molds (concat (file-name-directory (symbol-file 'me-mold)) "molds/experiments.el")) ;; TODO this is relevant only if you have private molds
  (me-setup-molds))

If you are using Doom Emacs slightly modify this:

(use-package! moldable-emacs
  ...
  (me-setup-molds))
(add-load-path! "~/.emacs.d/lisp/moldable-emacs/molds")

I am working on making moldable-emacs itself explain which optional and external dependencies you may need for what, but it is still work in progress. For now an incomplete list from the top of my mind.

Emacs Dependencies

This package requires:

  • dash.el
  • s.el
  • async.el
  • thunk.el

Optionally:

  • emacs-tree-sitter.el

    you can get more functionality if you install tree-sitter’s grammars as well.

  • esxml.el
  • code-compass.el
  • org-ql
  • … (check these via the mold “WhatMoldsCanIUse?”)

(Optional) External Dependencies

  • graph-cli
  • graphviz
  • imgclip
  • ???

Testing

Install the Elisp Development Tool (Eldev) and run

eldev test

Tutorials

You should be able to access tutorials via the “Show Tutorials” mold. Or you can look in tutorials/.

Further info

View code duplication as an Org buffer

https://ag91.github.io/blog/2021/05/26/moldable-emacs-make-everything-moldable-through-lisp

Vision

https://ag91.github.io/blog/2021/06/18/moldable-emacs-vision-basic-concepts-and-design

Exploring JSON via Elisp

https://ag91.github.io/blog/2021/06/18/moldable-emacs-how-to-explore-json-via-elisp

[Setup] Clojure tree-sitter grammar installation

https://ag91.github.io/blog/2021/06/22/how-(simple-is)-to-install-a-clojure-tree-sitter-grammar-and-use-it-from-emacs/

OCR mold

https://ag91.github.io/blog/2021/07/16/moldable-emacs-capturing-text-from-open-images-with-an-ocr-mold

Grabbing hyperlinks from HTML with Playground

https://ag91.github.io/blog/2021/07/19/moldable-emacs-capture-links-from-html-with-playground/

Showing examples for a Clojure function at point

https://ag91.github.io/blog/2021/07/27/moldable-emacs-finding-examples-of-clojure-functions-(with-tests)/

Code transformation: edit your CSS files with a Playground!

https://ag91.github.io/blog/2021/08/11/moldable-emacs-editing-your-file-via-treesitter-(or-how-i-fixed-my-css-with-a-playground)/

Prototype: integrating Nyxt and Vega-Lite

https://ag91.github.io/blog/2021/08/22/moldable-emacs-vega-lite-nyxt-and-emacs-towards-sustainable-development

Taking notes with molds

https://ag91.github.io/blog/2021/09/05/moldable-emacs-taking-lispy-notes-that-are-easier-to-search

Howto: Migrating to a terser format for molds

https://ag91.github.io/blog/2021/09/19/moldable-emacs-making-molds-a-little-easier-to-write/

Extend molds via hooks

https://ag91.github.io/blog/2021/09/23/moldable-emacs-extending-the-playground-powers-via-hooks-to-include-dired

Check which molds you can use and demo them!

https://ag91.github.io/blog/2021/10/02/moldable-emacs-molds-need-examples-too/

Moldable tutorials

https://ag91.github.io/blog/2021/10/15/moldable-emacs-moldable-tutorials/

Stats mold

https://ag91.github.io/blog/2021/10/22/moldable-emacs-how-to-get-useful-info-about-a-buffer-without-reading-it/

JavaScript and Parenscript Mold with Nyxt

https://ag91.github.io/blog/2021/10/29/emacs-with-nyxt-capturing-youtube-links-at-time-and-molding-nyxt-with-js/

About

Adapting Emacs for moldable development

License:GNU General Public License v3.0


Languages

Language:Emacs Lisp 100.0%