Set default source block header arg :eval no

This commit is contained in:
TEC 2024-01-11 16:04:30 +08:00
parent e06489bc45
commit c3df4d429e
Signed by: tec
SSH Key Fingerprint: SHA256:eobz41Mnm0/iYWBvWThftS0ElEs1ftBr6jamutnXc/A
3 changed files with 10 additions and 7 deletions

View File

@ -6,7 +6,7 @@
First we need to get all the posts
#+name: collect-posts
#+begin_src emacs-lisp
#+begin_src emacs-lisp :eval yes
(setq posts (nreverse
(directory-files (expand-file-name "../content" default-directory)
t "^[0-9]\\{4\\}-[0-9][0-9]-[0-9][0-9]-.+\\.org")))
@ -16,8 +16,9 @@ Word counting would be helpful, but ~count-words~ includes parts of the document
we don't want to count, like code blocks. To help us count words accurately, we
can just create a derived export backend which discards elements we don't care
about.
#+name: count-words-org
#+begin_src emacs-lisp
#+begin_src emacs-lisp :eval yes
(defun org-org-content (_blob content _info) (or content ""))
(org-export-define-derived-backend 'org-for-word-counting 'org
@ -52,7 +53,7 @@ about.
Then we want to format the content for inclusion.
#+name: post-formatting
#+begin_src emacs-lisp
#+begin_src emacs-lisp :eval yes
(defun post-item (file)
(with-temp-buffer
(insert-file-contents file)
@ -67,7 +68,7 @@ Then we want to format the content for inclusion.
* Output :ignore:
#+begin_src emacs-lisp :noweb yes :results raw :exports results
#+begin_src emacs-lisp :noweb yes :eval yes :results raw :exports results
<<collect-posts>>
<<count-words-org>>
<<post-formatting>>

View File

@ -26,7 +26,7 @@ First we need to get all the posts. To get a recent-first ordering we just need
to reverse the sorted directory listing.
#+name: collect-posts
#+begin_src emacs-lisp
#+begin_src emacs-lisp :eval yes
(setq posts (nreverse
(directory-files (expand-file-name "../content" default-directory)
t "^[0-9]\\{4\\}-[0-9][0-9]-[0-9][0-9]-.+\\.org")))
@ -36,7 +36,7 @@ Then we want to format the content for inclusion. Each file can be visited and
modified for inclusion.
#+name: post-formatting
#+begin_src emacs-lisp
#+begin_src emacs-lisp :eval yes
(defun format-post (file &optional truncate-length)
(with-temp-buffer
(insert-file-contents file)
@ -68,7 +68,7 @@ modified for inclusion.
* Output :ignore:
#+begin_src emacs-lisp :noweb yes :results raw :exports results
#+begin_src emacs-lisp :noweb yes :eval yes :results raw :exports results
<<collect-posts>>
<<post-formatting>>
(concat

View File

@ -130,6 +130,8 @@
user-full-name "TEC"
user-mail-address "contact.tmio@tecosaur.net")
(setf (alist-get :eval org-babel-default-header-args) "no")
;;; For some reason emoji detection doesn't seem to work, so let's just turn it on
;; (setcar (rassoc 'emoji org-latex-conditional-features) t)