#+TITLE: 013/100 Terminal colorp
#+AUTHOR: screwtape
#+EMAIL: [email protected]
1. Do M-x org-mode ; alt-x org-mode <RET>
2. put the cursor anywhere in the src block below and press C-c C-c and say yes
#+name: cache-this-phlog
#+HEADER: :var phlogs-dir="/tmp/phloggersgarage/"
#+HEADER: :var phlog-server="tilde.club/"
#+HeADer: :var phlog-dir="~screwtape/synthember-100days-tooffload/"
#+HEADER: :var this-phost-title="013-wandering-around-org-babel.org"
#+begin_src elisp :results none
 (let* ((tmp-directory
         (cl-concatenate 'string phlogs-dir phlog-server phlog-dir))
        (tmp-file-name (cl-concatenate 'string tmp-directory this-phost-title)))
   (make-directory tmp-directory t)
   (let ((old-visited-name (buffer-file-name)))
    (set-visited-file-name tmp-file-name)
    (save-buffer (current-buffer))
    (set-visited-file-name old-visited-name))
   (find-file tmp-file-name))
#+end_src
3. Join #phloggersgarage in libera.chat while enjoying cached org-mode gopher
  100daystooffload
4. customize the header :var whatever="stri/ngs" for your own phosts
* Bongusta phlog aggregator by logout
[[gopher://i-logout.cz/1/bongusta/]]
Hints:
- M-x elpher-copy-link-url ; I always forget this after elpher-go. Also ^ is back
- C-c C-l C-y <RET> <RET> ; enter a link that displays as just the url

* THIS PHLOG AS SUCH                                     :actually_the_phlog:
While the phlog I would like to write is about exploring McCLIM, day by day I think
color in org-mode is my next target. I really don't know if org-mode is going to
respect terminal escape color. Maybe there's an emacs minor mode. I wrote a tiny
lisp utility for doing ansi escapes in common lisp, if I recall correctly. Let's
get that project and check.
** Enable shell and (common) lisp in org-mode
#+name enable-languages
#+begin_src elisp :results none
 (org-babel-do-load-languages
  'org-babel-load-languages
  '((shell . t) (lisp . t) (C . t)))
#+end_src
*** Check that's working.
**** shell
(Typing) #+name: name C-c C-v d
#+name: shell-test
#+begin_src shell
printf "%s\n" "hi!"
#+end_src

#+RESULTS: shell-test
: hi!
**** C / C++ test
***** C
#+name: c-test
#+begin_src C :var string="hello world" :includes <stdio.h>
 printf("%s", string);
#+end_src

#+RESULTS: This is very nested
: hello world
***** C++ test
#+name: cxx-test
#+begin_src cpp :var myString="argh." :includes <c++/10/iostream>
 using namespace std;
 cout << myString;
#+end_src

#+RESULTS: how-do-you-even-print-in-Cxx
: argh.
**** lisp
***** Start slime using elisp
#+begin_src elisp :results none
 (slime)
#+end_src
***** Print something
#+name: lisprint
#+begin_src lisp :var string=cxx-test()
(print string)
#+end_src

#+RESULTS: lisprint
: argh.
***** Print something with color
#+name: color-test
#+begin_src lisp :var string=shell-test() :results output
 (format t "~a[3m~a~0@*~a[0m" #\escape string)
#+end_src

#+RESULTS: color-test
: hi!

Argh, lame.
***** Try to ansi-color that
#+name: convert-to-face
#+begin_src elisp :var string=color-test() :results verbatim
 (require 'ansi-color)
 `(insert ,(ansi-color-apply string))
#+end_src

#+RESULTS: convert-to-face
: (insert #("hi!" 0 3 (font-lock-face ansi-color-italic)))

hi!

(and then M-x eval-last-sexp ...)

Alright this isn't emacs appropriate let's bail




* Cached matto's pgbot 100daystooffloadroll                        :appendix:
| screwtape  | [[gopher://tilde.club/1/~screwtape/synthember-100days-tooffload/]] |
| matto      | [[gopher://box.matto.nl]]                                          |
| _82mhz     | https://82mhz.net                                              |
| plugd      | [[gopher://thelambdalab.xyz/1phlog/]]                              |
| x1v        | [[gopher://rawtext.club/1/~xiu/phlog/]]                            |
| szczezuja  | [[gopher://gopher.club:70/1/users/szczezuja/personal/]]            |
| prahou     | [[gopher://triapul.cz/1/phlog]]                                    |
| pi31415    | [[gopher://tilde.pink/1/~bencollver/log/]]                         |
| damarusama | [[gopher://gopher.club/1/users/gef/]]                              |
* Also cat and jns and pkw
| [[gopher://baud.baby]]            | [[gopher://embryonic.church]]         |
| [[gopher://gopher.linkerror.com]] | [[gopher://gopher.club/1/users/jns/]] |
| [[gopher://g.d34d.net/1/~pkw/]]   |                                   |