• Finally Starting To Use Elisp In Babel Blocks

    From yeti@yeti@tilde.institute to tilde.institute on Thu Mar 7 13:08:00 2024
    In baby steps I'm just starting to use Elisp in Babel blocks.

    Lisp is like Forth: If you know one Lisp, you know one Lisp.

    Additionally needing to deʀᴜsᴛ (*tsching-bäng!*) my Lisp muscles I need to constantly look up stuff in Elisp's manual and in a second window the Orgmode concepts and functions I might need. I think it'll be worth it
    and replacing AWK blocks as helpers in Org files with Elisp will give
    deeper access into Emacs and Org and without using external helpers
    Elisp blocks will be more portable.

    ------------------------------------------------------------------------ ~/org/brain/unsorted.d $ cat read-csv-to-table.elisp.org
    #+begin_src text :tangle test.csv
    1,2,3
    2,3,4
    3,4,5
    4,5,6
    #+end_src

    #+name: csv-file-to-table
    #+BEGIN_SRC emacs-lisp :var filename="" :exports results :eval no-export (with-temp-buffer
    (insert-file-contents filename)
    (org-table-convert-region (point-min) (point-max) ",")
    (buffer-string))
    #+END_SRC

    #+call: csv-file-to-table(filename="test.csv")

    #+RESULTS:
    : | 1 | 2 | 3 |
    : | 2 | 3 | 4 |
    : | 3 | 4 | 5 |
    : | 4 | 5 | 6 | ------------------------------------------------------------------------

    For now even small snippets like this gives me a big smile.

    --
    I'm nonbinary, I use Lisp and Scheme. -- 20240301/yeti
    --- Synchronet 3.19a-Linux NewsLink 1.113
  • From yeti@yeti@tilde.institute to tilde.institute on Thu Mar 7 13:10:03 2024
    In baby steps I'm just starting to use Elisp in Babel blocks.

    Lisp is like Forth: If you know one Lisp, you know one Lisp.

    Additionally needing to derust (*tsching-bang!*) my Lisp muscles I need
    to constantly look up stuff in Elisp's manual and in a second window the Orgmode concepts and functions I might need. I think it'll be worth it
    and replacing AWK blocks as helpers in Org files with Elisp will give
    deeper access into Emacs and Org and without using external helpers
    Elisp blocks will be more portable.

    ------------------------------------------------------------------------ ~/org/brain/unsorted.d $ cat read-csv-to-table.elisp.org
    #+begin_src text :tangle test.csv
    1,2,3
    2,3,4
    3,4,5
    4,5,6
    #+end_src

    #+name: csv-file-to-table
    #+BEGIN_SRC emacs-lisp :var filename="" :exports results :eval no-export (with-temp-buffer
    (insert-file-contents filename)
    (org-table-convert-region (point-min) (point-max) ",")
    (buffer-string))
    #+END_SRC

    #+call: csv-file-to-table(filename="test.csv")

    #+RESULTS:
    : | 1 | 2 | 3 |
    : | 2 | 3 | 4 |
    : | 3 | 4 | 5 |
    : | 4 | 5 | 6 | ------------------------------------------------------------------------

    For now even small snippets like this gives me a big smile.

    --
    I'm nonbinary, I use Lisp and Scheme. -- 20240301/yeti
    --- Synchronet 3.19a-Linux NewsLink 1.113
  • From yeti@yeti@tilde.institute to tilde.institute on Thu Mar 7 13:12:24 2024
    In baby steps I'm just starting to use Elisp in Babel blocks.

    Lisp is like Forth: If you know one Lisp, you know one Lisp.

    Additionally needing to derust (*tsching-bang!*) my Lisp muscles I need
    to constantly look up stuff in Elisp's manual and in a second window the Orgmode concepts and functions I might need. I think it'll be worth it
    and replacing AWK blocks as helpers in Org files with Elisp will give
    deeper access into Emacs and Org and without using external helpers
    Elisp blocks will be more portable.

    ------------------------------------------------------------------------ ~/org/brain/unsorted.d $ cat read-csv-to-table.elisp.org
    #+begin_src text :tangle test.csv
    1,2,3
    2,3,4
    3,4,5
    4,5,6
    #+end_src

    #+name: csv-file-to-table
    #+BEGIN_SRC emacs-lisp :var filename="" :exports results :eval no-export (with-temp-buffer
    (insert-file-contents filename)
    (org-table-convert-region (point-min) (point-max) ",")
    (buffer-string))
    #+END_SRC

    #+call: csv-file-to-table(filename="test.csv")

    #+RESULTS:
    : | 1 | 2 | 3 |
    : | 2 | 3 | 4 |
    : | 3 | 4 | 5 |
    : | 4 | 5 | 6 | ------------------------------------------------------------------------

    For now even small snippets like this give me a big smile.

    --
    I'm nonbinary, I use Lisp and Scheme. -- 20240301/yeti
    --- Synchronet 3.19a-Linux NewsLink 1.113