Foro: https://nubecita.online/fudforum/

Aquí se encontrarán los posts enviado al foro ampliados o actualizados.

+name: list-files

+BEGIN_SRC emacs-lisp :results raw replace :exports results :wrap export gemini

(concat (mapconcat (lambda (file)

(format "=> %s ✍ %s\n" (url-encode-url file) file))

(directory-files "." nil "^[^#]*\\.gmi$"))

"\nOrg files:\n"

(mapconcat (lambda (file)

(format "=> %s 🦄 %s\n" (url-encode-url file) file))

(directory-files "." nil "^[^#]*\\.org$")))

+END_SRC

+RESULTS: list-files

+begin_export gemini

✍ Compiling Emacs.gmi

✍ Dezhemini, Racket y Gemini.gmi

✍ Emacs with Nyxt.gmi

✍ Instalar y testear Dezhemini.gmi

✍ My Nyxt config.gmi

✍ index.gmi

Org files:

🦄 Compiling Emacs.org

🦄 Dezhemini, Racket y Gemini.org

🦄 Emacs with Nyxt.org

🦄 Instalar y testear Dezhemini.org

🦄 My Nyxt config.org

🦄 index.org

+end_export

Elisp source blocks are executed before saving or exporting.

+name: setup-code

+BEGIN_SRC emacs-lisp :results output silent

;; Code to execute the list-files code block only here...

;; Maybe use `goto-char' to position the cursor on list-files and

;; eval it with `org-babel-execute-src-block'.

+END_SRC

Canceled after some tries...

-eval: (add-hook 'before-save-hook (lambda () (org-babel-execute-buffer)) nil t)

-eval: (add-hook 'org-export-before-processing-hook (lambda (_be) (org-babel-execute-buffer)) nil t)

+EXPORT_EXCLUDE_TAGS: noexport

Local Variables:

eval: (org-babel-ref-resolve "setup-code")

End: