Get rid off the Maxima section and clean up

This commit is contained in:
Gerard Vermeulen 2024-02-11 12:13:53 +01:00
parent 3f54e524c4
commit 747cc513ff

View File

@ -2386,7 +2386,6 @@ list detailing and motivating each listing:
(lilypond . ,(fboundp 'lilypond-mode))
(lisp . t)
(lua . ,(fboundp 'lua-mode))
(maxima . t)
(org . t)
(perl . t)
;; Beware of circular Python dependencies.
@ -2472,10 +2471,6 @@ list detailing and motivating each listing:
(defun org-babel-execute:toml (_body _params)
"NO-OP to silence warnings." nil)
;; Modes are not installed:
(defun org-babel-execute:maxima (_body _params)
"NO-OP to silence warnings." t)
;; Sections not exported:
(defun org-babel-execute:applescript (_body _params)
"NO-OP to silence warnings." nil)
@ -3276,7 +3271,7 @@ Return a list of items where the filename is the `car' of each item and the
#+header: :wrap "src emacs-lisp -n :eval never :tangle no"
#+begin_src emacs-lisp -n :exports both :results value pp :tangle no
(defun org-babel-active-languages ()
(let ((result '("conf" "text" "toml")))
(let (result)
(mapatoms
(lambda (x)
(when (and
@ -3297,15 +3292,10 @@ Return a list of items where the filename is the `car' of each item and the
#+caption: Active Org Babel languages.
#+RESULTS: lst:org-babel-active-languages
#+begin_src emacs-lisp -n :eval never :tangle no
(("C") ("C++") ("D") ("R") ("awk") ("calc") ("clojure")
("clojurescript") ("conf") ("cpp") ("css") ("ditaa") ("dot")
("emacs-lisp") ("eshell") ("forth") ("fortran") ("gnuplot")
("groovy") ("haskell") ("java") ("js") ("julia") ("latex")
("latex-extra-header") ("latex-header") ("lilypond") ("lisp") ("lua")
("makefile") ("matlab") ("maxima") ("ocaml") ("octave") ("org")
("perl") ("plantuml") ("processing") ("python") ("ruby") ("sass")
("scheme") ("screen") ("sed") ("shell") ("sql") ("sqlite") ("text")
("toml"))
(("applescript") ("calc") ("conf") ("emacs-lisp") ("eshell")
("fortran") ("js") ("latex") ("latex-extra-header") ("latex-header")
("lisp") ("maxima") ("org") ("perl") ("python") ("racket") ("ruby")
("scheme") ("shell") ("text") ("toml"))
#+end_src
*** [[https://github.com/bdarcus/citar][Citar: citing bibliography]] with [[https://orgmode.org/][Org Mode]]
@ -3714,8 +3704,6 @@ See `org-link-parameters' for details about PATH, DESC and FORMAT."
("embark" . "https://github.com/oantolin/embark")
("magit" . "https://magit.vc/manual/magit.html")
("marginalia" . "https://github.com/minad/marginalia")
("maxima" .
"https://maxima.sourceforge.io/docs/manual/maxima_singlepage.html")
("org" . "https://orgmode.org/org.html")
("orderless" . "https://github.com/oantolin/orderless")
("sly" . "https://joaotavora.github.io/sly/")
@ -3955,12 +3943,11 @@ Load all test files first."
;; test-org-element/normalize-contents fails (can't fix).
;; test-ob-exp/noweb-on-export fails due to spacing (can't fix).
;; test-ob-exp/noweb-on-export-with-exports-results due to spacing (idem).
;; ob-maxima fixed but spacing is fragile. Which Maxima?
;; ob-python hangs sometimes, but seldom.
;; ob-tangle/continued-code-blocks-w-noweb-ref fails.
(ert (rx (or "org/" "org-fold" "org-element" "org-macro" "org-src"
"property-inheritance"
"ob/" "ob-emacs-lisp" "ob-eshell" "ob-maxima"
"ob/" "ob-emacs-lisp" "ob-eshell"
"ob-python" "ob-tangle")))
(org-test-kill-all-examples)))
@ -3975,10 +3962,10 @@ Load all test files first."
(defun org-test-run-a-test-file ()
"Run all tests in an Org test file (trailing `/' matters).
Examples: `ob/' or `ob-maxima'."
Examples: `ob/' or `ob-python'."
(interactive)
(let ((text (read-string "Org test file (without leading test-): "
nil nil "ob-maxima")))
nil nil "ob-python")))
(org-test-load)
(let (;; Catch errors in diary sexps better.
(calendar-debug-sexp t))
@ -6071,59 +6058,6 @@ byte code:
(add-to-list 'auto-mode-alist `(,(rx ".go" eos) . go-ts-mode)))
#+end_src
** [[info:maxima#Top][Maxima Programming (info)]]
:PROPERTIES:
:CUSTOM_ID: sec:maxima-programming
:END:
Listing [[lst:configure-maxima]] configures the built-in =maxima= library. The
following list contains more information:
1. [[https://gitlab.com/sasanidas/maxima][Maxima Mode]] is an archived Emacs interface to the computer algebra system [[https://en.wikipedia.org/wiki/Maxima_(software)][Maxima]].
2. [[https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-maxima.html][Maxima Source Code Blocks in Org Mode]] shows how to use [[https://en.wikipedia.org/wiki/Maxima_(software)][Maxima]] in [[https://orgmode.org/][Org Mode]].
3. [[https://home.csulb.edu/~woollett/mbe.html][Maxima By Example]] is a tutorial for [[https://en.wikipedia.org/wiki/Maxima_(software)][Maxima]].
Listing [[lst:maxima-example]] is a minimal example of how to use [[info:maxima#Top][Maxima (info)]] in
[[https://orgmode.org/][Org Mode]] and it can work without the built-in =maxima= library or [[https://gitlab.com/sasanidas/maxima][Maxima Mode]].
Enabling =maxima-mode= serves only to fontify the code. See the =org-mode=
mailing list message on the [[https://list.orgmode.org/87fs0geh47.fsf@t14.reltub.ca/][status of ob-maxima]] for a discussion of the header
arguments of listing [[lst:maxima-example]].
#+caption[Configure =maxima=]:
#+caption: Configure =maxima=.
#+name: lst:configure-maxima
#+begin_src emacs-lisp -n :results silent
(when (require 'maxima nil t)
;; In case of https://gitlab.com/sasanidas/maxima, uncomment the next 2 lines:
;; (add-hook 'maxima-mode-hook #'maxima-hook-function)
;; (add-hook 'maxima-inferior-mode-hook #'maxima-hook-function)
(add-to-list 'auto-mode-alist
(cons "\\.mac\\'" 'maxima-mode))
(add-to-list 'interpreter-mode-alist
(cons "maxima" 'maxima-mode)))
#+end_src
#+caption[Maxima example]:
#+caption: Maxima example.
#+caption: The code is not fontified because =maxima-mode= is not enabled.
#+header: :wrap "src text -n"
#+name: lst:maxima-example
#+begin_src maxima -n :batch batch :cmdline --quiet :exports both :results raw
rat(1/(x+1) + x/(x-1));
#+end_src
#+caption[Maxima example results]:
#+caption: Maxima example results.
#+name: lst:maxima-example-results
#+results: lst:maxima-example
#+begin_src text -n
(%i1) (linenum:0,
(%i1) rat(1/(x+1)+x/(x-1))
2
x + 2 x - 1
(%o1)/R/ ------------
2
x - 1
#+end_src
** [[https://www.seas.upenn.edu/~chaoliu/2017/09/01/python-programming-in-emacs/][Python programming]]
:PROPERTIES:
:CUSTOM_ID: sec:python-programming