Skip to content

Commit

Permalink
Fix tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
ag91 committed Oct 11, 2021
1 parent 859e553 commit 15c94cd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 2 additions & 0 deletions molds/contrib.el
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ following in your lein project.clj
:key "CSVToBarChart"
:given (:fn
(and (executable-find "graph")
(me-require 'csv-mode)
(eq major-mode 'csv-mode)))
:then (:fn
(let ((table nil) ;; TODO maybe I can use org-table-convert-region to produce a org table, also maybe another mold
Expand All @@ -79,6 +80,7 @@ following in your lein project.clj
(me-register-mold
:key "CSVToLineChart"
:given (:fn (and (executable-find "graph")
(me-require 'csv-mode)
(eq major-mode 'csv-mode)))
:then (:fn
(let ((table nil) ;; TODO maybe I can use org-table-convert-region to produce a org table, also maybe another mold
Expand Down
3 changes: 2 additions & 1 deletion molds/core.el
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ You can transform this to extract information with the Playground mold."

(me-register-mold
:key "CSVtoPlist"
:given (:fn (and (eq major-mode 'csv-mode)))
:given (:fn (and (me-require 'csv-mode) (eq major-mode 'csv-mode)))
:then (:fn
(save-excursion
(goto-char (point-min))
Expand Down Expand Up @@ -598,6 +598,7 @@ It specializes for source code."
:key "OrgTableToCSV"
:given (:fn (and
(eq major-mode 'org-mode)
(me-require 'csv-mode)
(s-contains-p "org" (buffer-name) t)
(s-contains-p "table" (buffer-name) t)))
:then (:fn
Expand Down
13 changes: 8 additions & 5 deletions tutorials/ListCurrentEmacsBuffersAndSizesInBarChart.org
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
:CREATED: [2021-10-04 Mon 21:41]
:END:

You will only need =graph-cli= for the bar chart generation. This is
easy to install: =pip install graph-cli=.
You will need =csv-mode= (=M-x package-install csv-mode=) and
=graph-cli= for the bar chart generation. This is easy to install:
=pip install graph-cli=. Also make sure to have followed the setup in
the README: in particular =(me-setup-molds)= makes molds available.

** Aim
:PROPERTIES:
Expand All @@ -24,9 +26,10 @@ chart would be ideal.
** Let's do it
:PROPERTIES:
:CREATED: [2021-10-04 Mon 21:45]
:ID: 62190bd1-5cc5-43ba-a517-c445d454e5fc
:END:

1) invoke M-x and type =me/mold=
1) invoke M-x and type =me-mold=

This is the command that let you access the molds that can be useful in this context.
2) type "Playground"
Expand All @@ -47,13 +50,13 @@ chart would be ideal.

This creates a =plist= with the buffers name and its size.
5) move the cursor on the first open parenthesis
6) invoke M-x and type =me/mold=
6) invoke M-x and type =me-mold=
7) type "EvalSexp" and hit return

You should see a buffer "EvalSexp" with a =plist= containing all
your open buffers and sizes.
8) move at the beginning of the buffer (the useful shortcut is =M-<=)
9) invoke M-x and type =me/mold=
9) invoke M-x and type =me-mold=
10) type "PlistToBarChart" and hit return

"PlistToBarChart" is a composition of many molds: you will find
Expand Down

0 comments on commit 15c94cd

Please sign in to comment.