dotemacs

My Emacs configuration
git clone git://git.entf.net/dotemacs
Log | Files | Refs | LICENSE

README.md (2357B)


      1 [![Build Status](https://travis-ci.org/clojure-emacs/parseedn.svg?branch=master)](https://travis-ci.org/clojure-emacs/parseedn)
      2 
      3 # EDN parser for Emacs Lisp
      4 
      5 `parseedn` is an Emacs Lisp library for parsing [EDN
      6 data](https://github.com/edn-format/edn). It uses
      7 [`parseclj`](https://github.com/clojure-emacs/parseclj)'s shift-reduce parser
      8 internally.
      9 
     10 EDN and Emacs Lisp have some important differences that make translation from
     11 one to the other not transparent (think representing an EDN map into Elisp, or
     12 being able to differentiate between `false` and `nil` in Elisp).  Because of
     13 this, `parseedn` takes certain decisions when parsing and transforming EDN data
     14 into Elisp data types.  For more information please refer to [`parseclj`
     15 DESIGN.md](https://github.com/clojure-emacs/parseclj/blob/master/DESIGN.md)
     16 document.
     17 
     18 Lastly, `parseedn` is in **alpha** stage, so its API is subject to change.
     19 
     20 ## Installation
     21 
     22 Available on the major `package.el` community maintained repos -
     23 [MELPA Stable][] and [MELPA][] repos.
     24 
     25 MELPA Stable is the recommended repo as it has the latest stable
     26 version.  MELPA has a development snapshot for users who don't mind
     27 (infrequent) breakage but don't want to run from a git checkout.
     28 
     29 You can install `parseedn` using the following command:
     30 
     31 <kbd>M-x package-install [RET] parseedn [RET]</kbd>
     32 
     33 or if you'd rather keep it in your dotfiles:
     34 
     35 ```el
     36 (unless (package-installed-p 'parseedn)
     37   (package-install 'parseedn))
     38 ```
     39 
     40 If the installation doesn't work try refreshing the package list:
     41 
     42 <kbd>M-x package-refresh-contents</kbd>
     43 
     44 [melpa]: http://melpa.org
     45 [melpa stable]: http://stable.melpa.org
     46 
     47 ## Usage
     48 
     49 - `parseedn-read`
     50 
     51     Read content from the current buffer as EDN and transforms it into an Emacs
     52     Lisp value.
     53 
     54 - `parseedn-read-str` str
     55 
     56     Read STR as EDN and transfroms it into an Emacs Lisp value.
     57 
     58 - `parseedn-print` datum
     59 
     60     Inserts DATUM as EDN Into the current buffer.  DATUM can be any Emacs Lisp
     61     value.
     62 
     63 - `parseedn-print-str` datum
     64 
     65     Returns a string containing DATUM as EDN.  DATUM can be any Emacs Lisp
     66     value.
     67 
     68 ## Prior art
     69 
     70 [edn.el](https://github.com/expez/edn.el) is an EDN-to-elisp parser based on the
     71 PEG parser generator library.
     72 
     73 ## License
     74 
     75 &copy; 2017-2021 Arne Brasseur
     76 
     77 Distributed under the terms of the GNU General Public License 3.0 or later. See
     78 [LICENSE](LICENSE).