Compare commits
3 Commits
cbfab437b1
...
396459b0fe
Author | SHA1 | Date | |
---|---|---|---|
396459b0fe | |||
cbf7ce9d9e | |||
7c0c2e591a |
38
README.org
38
README.org
@ -5296,38 +5296,6 @@ ruff "$@" | cat
|
||||
# End:
|
||||
#+end_src
|
||||
|
||||
*** Org Babel Ackermann Python test
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: sec:obap-test
|
||||
:END:
|
||||
|
||||
#+caption[Org Babel Ackermann Python test]:
|
||||
#+caption: Org Babel Ackermann Python test.
|
||||
#+name: lst:obap-test
|
||||
#+header: :wrap "src text -n"
|
||||
#+begin_src python -n :eval never-export :exports both :session Python
|
||||
# https://rosettacode.org/wiki/Ackermann_function#Python
|
||||
# https://www.youtube.com/watch?v=i7sm9dzFtEI
|
||||
|
||||
def ack(M, N):
|
||||
if M == 0:
|
||||
return N + 1
|
||||
elif N == 0:
|
||||
return ack(M - 1, 1)
|
||||
else:
|
||||
return ack(M - 1, ack(M, N - 1))
|
||||
|
||||
ack(3, 3)
|
||||
#+end_src
|
||||
|
||||
#+caption[Org Babel Ackermann Python test result]:
|
||||
#+caption: Org Babel Ackermann Python test result.
|
||||
#+name: lst:obap-test-result
|
||||
#+RESULTS: lst:obap-test
|
||||
#+begin_src text -n
|
||||
61
|
||||
#+end_src
|
||||
|
||||
*** [[https://pip.pypa.io/en/stable/][Package Installer for Python]]
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: sec:pip-python
|
||||
@ -5689,8 +5657,7 @@ setup and requires no configuration.
|
||||
#+caption: Configure =ws-butler=.
|
||||
#+name: lst:configure-ws-butler
|
||||
#+begin_src emacs-lisp -n :results silent
|
||||
(when (and (ensure-package-installation 'ws-butler)
|
||||
(fboundp 'ws-butler-mode))
|
||||
(when (ensure-package-installation 'ws-butler)
|
||||
(setopt ws-butler-keep-whitespace-before-point nil)
|
||||
(add-hook 'prog-mode-hook #'ws-butler-mode)
|
||||
(add-hook 'text-mode-hook #'ws-butler-mode))
|
||||
@ -5951,7 +5918,8 @@ and names in buffers for debugging.
|
||||
(setopt rainbow-x-colors-major-mode-list
|
||||
(list 'c++-mode 'c-mode 'emacs-lisp-mode 'inferior-emacs-lisp-mode
|
||||
'lisp-interaction-mode 'org-mode 'python-mode))
|
||||
(dolist (symbol '(emacs-lisp-mode-hook python-mode-hook))
|
||||
;; GAV: How to disable `rainbow-mode' on `emacs-lisp-mode-hook'?
|
||||
(dolist (symbol '(python-mode-hook))
|
||||
(add-hook symbol #'rainbow-mode)))
|
||||
#+end_src
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user