[nongnu] elpa/cider ddfc99b607 3/5: [stacktrace] Set cider--ancillary-buffer-repl for *cider-error*

2025-04-10 Thread ELPA Syncer
branch: elpa/cider
commit ddfc99b607d0ba5c076fd63146d83b6fe73e1e56
Author: Oleksandr Yakushev 
Commit: Oleksandr Yakushev 

[stacktrace] Set cider--ancillary-buffer-repl for *cider-error*
---
 cider-eval.el | 17 -
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/cider-eval.el b/cider-eval.el
index 15790f70cc..3a02dab8b8 100644
--- a/cider-eval.el
+++ b/cider-eval.el
@@ -295,15 +295,21 @@ When clojure.stracktrace is not present."
(cider-nrepl-sync-request:eval
 "(println (ex-data *e))")))
 
-(defun cider--render-stacktrace-causes (causes &optional error-types 
is-compilation)
+(defun cider--render-stacktrace-causes (causes &optional error-types
+   is-compilation repl)
   "If CAUSES is non-nil, render its contents into a new error buffer.
 Optional argument ERROR-TYPES contains a list which should determine the
 op/situation that originated this error.
 If IS-COMPILATION is true, render the stacktrace into the error buffer but
-don't bring it forward."
+don't bring it forward.
+REPL connection can be provided to set it as the connection for the created
+*cider-error* buffer."
   (when causes
-(let ((error-buffer (cider-new-error-buffer #'cider-stacktrace-mode
-error-types is-compilation)))
+(let* ((repl (or repl (cider-current-repl)))
+   (error-buffer (cider-new-error-buffer #'cider-stacktrace-mode
+ error-types is-compilation)))
+  (with-current-buffer error-buffer
+(setq cider--ancillary-buffer-repl repl))
   (cider-stacktrace-render error-buffer causes error-types
 
 (defconst cider-clojure-compilation-error-phases-default-value
@@ -362,7 +368,8 @@ For others, pop up *cider-error* buffer."
 (nrepl-notify msg type
   ;; Render stacktrace in *cider-error* buffer if it is a runtime error.
   (cider--render-stacktrace-causes
-   causes nil (member ex-phase (cider-clojure-compilation-error-phases)))
+   causes nil (member ex-phase (cider-clojure-compilation-error-phases))
+   (with-current-buffer source-buffer (cider-current-repl)))
   ;; If the error is a compilation error (which we normally don't show
   ;; *cider-error* buffer for), or the error buffer is disabled, compensate for
   ;; the lack of info with a overlay error. Verify that the provided buffer is



[nongnu] elpa/cider updated (9a28cbb5ee -> 340432f81b)

2025-04-10 Thread ELPA Syncer
elpasync pushed a change to branch elpa/cider.

  from  9a28cbb5ee [test] Temporarily pause testing on Emacs snapshot/master
   new  25792e699f Bump cider-nrepl to 0.55.0
   new  1f09098007 [stacktrace] Allow inspecting ex-data directly
   new  ddfc99b607 [stacktrace] Set cider--ancillary-buffer-repl for 
*cider-error*
   new  09c036dd29 [profile] Update to latest profiling middleware
   new  340432f81b [selector] Remove *cider-profiler* buffer and key for 
selecting it


Summary of changes:
 CHANGELOG.md   |   4 +-
 cider-eval.el  |  17 ++-
 cider-inspector.el |  20 ++--
 cider-mode.el  |  10 +-
 cider-profile.el   | 117 +++--
 cider-selector.el  |   5 -
 cider-stacktrace.el|  58 +++---
 cider.el   |   2 +-
 dev/docker-sample-project/project.clj  |   2 +-
 dev/tramp-sample-project/project.clj   |   2 +-
 .../assets/images/cider-stacktrace-inspect.gif | Bin 0 -> 1462061 bytes
 .../ROOT/pages/basics/middleware_setup.adoc|  10 +-
 doc/modules/ROOT/pages/basics/up_and_running.adoc  |   4 +-
 doc/modules/ROOT/pages/cljs/shadow-cljs.adoc   |   2 +-
 doc/modules/ROOT/pages/cljs/up_and_running.adoc|   2 +-
 .../ROOT/pages/config/syntax_highlighting.adoc |   2 +-
 doc/modules/ROOT/pages/debugging/profiling.adoc|  70 ++--
 .../ROOT/pages/usage/dealing_with_errors.adoc  |  15 +--
 doc/modules/ROOT/pages/usage/misc_features.adoc|   3 -
 test/cider-tests.el|  44 
 20 files changed, 167 insertions(+), 222 deletions(-)
 create mode 100644 doc/modules/ROOT/assets/images/cider-stacktrace-inspect.gif



[nongnu] elpa/cider 25792e699f 1/5: Bump cider-nrepl to 0.55.0

2025-04-10 Thread ELPA Syncer
branch: elpa/cider
commit 25792e699f9ce65e27cde2c44aa0f254d3d87dca
Author: Oleksandr Yakushev 
Commit: Oleksandr Yakushev 

Bump cider-nrepl to 0.55.0
---
 CHANGELOG.md   |  2 +-
 cider.el   |  2 +-
 dev/docker-sample-project/project.clj  |  2 +-
 dev/tramp-sample-project/project.clj   |  2 +-
 .../ROOT/pages/basics/middleware_setup.adoc| 10 ++---
 doc/modules/ROOT/pages/basics/up_and_running.adoc  |  4 +-
 doc/modules/ROOT/pages/cljs/shadow-cljs.adoc   |  2 +-
 doc/modules/ROOT/pages/cljs/up_and_running.adoc|  2 +-
 test/cider-tests.el| 44 +++---
 9 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 24a45f9244..12e0622680 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,7 +14,7 @@
 - [#3793](https://github.com/clojure-emacs/cider/issues/3793): **(Breaking)** 
Remove features that relied on printed exception parsing:
   - `cider-stacktrace-analyze-string` and `cider-stacktrace-analyze-at-point` 
functions.
   - Automatic stacktrace parsing in log viewer.
-- Bump the injected `cider-nrepl` to 
[0.54.0](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0540-2025-04-05).
+- Bump the injected `cider-nrepl` to 
[0.55.0](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0550-2025-04-10).
   - 
[compliment#122](https://github.com/alexander-yakushev/compliment/pull/122): 
Completion: sort candidates by priority.
   - Inspector: add dedicated view for Exceptions.
   - Stop vendoring Haystack dependency.
diff --git a/cider.el b/cider.el
index c1d292fcf5..c82d925930 100644
--- a/cider.el
+++ b/cider.el
@@ -573,7 +573,7 @@ the artifact.")
 
 Used when `cider-jack-in-auto-inject-clojure' is set to `latest'.")
 
-(defconst cider-required-middleware-version "0.54.0"
+(defconst cider-required-middleware-version "0.55.0"
   "The CIDER nREPL version that's known to work properly with CIDER.")
 
 (defcustom cider-injected-middleware-version cider-required-middleware-version
diff --git a/dev/docker-sample-project/project.clj 
b/dev/docker-sample-project/project.clj
index 550cf05dd4..06ec5d038a 100644
--- a/dev/docker-sample-project/project.clj
+++ b/dev/docker-sample-project/project.clj
@@ -2,4 +2,4 @@
   :dependencies [[org.clojure/clojure "1.11.1"]
  [clj-http "3.12.3"]]
   :source-paths ["src"]
-  :plugins [[cider/cider-nrepl "0.54.0"]])
+  :plugins [[cider/cider-nrepl "0.55.0"]])
diff --git a/dev/tramp-sample-project/project.clj 
b/dev/tramp-sample-project/project.clj
index aa2a1c93c3..031157ff4f 100644
--- a/dev/tramp-sample-project/project.clj
+++ b/dev/tramp-sample-project/project.clj
@@ -2,5 +2,5 @@
   :dependencies [[org.clojure/clojure "1.11.1"]
  [clj-http "3.12.3"]]
   :source-paths ["src"]
-  :plugins [[cider/cider-nrepl "0.54.0"]
+  :plugins [[cider/cider-nrepl "0.55.0"]
 [refactor-nrepl "3.9.0"]])
diff --git a/doc/modules/ROOT/pages/basics/middleware_setup.adoc 
b/doc/modules/ROOT/pages/basics/middleware_setup.adoc
index 611f52759c..bef3bcf80f 100644
--- a/doc/modules/ROOT/pages/basics/middleware_setup.adoc
+++ b/doc/modules/ROOT/pages/basics/middleware_setup.adoc
@@ -20,14 +20,14 @@ Use the convenient plugin for defaults, either in your 
project's
 
 [source,clojure]
 
-:plugins [[cider/cider-nrepl "0.54.0"]]
+:plugins [[cider/cider-nrepl "0.55.0"]]
 
 
 A minimal `profiles.clj` for CIDER would be:
 
 [source,clojure]
 
-{:repl {:plugins [[cider/cider-nrepl "0.54.0"]]}}
+{:repl {:plugins [[cider/cider-nrepl "0.55.0"]]}}
 
 
 WARNING: Be careful not to place this in the `:user` profile, as this way 
CIDER's
@@ -43,11 +43,11 @@ run `cider-connect` or `cider-connect-cljs`.
 
 [source,clojure]
 
-  :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.54.0"}}
+  :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.55.0"}}
   :main-opts ["-m" "nrepl.cmdline" "--middleware" 
"[cider.nrepl/cider-middleware]"]}
 
   :cider-cljs {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.339"}
-cider/cider-nrepl {:mvn/version "0.54.0"}
+cider/cider-nrepl {:mvn/version "0.55.0"}
 cider/piggieback {:mvn/version "0.6.0"}}
:main-opts ["-m" "nrepl.cmdline" "--middleware"

"[cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"]}
@@ -66,7 +66,7 @@ NOTE: Make sure you're using 
https://github.com/clojurephant/clojurephant[Clojur
 
 dependencies {
   devImplementation 'nrepl:nrepl:0.9.0'
-  devImplementation 'cider:cider-nrepl:0.54.0'
+  devImplementation 'cider:cider-nrepl:0.55.0'
 }
 
 tasks.named('clojureRepl') {
diff --git a/doc/modules/ROOT/pages/basics/up_and_running.adoc 
b/doc/modules/ROOT/pages/basics/up_and_running.adoc
index b4bbfaf22c..8

[nongnu] elpa/cider 09c036dd29 4/5: [profile] Update to latest profiling middleware

2025-04-10 Thread ELPA Syncer
branch: elpa/cider
commit 09c036dd29742f8e459d9fc3ee86e98b6a412f9f
Author: Oleksandr Yakushev 
Commit: Oleksandr Yakushev 

[profile] Update to latest profiling middleware
---
 CHANGELOG.md   |   1 +
 cider-mode.el  |  10 +-
 cider-profile.el   | 115 +++--
 .../ROOT/pages/config/syntax_highlighting.adoc |   2 +-
 doc/modules/ROOT/pages/debugging/profiling.adoc|  70 ++---
 5 files changed, 58 insertions(+), 140 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 084029458d..f3655d073f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -26,6 +26,7 @@
 - [#3789](https://github.com/clojure-emacs/cider/issues/3796): Completion: 
disable client-side sorting (defer to backend-provided candidate order).
 - [#3797](https://github.com/clojure-emacs/cider/issues/3797): Completion: 
enable `cider-completion-style` by default (this enables richer completion 
suggestions where candidates don't have to strictly match the prefix).
 - [#3803](https://github.com/clojure-emacs/cider/pull/3803): Enable dynamic 
indentation for `clojure-ts-mode`.
+- [#3805](https://github.com/clojure-emacs/cider/pull/3805): Profiler: update 
to latest profiling middleware.
 
 ### Bugs fixed
 
diff --git a/cider-mode.el b/cider-mode.el
index 3aee2d142a..b1cf700352 100644
--- a/cider-mode.el
+++ b/cider-mode.el
@@ -673,7 +673,7 @@ The result depends on the buffer CIDER connection type."
 (defface cider-traced-face
   'type graphic)) :box (:color "cyan" :line-width -1))
 (t :underline t :background "#066"))
-  "Face used to mark code being traced."
+  "Face used to mark functions being traced or profiled."
   :group 'cider
   :package-version '(cider . "0.11.0"))
 
@@ -805,11 +805,11 @@ with the given LIMIT."
   (push sym instrumented))
  (`"\"light-form\""
   (push sym enlightened)))
-   ;; The ::traced keywords can be inlined by MrAnderson, 
so
-   ;; we catch that case too.
;; FIXME: This matches values too, not just keys.
-   (when (seq-find (lambda (k) (and (stringp k)
-(string-match (rx 
"orchard.trace/traced" eos) k)))
+   (when (seq-find (lambda (k)
+ (and (stringp k)
+  (or (string= 
"orchard.trace/traced" k)
+  (string= 
"orchard.profile/profiled" k
meta)
  (push sym traced))
(when (and do-deprecated (nrepl-dict-get meta 
"deprecated"))
diff --git a/cider-profile.el b/cider-profile.el
index 3f38bda572..69a47d2944 100644
--- a/cider-profile.el
+++ b/cider-profile.el
@@ -28,6 +28,7 @@
 (require 'cider-client)
 (require 'cider-popup)
 (require 'cider-eval)
+(require 'cider-inspector)
 
 (defconst cider-profile-buffer "*cider-profile*")
 
@@ -37,16 +38,10 @@
 (define-key map (kbd "C-t") #'cider-profile-toggle)
 (define-key map (kbd "c") #'cider-profile-clear)
 (define-key map (kbd "C-c") #'cider-profile-clear)
-(define-key map (kbd "S") #'cider-profile-summary)
-(define-key map (kbd "C-S") #'cider-profile-summary)
-(define-key map (kbd "s") #'cider-profile-var-summary)
-(define-key map (kbd "C-s") #'cider-profile-var-summary)
+(define-key map (kbd "s") #'cider-profile-summary)
+(define-key map (kbd "C-s") #'cider-profile-summary)
 (define-key map (kbd "n") #'cider-profile-ns-toggle)
 (define-key map (kbd "C-n") #'cider-profile-ns-toggle)
-(define-key map (kbd "v") #'cider-profile-var-profiled-p)
-(define-key map (kbd "C-v") #'cider-profile-var-profiled-p)
-(define-key map (kbd "+") #'cider-profile-samples)
-(define-key map (kbd "C-+") #'cider-profile-samples)
 map)
   "CIDER profiler keymap.")
 
@@ -55,9 +50,6 @@
 ["Toggle var profiling" cider-profile-toggle]
 ["Toggle namespace profiling" cider-profile-ns-toggle]
 "--"
-["Display var profiling status" cider-profile-var-profiled-p]
-["Display max sample count" cider-profile-samples]
-["Display var summary" cider-profile-var-summary]
 ["Display summary" cider-profile-summary]
 ["Clear data" cider-profile-clear])
   "CIDER profiling submenu.")
@@ -69,52 +61,6 @@ Optional argument BUFFER defaults to current buffer."
   (nrepl-make-response-handler
(or buffer (current-buffer)) handler nil nil nil))
 
-;;;###autoload
-(defun cider-profile-samples (&optional query)
-  "Displays current max-sample-count.
-If optional QUERY is specified, set max-sample-count and display new value."
-  (interactive "P")
-  (cider-ensure-op-supported "set-max-samples")
-  (cider-ensure-op-supported "get-max-samples")
-  

[nongnu] elpa/cider 1f09098007 2/5: [stacktrace] Allow inspecting ex-data directly

2025-04-10 Thread ELPA Syncer
branch: elpa/cider
commit 1f090980079bbf4a0f3c12ec5d0453a2f7d9b792
Author: Oleksandr Yakushev 
Commit: Oleksandr Yakushev 

[stacktrace] Allow inspecting ex-data directly
---
 CHANGELOG.md   |   1 +
 cider-inspector.el |  20 ---
 cider-stacktrace.el|  58 +++--
 .../assets/images/cider-stacktrace-inspect.gif | Bin 0 -> 1462061 bytes
 .../ROOT/pages/usage/dealing_with_errors.adoc  |  15 +++---
 5 files changed, 62 insertions(+), 32 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 12e0622680..084029458d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,6 +21,7 @@
   - Stop vendoring Puget dependency. You can still use `puget` pretty-printer 
in CIDER, but you need to depend on Puget explicitly. If Puget is not found on 
the classpath, CIDER will revert to `clojure.pprint/pprint` for pretty-printing.
 - [#3777](https://github.com/clojure-emacs/cider/issues/3777): Inspector no 
longer displays parsed Javadoc for Java classes and members.
 - [#3790](https://github.com/clojure-emacs/cider/issues/3790): Stacktrace: 
show messages and data for all exception causes by default.
+- [#3807](https://github.com/clojure-emacs/cider/issues/3807): Stacktrace: 
make exception data individually inspectable.
 - [#3789](https://github.com/clojure-emacs/cider/issues/3789): Refactor and 
simplify exception handling.
 - [#3789](https://github.com/clojure-emacs/cider/issues/3796): Completion: 
disable client-side sorting (defer to backend-provided candidate order).
 - [#3797](https://github.com/clojure-emacs/cider/issues/3797): Completion: 
enable `cider-completion-style` by default (this enables richer completion 
suggestions where candidates don't have to strictly match the prefix).
diff --git a/cider-inspector.el b/cider-inspector.el
index 365bede3cb..705dd8ccb3 100644
--- a/cider-inspector.el
+++ b/cider-inspector.el
@@ -252,11 +252,17 @@ See `cider-sync-request:inspect-push' and 
`cider-inspector--render-value'"
   (push (point) cider-inspector-location-stack)
   (cider-inspector--render-value result :next-inspectable
 
-(defun cider-inspector-inspect-last-exception (index)
-  "Inspects the exception in the cause stack identified by INDEX."
+(defun cider-inspector-inspect-last-exception (index &optional ex-data)
+  "Inspects the exception in the cause stack identified by INDEX.
+If EX-DATA is true, inspect ex-data of the exception instead."
   (interactive)
   (cl-assert (numberp index))
-  (let ((result (cider-sync-request:inspect-last-exception index)))
+  (let ((result (cider-nrepl-send-sync-request
+ `("op" "inspect-last-exception"
+   "index" ,index
+   ,@(when ex-data
+   `("ex-data" "true")))
+ (cider-current-repl
 (when (nrepl-dict-get result "value")
   (setq cider-inspector-location-stack nil)
   (cider-inspector--render-value result :next-inspectable
@@ -423,14 +429,6 @@ current-namespace."
   (cider-nrepl-send-sync-request `("op" "inspect-previous-sibling")
  (cider-current-repl)))
 
-;;;###autoload
-(defun cider-sync-request:inspect-last-exception (index)
-  "Inspects the exception in the cause stack identified by INDEX."
-  (cl-assert (numberp index))
-  (cider-nrepl-send-sync-request `("op" "inspect-last-exception"
-   "index" ,index)
- (cider-current-repl)))
-
 (defun cider-sync-request:inspect-next-sibling ()
   "Inspect the next sibling value within a sequential parent."
   (cider-nrepl-send-sync-request `("op" "inspect-next-sibling")
diff --git a/cider-stacktrace.el b/cider-stacktrace.el
index 5686dc5e64..77ae4f938f 100644
--- a/cider-stacktrace.el
+++ b/cider-stacktrace.el
@@ -796,27 +796,48 @@ the NAME.  The whole group is prefixed by string INDENT."
 
 (declare-function cider-inspector-inspect-last-exception "cider-inspector")
 
-(defun cider-stacktrace--inspect-class (event)
-  "Mouse handler for EVENT."
+(defun cider-stacktrace--inspect-mouse (event &optional ex-data)
+  "Mouse handler for EVENT.
+If EX-DATA is true, inspect ex-data of the exception instead."
   (interactive "e")
   (let* ((pos (posn-point (event-end event)))
  (window (posn-window (event-end event)))
  (buffer (window-buffer window))
  (inspect-index (with-current-buffer buffer
   (get-text-property pos 'inspect-index
-(cider-inspector-inspect-last-exception inspect-index)))
+(cider-inspector-inspect-last-exception inspect-index ex-data)))
 
-(defun cider-stacktrace--inspect-class-kbd ()
-  "Keyboard handler."
+(defun cider-stacktrace--inspect-kbd (&optional ex-data)
+  "Keyboard handler.
+If EX-DATA is true, inspect ex-data of the exception instead."
   (interactive)
   (when-let ((inspect-index (get-text-property (point) 'i

[nongnu] elpa/cider 340432f81b 5/5: [selector] Remove *cider-profiler* buffer and key for selecting it

2025-04-10 Thread ELPA Syncer
branch: elpa/cider
commit 340432f81b40ed25b704e39b573e5314c528eeb8
Author: Oleksandr Yakushev 
Commit: Oleksandr Yakushev 

[selector] Remove *cider-profiler* buffer and key for selecting it
---
 cider-profile.el| 2 --
 cider-selector.el   | 5 -
 doc/modules/ROOT/pages/usage/misc_features.adoc | 3 ---
 3 files changed, 10 deletions(-)

diff --git a/cider-profile.el b/cider-profile.el
index 69a47d2944..da22b0075e 100644
--- a/cider-profile.el
+++ b/cider-profile.el
@@ -30,8 +30,6 @@
 (require 'cider-eval)
 (require 'cider-inspector)
 
-(defconst cider-profile-buffer "*cider-profile*")
-
 (defvar cider-profile-map
   (let ((map (define-prefix-command 'cider-profile-map)))
 (define-key map (kbd "t") #'cider-profile-toggle)
diff --git a/cider-selector.el b/cider-selector.el
index d53235c1c2..1a34e0f560 100644
--- a/cider-selector.el
+++ b/cider-selector.el
@@ -34,7 +34,6 @@
 (require 'cider-client)
 (require 'cider-eval)
 (require 'cider-scratch)
-(require 'cider-profile)
 
 (defconst cider-selector-help-buffer "*CIDER Selector Help*"
   "The name of the selector's help buffer.")
@@ -162,10 +161,6 @@ visited cider-repl-mode buffer."
   "*cider-error* buffer."
   cider-error-buffer)
 
-(def-cider-selector-method ?p
-  "*cider-profile* buffer."
-  cider-profile-buffer)
-
 (def-cider-selector-method ?d
   "*cider-doc* buffer."
   cider-doc-buffer)
diff --git a/doc/modules/ROOT/pages/usage/misc_features.adoc 
b/doc/modules/ROOT/pages/usage/misc_features.adoc
index dfceba105d..f601992e62 100644
--- a/doc/modules/ROOT/pages/usage/misc_features.adoc
+++ b/doc/modules/ROOT/pages/usage/misc_features.adoc
@@ -94,9 +94,6 @@ Here's a list of all of ``cider-selector``'s keybindings:
 | kbd:[d]
 | `+*cider-doc*+` buffer.
 
-| kbd:[p]
-| `+*cider-profile*+` buffer.
-
 | kbd:[s]
 | `+*cider-scratch*+` buffer.
 



[nongnu] elpa/clojure-ts-mode a0b01b2127: [#74] Add imenu support for keyword definitions

2025-04-10 Thread ELPA Syncer
branch: elpa/clojure-ts-mode
commit a0b01b212723dea772dd8c06932be0f9f66ea000
Author: Roman Rudakov 
Commit: Bozhidar Batsov 

[#74] Add imenu support for keyword definitions
---
 CHANGELOG.md   |  3 ++-
 README.md  | 13 ++
 clojure-ts-mode.el | 50 --
 test/clojure-ts-mode-imenu-test.el | 16 +---
 test/samples/spec.clj  |  7 ++
 5 files changed, 76 insertions(+), 13 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5f4517e232..0060edeb20 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,7 +18,8 @@
 - [#70](https://github.com/clojure-emacs/clojure-ts-mode/pull/70): Add support 
for nested indentation rules.
 - [#71](https://github.com/clojure-emacs/clojure-ts-mode/pull/71): Properly 
highlight function name in `letfn` form.
 - [#72](https://github.com/clojure-emacs/clojure-ts-mode/pull/72): Pass fully 
qualified symbol to `clojure-ts-get-indent-function`.
-- Improve performance of semantic indentation by caching rules.
+- [#76](https://github.com/clojure-emacs/clojure-ts-mode/pull/76): Improve 
performance of semantic indentation by caching rules.
+- [#74](https://github.com/clojure-emacs/clojure-ts-mode/issues/74): Add imenu 
support for keywords definitions.
 
 ## 0.2.3 (2025-03-04)
 
diff --git a/README.md b/README.md
index c9374aca84..af70b42999 100644
--- a/README.md
+++ b/README.md
@@ -275,6 +275,19 @@ Every new line in the docstrings is indented by
 `clojure-ts-docstring-fill-prefix-width` number of spaces (set to 2 by default
 which matches the `clojure-mode` settings).
 
+ imenu
+
+`clojure-ts-mode` supports various types of definition that can be navigated
+using `imenu`, such as:
+
+- namespace
+- function
+- macro
+- var
+- interface (forms such as `defprotocol`, `definterface` and `defmulti`)
+- class (forms such as `deftype`, `defrecord` and `defstruct`)
+- keyword (for example, spec definitions)
+
 ## Migrating to clojure-ts-mode
 
 If you are migrating to `clojure-ts-mode` note that `clojure-mode` is still 
required for cider and clj-refactor packages to work properly.
diff --git a/clojure-ts-mode.el b/clojure-ts-mode.el
index cb71cb9259..96582346b9 100644
--- a/clojure-ts-mode.el
+++ b/clojure-ts-mode.el
@@ -637,17 +637,33 @@ See `clojure-ts--definition-node-p' when an exact match 
is possible."
   (and
(clojure-ts--list-node-p node)
(let* ((child (clojure-ts--node-child-skip-metadata node 0))
-  (child-txt (clojure-ts--named-node-text child)))
+  (child-txt (clojure-ts--named-node-text child))
+  (name-sym (clojure-ts--node-child-skip-metadata node 1)))
  (and (clojure-ts--symbol-node-p child)
+  (clojure-ts--symbol-node-p name-sym)
   (string-match-p definition-type-regexp child-txt)
 
+(defun clojure-ts--kwd-definition-node-match-p (node)
+  "Return non-nil if the NODE is a keyword definition."
+  (and (clojure-ts--list-node-p node)
+   (let* ((child (clojure-ts--node-child-skip-metadata node 0))
+  (child-txt (clojure-ts--named-node-text child))
+  (child-ns (clojure-ts--node-namespace-text child))
+  (name-kwd (clojure-ts--node-child-skip-metadata node 1)))
+ (and child-ns
+  (clojure-ts--symbol-node-p child)
+  (clojure-ts--keyword-node-p name-kwd)
+  (string-equal child-txt "def")
+
 (defun clojure-ts--standard-definition-node-name (node)
   "Return the definition name for the given NODE.
-Returns nil if NODE is not a list with symbols as the first two children.
-For example the node representing the expression (def foo 1) would return foo.
-The node representing (ns user) would return user.
-Does not does any matching on the first symbol (def, defn, etc), so identifying
-that a node is a definition is intended to be done elsewhere.
+
+Returns nil if NODE is not a list with symbols as the first two
+children.  For example the node representing the expression (def foo 1)
+would return foo.  The node representing (ns user) would return user.
+Does not do any matching on the first symbol (def, defn, etc), so
+identifying that a node is a definition is intended to be done
+elsewhere.
 
 Can be called directly, but intended for use as `treesit-defun-name-function'."
   (when (and (clojure-ts--list-node-p node)
@@ -663,6 +679,21 @@ Can be called directly, but intended for use as 
`treesit-defun-name-function'."
   (concat (treesit-node-text ns) "/" (treesit-node-text name))
 (treesit-node-text name)))
 
+(defun clojure-ts--kwd-definition-node-name (node)
+  "Return the keyword name for the given NODE.
+
+Returns nil if NODE is not a list where the first element is a symbol
+and the second is a keyword.  For example, a node representing the
+expression (s/def ::foo int?) would return foo.
+
+Can be called directly, but intended for use as
+`treesit-defun-name-function'."
+  (w

[elpa] externals/modus-themes 4c82e40fb4 3/3: Refine the value of bg-hover-secondary in most themes

2025-04-10 Thread ELPA Syncer
branch: externals/modus-themes
commit 4c82e40fb4b42ef6b6c29f813336749dbf6bbb37
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Refine the value of bg-hover-secondary in most themes
---
 modus-operandi-deuteranopia-theme.el | 2 +-
 modus-operandi-tinted-theme.el   | 2 +-
 modus-operandi-tritanopia-theme.el   | 2 +-
 modus-vivendi-deuteranopia-theme.el  | 2 +-
 modus-vivendi-tinted-theme.el| 2 +-
 modus-vivendi-tritanopia-theme.el| 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/modus-operandi-deuteranopia-theme.el 
b/modus-operandi-deuteranopia-theme.el
index b690f64841..00b98dcfb8 100644
--- a/modus-operandi-deuteranopia-theme.el
+++ b/modus-operandi-deuteranopia-theme.el
@@ -167,7 +167,7 @@ standard)."
 
   (bg-completion   "#c0deff")
   (bg-hover"#b2e4dc")
-  (bg-hover-secondary  "#f5d0a0")
+  (bg-hover-secondary  "#e5d7a0")
   (bg-hl-line  "#dae5ec")
   (bg-region   "#bdbdbd")
   (fg-region   "#00")
diff --git a/modus-operandi-tinted-theme.el b/modus-operandi-tinted-theme.el
index a0256fb1ff..eb4bad42ee 100644
--- a/modus-operandi-tinted-theme.el
+++ b/modus-operandi-tinted-theme.el
@@ -165,7 +165,7 @@ which corresponds to a minimum contrast in relative 
luminance of
 
   (bg-completion   "#f0c1cf")
   (bg-hover"#b2e4dc")
-  (bg-hover-secondary  "#f5d0a0")
+  (bg-hover-secondary  "#dfe09f")
   (bg-hl-line  "#f1d5d0")
   (bg-region   "#c2bcb5")
   (fg-region   "#00")
diff --git a/modus-operandi-tritanopia-theme.el 
b/modus-operandi-tritanopia-theme.el
index e21b0d1522..8638d201d7 100644
--- a/modus-operandi-tritanopia-theme.el
+++ b/modus-operandi-tritanopia-theme.el
@@ -167,7 +167,7 @@ standard)."
 
   (bg-completion   "#afdfef")
   (bg-hover"#ffafbc")
-  (bg-hover-secondary  "#9fdfff")
+  (bg-hover-secondary  "#abdfdd")
   (bg-hl-line  "#dfeaec")
   (bg-region   "#bdbdbd")
   (fg-region   "#00")
diff --git a/modus-vivendi-deuteranopia-theme.el 
b/modus-vivendi-deuteranopia-theme.el
index 4f5cdf0847..676432f853 100644
--- a/modus-vivendi-deuteranopia-theme.el
+++ b/modus-vivendi-deuteranopia-theme.el
@@ -167,7 +167,7 @@ standard)."
 
   (bg-completion   "#2f447f")
   (bg-hover"#45605e")
-  (bg-hover-secondary  "#654a39")
+  (bg-hover-secondary  "#604c30")
   (bg-hl-line  "#2f3849")
   (bg-region   "#5a5a5a")
   (fg-region   "#ff")
diff --git a/modus-vivendi-tinted-theme.el b/modus-vivendi-tinted-theme.el
index 026b948a72..0d89099627 100644
--- a/modus-vivendi-tinted-theme.el
+++ b/modus-vivendi-tinted-theme.el
@@ -165,7 +165,7 @@ which corresponds to a minimum contrast in relative 
luminance of
 
   (bg-completion   "#483d8a")
   (bg-hover"#45605e")
-  (bg-hover-secondary  "#654a39")
+  (bg-hover-secondary  "#64404f")
   (bg-hl-line  "#303a6f")
   (bg-region   "#555a66")
   (fg-region   "#ff")
diff --git a/modus-vivendi-tritanopia-theme.el 
b/modus-vivendi-tritanopia-theme.el
index 0b7383a974..7929c69e31 100644
--- a/modus-vivendi-tritanopia-theme.el
+++ b/modus-vivendi-tritanopia-theme.el
@@ -167,7 +167,7 @@ standard)."
 
   (bg-completion   "#004253")
   (bg-hover"#8e3e3b")
-  (bg-hover-secondary  "#00405f")
+  (bg-hover-secondary  "#204853")
   (bg-hl-line  "#2f3849")
   (bg-region   "#5a5a5a")
   (fg-region   "#ff")



[nongnu] elpa/cider 9a28cbb5ee: [test] Temporarily pause testing on Emacs snapshot/master

2025-04-10 Thread ELPA Syncer
branch: elpa/cider
commit 9a28cbb5eec157608a109ee50d815e4c75eb3842
Author: Oleksandr Yakushev 
Commit: Oleksandr Yakushev 

[test] Temporarily pause testing on Emacs snapshot/master
---
 .circleci/config.yml   | 9 +
 .github/workflows/test.yml | 4 +++-
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/.circleci/config.yml b/.circleci/config.yml
index d1e6dc55a8..6c041601df 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -150,10 +150,11 @@ workflows:
   requires:
 - test-lint
 - test-shellcheck
-  - test-ubuntu-emacs-master:
-  requires:
-- test-lint
-- test-shellcheck
+  # TODO: reenable once this issue is fixed 
https://app.circleci.com/pipelines/github/clojure-emacs/cider/2931/workflows/b7284759-c6d1-44dd-bbfc-e71709e3f62f/jobs/17699
+  # - test-ubuntu-emacs-master:
+  # requires:
+  #   - test-lint
+  #   - test-shellcheck
   - test-windows-emacs-latest:
   requires:
 - test-lint
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index c8e729f351..4009ac7186 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -23,7 +23,9 @@ jobs:
   matrix:
 # Test all Emacs versions on Ubuntu.
 os: [ubuntu-latest]
-emacs_version: ['27.2', '28.2', '29.3', '30.1', 'snapshot']
+# TODO: reenable snapshot once this is fixed 
https://app.circleci.com/pipelines/github/clojure-emacs/cider/2931/workflows/b7284759-c6d1-44dd-bbfc-e71709e3f62f/jobs/17699
+# emacs_version: ['27.2', '28.2', '29.3', '30.1', 'snapshot']
+emacs_version: ['27.2', '28.2', '29.3', '30.1']
 java_version: ['21']
 include:
   # For other OSes, test only the latest stable Emacs version.



[elpa] externals/modus-themes updated (c98df7220b -> 4c82e40fb4)

2025-04-10 Thread ELPA Syncer
elpasync pushed a change to branch externals/modus-themes.

  from  c98df7220b Tweak the value of 'yellow-cooler' in 
modus-operandi-tinted
   new  e520baff18 Tweak the value of modus-vivendi-tinted 'green-warmer'
   new  6725de0b9f Further tweak the value of modus-vivendi-tinted 
'green-warmer'
   new  4c82e40fb4 Refine the value of bg-hover-secondary in most themes


Summary of changes:
 modus-operandi-deuteranopia-theme.el | 2 +-
 modus-operandi-tinted-theme.el   | 2 +-
 modus-operandi-tritanopia-theme.el   | 2 +-
 modus-vivendi-deuteranopia-theme.el  | 2 +-
 modus-vivendi-tinted-theme.el| 4 ++--
 modus-vivendi-tritanopia-theme.el| 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)



[elpa] externals/beframe 71d1575a7e: Make stylistic changes to beframe--read-buffer-p

2025-04-10 Thread ELPA Syncer
branch: externals/beframe
commit 71d1575a7ea8f41d1eba20a7232bfe6e2204da3f
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Make stylistic changes to beframe--read-buffer-p
---
 beframe.el | 19 +--
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/beframe.el b/beframe.el
index df33e42b72..2903c3295f 100644
--- a/beframe.el
+++ b/beframe.el
@@ -251,16 +251,15 @@ more information."
   'beframe-buffer-names
   "0.2.0")
 
-(defun beframe--read-buffer-p (buf &optional frame)
-  "Return non-nil if BUF belongs to the current FRAME.
-BUF is a string or a cons cell, per `beframe-read-buffer'.
-If optional FRAME is nil, then default to the current one.  Else
-it must satisfy `framep'."
-  (let ((b buf))
-(when (consp buf)
-  (setq b (car buf)))
-(unless (string-prefix-p " " b)
-  (seq-contains-p (beframe-buffer-names frame) b
+(defun beframe--read-buffer-p (buffer &optional frame)
+  "Return non-nil if BUFFER belongs to the current FRAME.
+BUFFER is a string or a cons cell, per `beframe-read-buffer'.  If
+optional FRAME is nil, then default to the current one.  Else FRAME is
+an object that satisfies `framep'."
+  (when (consp buffer)
+(setq buffer (car buffer)))
+  (unless (string-prefix-p " " buffer)
+(seq-contains-p (beframe-buffer-names frame) buffer)))
 
 (defvar beframe-history nil
   "Minibuffer history of frame specific buffers.")



[nongnu] elpa/xah-fly-keys 7b6b480626: xah-insert-date now use ido-completing-read instead completing-read. because the latter does not work when recorded as key macro, with fido-vertical-mode on.

2025-04-10 Thread ELPA Syncer
branch: elpa/xah-fly-keys
commit 7b6b480626e03d008f50ff73dd60f592c7c7d6ed
Author: Xah Lee 
Commit: Xah Lee 

xah-insert-date now use ido-completing-read instead completing-read. 
because the latter does not work when recorded as key macro, with 
fido-vertical-mode on.
---
 xah-fly-keys.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/xah-fly-keys.el b/xah-fly-keys.el
index 052112e650..d2779a0639 100644
--- a/xah-fly-keys.el
+++ b/xah-fly-keys.el
@@ -4,7 +4,7 @@
 
 ;; Author: Xah Lee ( http://xahlee.info/ )
 ;; Maintainer: Xah Lee 
-;; Version: 26.11.20250405204855
+;; Version: 26.11.20250409222002
 ;; Created: 2013-09-10
 ;; Package-Requires: ((emacs "28.3"))
 ;; Keywords: convenience, vi, vim, ergoemacs, keybinding
@@ -154,6 +154,7 @@
 (require 'dired)
 (require 'dired-x)
 (require 'seq)
+(require 'ido)
 
 ;; --
 
@@ -1729,7 +1730,7 @@ Version: 2025-03-07"
 (setq xstyle
   (if current-prefix-arg
   (let ((completion-ignore-case t))
-(completing-read "Style:" xmenu nil t nil nil (caar xmenu)))
+(ido-completing-read "Style:" xmenu nil t))
 (caar xmenu)))
 (when (region-active-p) (delete-region (region-beginning) (region-end)))
 (insert (eval (cdr (assoc xstyle xmenu))



[nongnu] elpa/clojure-ts-mode 897659a309: Improve performance of semantic indentation by caching rules

2025-04-10 Thread ELPA Syncer
branch: elpa/clojure-ts-mode
commit 897659a3098c8e56585890f312f87f14598b9c28
Author: Roman Rudakov 
Commit: Bozhidar Batsov 

Improve performance of semantic indentation by caching rules
---
 CHANGELOG.md   |  1 +
 README.md  | 18 +++
 clojure-ts-mode.el | 94 --
 3 files changed, 89 insertions(+), 24 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 21353310b3..5f4517e232 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,7 @@
 - [#70](https://github.com/clojure-emacs/clojure-ts-mode/pull/70): Add support 
for nested indentation rules.
 - [#71](https://github.com/clojure-emacs/clojure-ts-mode/pull/71): Properly 
highlight function name in `letfn` form.
 - [#72](https://github.com/clojure-emacs/clojure-ts-mode/pull/72): Pass fully 
qualified symbol to `clojure-ts-get-indent-function`.
+- Improve performance of semantic indentation by caching rules.
 
 ## 0.2.3 (2025-03-04)
 
diff --git a/README.md b/README.md
index cad93f35aa..c9374aca84 100644
--- a/README.md
+++ b/README.md
@@ -210,6 +210,24 @@ For example:
 - `defn` and `fn` have a rule `((:inner 0))`.
 - `letfn` has a rule `((:block 1) (:inner 2 0))`.
 
+Note that `clojure-ts-semantic-indent-rules` should be set using the
+customization interface or `setopt`; otherwise, it will not be applied
+correctly.
+
+ Project local indentation
+
+Custom indentation rules can be set for individual projects. To achieve this,
+you need to create a `.dir-locals.el` file in the project root. The content
+should look like:
+
+```emacs-lisp
+((clojure-ts-mode . ((clojure-ts-semantic-indent-rules . (("with-transaction" 
. ((:block 1)))
+  ("with-retry" . 
((:block 1
+```
+
+In order to apply directory-local variables to existing buffers, they must be
+reverted.
+
 ### Font Locking
 
 To highlight entire rich `comment` expression with the comment font face, set
diff --git a/clojure-ts-mode.el b/clojure-ts-mode.el
index a8450bc41a..cb71cb9259 100644
--- a/clojure-ts-mode.el
+++ b/clojure-ts-mode.el
@@ -125,26 +125,6 @@ double quotes on the third column."
   :type 'boolean
   :package-version '(clojure-ts-mode . "0.3"))
 
-(defcustom clojure-ts-semantic-indent-rules nil
-  "Custom rules to extend default indentation rules for `semantic' style.
-
-Each rule is an alist entry which looks like `(\"symbol-name\"
-. (rule-type rule-value))', where rule-type is one either `:block' or
-`:inner' and rule-value is an integer.  The semantic is similar to
-cljfmt indentation rules.
-
-Default set of rules is defined in
-`clojure-ts--semantic-indent-rules-defaults'."
-  :safe #'listp
-  :type '(alist :key-type string
-:value-type (repeat (choice (list (choice (const :tag "Block 
indentation rule" :block)
-  (const :tag "Inner 
indentation rule" :inner))
-  integer)
-(list (const :tag "Inner 
indentation rule" :inner)
-  integer
-  integer
-  :package-version '(clojure-ts-mode . "0.3"))
-
 (defvar clojure-ts-mode-remappings
   '((clojure-mode . clojure-ts-mode)
 (clojurescript-mode . clojure-ts-clojurescript-mode)
@@ -864,6 +844,61 @@ The format reflects cljfmt indentation rules.  All the 
default rules are
 aligned with
 
https://github.com/weavejester/cljfmt/blob/0.13.0/cljfmt/resources/cljfmt/indents/clojure.clj";)
 
+(defvar-local clojure-ts--semantic-indent-rules-cache nil)
+
+(defun clojure-ts--compute-semantic-indentation-rules-cache (rules)
+  "Compute the combined semantic indentation rules cache.
+
+If RULES are not provided, this function computes the union of
+`clojure-ts-semantic-indent-rules' and
+`clojure-ts--semantic-indent-rules-defaults', prioritizing user-defined
+rules.  If RULES are provided, this function uses them instead of
+`clojure-ts-semantic-indent-rules'.
+
+This function is called when the `clojure-ts-semantic-indent-rules'
+variable is customized using setopt or the Emacs customization
+interface.  It is also called when file-local variables are updated.
+This ensures that updated indentation rules are always precalculated."
+  (seq-union rules
+ clojure-ts--semantic-indent-rules-defaults
+ (lambda (e1 e2) (equal (car e1) (car e2)
+
+(defun clojure-ts--set-semantic-indent-rules (symbol value)
+  "Setter function for `clojure-ts-semantic-indent-rules' variable.
+
+Sets SYMBOL's top-level default value to VALUE and updates the
+`clojure-ts--semantic-indent-rules-cache' in all `clojure-ts-mode'
+buffers, if any exist.
+
+NOTE: This function is not meant to be called directly."
+  (set-default-toplevel-value symbol value)
+  ;; Update cache in every `clojure-ts-mode' buffer.
+  (let ((new-cache (clojure-ts--com

[nongnu] elpa/helm updated (c5f055826a -> fc5bb8169b)

2025-04-10 Thread ELPA Syncer
elpasync pushed a change to branch elpa/helm.

  from  c5f055826a Fix quoting in more lambdas
   new  af50563801 Remove bookmark-set from HFF bmks actions
   new  39f79875bf Only docstring
   new  de6775100e Fix helm-dim-prompt-face
   new  fc5bb8169b Fix helm-tooltip face for tty


Summary of changes:
 helm-bookmark.el | 3 ++-
 helm-core.el | 8 +---
 helm-utils.el| 5 +++--
 3 files changed, 10 insertions(+), 6 deletions(-)



[elpa] externals/modus-themes e520baff18 1/3: Tweak the value of modus-vivendi-tinted 'green-warmer'

2025-04-10 Thread ELPA Syncer
branch: externals/modus-themes
commit e520baff18854ef81745269e317a0a0d4a736c0e
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Tweak the value of modus-vivendi-tinted 'green-warmer'
---
 modus-vivendi-tinted-theme.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modus-vivendi-tinted-theme.el b/modus-vivendi-tinted-theme.el
index aac6ee3027..ef61f64881 100644
--- a/modus-vivendi-tinted-theme.el
+++ b/modus-vivendi-tinted-theme.el
@@ -74,7 +74,7 @@ which corresponds to a minimum contrast in relative luminance 
of
   (red-faint   "#ef8386")
   (red-intense "#ff5f5f")
   (green   "#44bc44")
-  (green-warmer"#75d027")
+  (green-warmer"#75ca27")
   (green-cooler"#00c06f")
   (green-faint "#88ca9f")
   (green-intense   "#44df44")



[elpa] externals/org-mathsheet b67bef9419 14/18: Moved examples into subdir

2025-04-10 Thread ELPA Syncer
branch: externals/org-mathsheet
commit b67bef941903f3f5339336a48655263e41febd8c
Author: Ian Martins 
Commit: Ian Martins 

Moved examples into subdir
---
 README.md   |  913 ++--
 add-sub-1.pdf => examples/add-sub-1.pdf |  Bin
 algebra-1.pdf => examples/algebra-1.pdf |  Bin
 example.org => examples/example.org |0
 mathsheet.org   |   33 +-
 readme.md   | 1152 ---
 6 files changed, 865 insertions(+), 1233 deletions(-)

diff --git a/README.md b/README.md
index f4a692b285..9b3380e65e 100644
--- a/README.md
+++ b/README.md
@@ -1,93 +1,862 @@
-# org-mathsheet
 
 
+# Overview
 
-## Getting started
 
-To make it easy for you to get started with GitLab, here's a list of 
recommended next steps.
-
-Already a pro? Just edit this README.md and make it your own. Want to make it 
easy? [Use the template at the bottom](#editing-this-readme)!
-
-## Add your files
-
-- [ ] 
[Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file)
 or 
[upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file)
 files
-- [ ] [Add files using the command 
line](https://docs.gitlab.com/topics/git/add_files/#add-files-to-a-git-repository)
 or push an existing Git repository with the following command:
-
-```
-cd existing_repo
-git remote add origin https://gitlab.com/ianxm/org-mathsheet.git
-git branch -M main
-git push -uf origin main
-```
-
-## Integrate with your tools
-
-- [ ] [Set up project 
integrations](https://gitlab.com/ianxm/org-mathsheet/-/settings/integrations)
-
-## Collaborate with your team
-
-- [ ] [Invite team members and 
collaborators](https://docs.gitlab.com/ee/user/project/members/)
-- [ ] [Create a new merge 
request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
-- [ ] [Automatically close issues from merge 
requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
-- [ ] [Enable merge request 
approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
-- [ ] [Set 
auto-merge](https://docs.gitlab.com/user/project/merge_requests/auto_merge/)
+## Description
 
-## Test and Deploy
+This is a math worksheet generator. The worksheets are randomly
+generated based on templates that define what kinds of problems to
+include along with the order and relative frequency that each type of
+problem should appear on the worksheet.
 
-Use the built-in continuous integration in GitLab.
 
-- [ ] [Get started with GitLab 
CI/CD](https://docs.gitlab.com/ee/ci/quick_start/)
-- [ ] [Analyze your code for known vulnerabilities with Static Application 
Security Testing 
(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
-- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto 
Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
-- [ ] [Use pull-based deployments for improved Kubernetes 
management](https://docs.gitlab.com/ee/user/clusters/agent/)
-- [ ] [Set up protected 
environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
+## Audience
 
-***
+This could be useful for anyone that wants to provide math practice to
+someone else. It could be useful for a teacher, tutor, homeschooling
+parent, or any parent.
 
-# Editing this README
 
-When you're ready to make this README your own, just edit this file and use 
the handy template below (or feel free to structure it however you want - this 
is just a starting point!). Thanks to 
[makeareadme.com](https://www.makeareadme.com/) for this template.
+## Examples
 
-## Suggestions for a good README
+Here are some example worksheets generated by this tool:
 
-Every project is different, so consider which of these sections apply to 
yours. The sections used in the template are suggestions for most open source 
projects. Also keep in mind that while a README can be too long and detailed, 
too long is better than too short. If you think your README is too long, 
consider utilizing another form of documentation rather than cutting out 
information.
+1.  [arithmetic](examples/add-sub-1.pdf)
+2.  [algebra](examples/algebra-1.pdf)
 
-## Name
-Choose a self-explaining name for your project.
+They were generated using [this configuration](examples/example.md).
 
-## Description
-Let people know what your project can do specifically. Provide context and add 
a link to any reference visitors might be unfamiliar with. A list of Features 
or a Background subsection can also be added here. If there are alternatives to 
your project, this is a good place to list differentiating factors.
 
-## Badges
-On some READMEs, you may see small images that convey metadata, such as 
whether or not all the tests are passing for the project. You can use Shields 
to add some to your README. Many services also have instructions for adding a 
ba

[elpa] externals/org-mathsheet d211483197 18/18: Set package dependencies, fix import warnings, and some minor changes

2025-04-10 Thread ELPA Syncer
branch: externals/org-mathsheet
commit d21148319761192b5761e93da7f932d956816c26
Author: Ian Martins 
Commit: Ian Martins 

Set package dependencies, fix import warnings, and some minor changes
---
 README.md| 142 ---
 mathsheet.org|  61 ++--
 org-mathsheet.el |  43 ++---
 3 files changed, 155 insertions(+), 91 deletions(-)

diff --git a/README.md b/README.md
index 705829085b..028a50b37f 100644
--- a/README.md
+++ b/README.md
@@ -126,7 +126,7 @@ Both are described in detail below.
 a worksheet, each worksheet is configured with a set of templates in a
 templates table. For example
 
-
+
 
 
 
@@ -184,7 +184,7 @@ Both are described in detail below.
 
 Here is another example template table.
 
-
+
 
 
 
@@ -289,6 +289,10 @@ Both are described in detail below.
 
 This is the standard emacs package header.
 
+`emacs 26` is needed for `seq-random-elt`.  `calc` is used to solve the
+problems as well as converting them to mathematical notation in LaTeX
+format.
+
 ;;; org-mathsheet.el --- Generate dynamic math worksheets  -*- 
lexical-binding:t -*-
 
 ;; Copyright (C) 2025 Free Software Foundation, Inc.
@@ -297,7 +301,9 @@ This is the standard emacs package header.
 ;; Keywords: tools, education, math
 ;; Homepage: https://gitlab.com/ianxm/org-mathsheet
 ;; Version: 1.0
-;; Package-Requires: ((peg "1.0"))
+;; Package-Requires: ((peg "1.0")
+;;(emacs "26.0")
+;;calc)
 
 ;; This file is not part of GNU Emacs.
 
@@ -326,9 +332,16 @@ This is the standard emacs package header.
 
 ### Dependencies
 
-This package needs [peg](https://elpa.gnu.org/packages/peg.html).
+This package needs [peg](https://elpa.gnu.org/packages/peg.html). We also need 
[calc](https://www.gnu.org/software/emacs/manual/html_mono/calc.html) and some 
[org-table](https://orgmode.org/manual/Tables.html) and
+[org-babel](https://orgmode.org/org.html#Working-with-Source-Code) functions.
 
 (require 'peg)
+(require 'calc)
+
+(declare-function math-read-expr "calc-ext")
+(declare-function org-table-align "org-table")
+(declare-function org-table-to-lisp "org-table")
+(declare-function org-babel-named-data-regexp-for-name "ob-core")
 
 
 ### Variables
@@ -340,10 +353,10 @@ worksheet, which is defined in a LaTeX source block 
below. This
 assigns the constant directly to that named block.
 
 (defvar org-mathsheet--var-list '()
-  "List of variables used in a problem")
+  "List of variables used in a problem.")
 
 (defconst org-mathsheet--worksheet-template page
-  "LaTeX template for the worksheet")
+  "LaTeX template for the worksheet.")
 
 
 ### Scan problem
@@ -388,11 +401,11 @@ of `open-fields`.
   "Scan a problem.
 
 This parses the problem and produces a list containing info about
-its fields. For each field it returns a list containing:
+its fields.  For each field it returns a list containing:
 1. a symbol for the assigned variable or a unique placeholder
 2. a list of variables this field depends on
 3. a cons containing start and end markers for the field in the current 
buffer
-4. `nil' which is used by `dfs-visit' later"
+4. nil which is used by `dfs-visit' later"
   (let ((field-index 0)
 open-fields ; stack
 closed-fields ; list
@@ -439,7 +452,7 @@ of `open-fields`.
  (symbol (or "." "," "+" "-" "*" "/" "^" "(" ")" "=")))
 
   (peg-run (peg stuff)
-   (lambda (x) (message "failed %s" x))
+   (lambda (x) (message "Failed %s" x))
(lambda (x)
  (funcall x)
  `((:fields . ,closed-fields)
@@ -471,8 +484,8 @@ both places to keep them synced.
   "Reduce the field to a number.
 
 Parse the field again, replacing spans with random numbers and
-evaluating arithmetic operations. The field shouldn't have any
-internal fields so this should result in a single number. Return
+evaluating arithmetic operations.  The field shouldn't have any
+internal fields so this should result in a single number.  Return
 that number."
   (with-peg-rules
   ((field "[" space (or math-func expression sequence assignment 
value) space "]")
@@ -502,7 +515,7 @@ both places to keep them synced.
(var-lhs (substring letter)) ; var for assignment
(var-rhs "$" (substring letter) ; var for use
 `(v -- (let ((val (alist-get (intern v) 
org-mathsheet--var-list)))
- (or val (error "var %s not set" v)
+ (or val (error "Var %s not set" v)
(math-func (substring (or "sqrt" "sin" "cos" "tan" "asin" "acos" 
"atan" "floor" "ceil" "round"))

[elpa] externals/org-mathsheet 0038935262 02/18: initial

2025-04-10 Thread ELPA Syncer
branch: externals/org-mathsheet
commit 0038935262b0b34a52fd8cc27b2bb925dbb43607
Author: Ian Martins 
Commit: Ian Martins 

initial
---
 mathsheet.org | 159 ++
 1 file changed, 159 insertions(+)

diff --git a/mathsheet.org b/mathsheet.org
new file mode 100644
index 00..f290b37773
--- /dev/null
+++ b/mathsheet.org
@@ -0,0 +1,159 @@
+* goal
+the goal is to generate a math practice sheet.
+* script
+** vars
+#+property: header-args+ :var student="Noble" problem-count=24
+
+** problem sets
+*** add and subtract
+TODO support "var c in [b 5]"
+
+#+name: first-set
+#+begin_example
+var a in [1 10]
+var b in [0 10]
+var c in [1 5]
+var d in [0 15]
+problem weight 3 order 1 "a + b"
+problem weight 2 order 1 "a + d"
+problem weight 1 order 2 "a + b + c"
+problem weight 1 order 3 "a + c - b"
+#+end_example
+
+** generate problem set from template
+
+#+name: problem-set
+#+begin_src elisp :noweb yes :var template=first-set
+  (let (prob ret)
+(dotimes (index problem-count ret)
+  (setq prob
+<>)
+  (setq ret (push (list (car prob) (cdr prob)) ret 
+#+end_src
+
+
+#+name: one-problem
+#+begin_src elisp :var template=first-set
+  (let (vars probs prob weight order answ)
+;; parse input
+(dolist (line (split-string template "\n"))
+  (pcase (read (concat "(" line ")"))
+(`(var ,name in [,min ,max])
+ ;; assign vars
+ (push (cons name (+ (random (- max min -1)) min)) vars))
+((and
+  (pred (lambda (x) (eq 'problem (car x
+  `(problem weight ,weight order ,order ,prob))
+ ;; save problems
+ (push (cons prob weight)
+   probs
+;; choose problem given weights
+(let ((tot (reduce
+(lambda (tot prob) (+ tot (cdr prob)))
+probs
+:initial-value 0))
+  indx chosen-prob)
+  (setq indx (random tot)
+chosen-prob (reduce
+ (lambda (rem prob)
+   (cond
+((not (numberp rem)) rem)
+((> rem 0) (setq rem (- rem (cdr prob))) (if (> 
rem 0) rem (car prob)))
+(t (car prob
+ probs
+ :initial-value indx))
+  ;; do replacements
+  (dolist (var vars)
+(setq chosen-prob (replace-regexp-in-string
+   (symbol-name (car var))
+   (number-to-string (cdr var))
+   chosen-prob)))
+  ;; calculate answer
+  (setq answ (calc-eval chosen-prob))
+
+  (cons chosen-prob answ)))
+#+end_src
+
+#+RESULTS: one-problem
+: (7 + 8 . 15)
+
+** lay out problems and answers
+this generates a problem set.
+
+#+name: layout-problems-answers
+#+begin_src elisp :results silent :noweb yes :var problem-set=problem-set 
problemsp='t
+  (with-temp-buffer
+  (dolist (row problem-set)
+(if problemsp
+(insert (format"\\CircledItem %s = 
\\rule[-.2\\baselineskip]{2cm}{0.4pt}\n\n"
+   (car row)))
+  (insert (format "\\CircledItem %s\n\n"
+  (cadr row)
+(buffer-string))
+#+end_src
+
+** lay out page
+this wraps the problems with a tex header and footer.
+
+solution for how to enumerate with circled numbers from 
[[https://latex.org/forum/viewtopic.php?p=40006&sid=d202f756313add2391c3140fbeafe2ff#p40006][here]]
+
+#+name: page
+#+begin_src latex :results value silent :noweb yes
+  \documentclass[12pt]{article}
+  \usepackage[top=1in, bottom=0.8in, left=0.8in, right=0.8in]{geometry}
+  \usepackage{fancyhdr}
+  \newsavebox{\myheadbox}% Heading storage box
+  \usepackage{multicol}
+  \usepackage{rotating}
+  \usepackage{xcolor}
+  \usepackage{enumitem}
+  \usepackage{tikz}
+  \newcommand*\circled[1]{%
+\tikz[baseline=(C.base)]\node[draw,circle,inner sep=1.2pt,line 
width=0.2mm,](C) {#1};}
+  \newcommand*\CircledItem{%
+\stepcounter{enumi}\item[\circled{\theenumi}]}
+
+  \pagestyle{fancy}
+  \lhead{\textmd{\textsf{Name: student}}}
+  \rhead{\textmd{\textsf{Date: \today}}}
+  \cfoot{}
+
+  \renewcommand{\familydefault}{\ttdefault}
+
+  \begin{document}
+
+\begin{multicols}{2}
+  \begin{enumerate}[itemsep=0.5cm]
+<>
+  \end{enumerate}
+\end{multicols}
+
+\vspace*{0.1cm}
+\noindent\rule{\linewidth}{0.4pt}
+\vspace*{0.1cm}
+
+\begin{turn}{180}
+  \begin{minipage}{\linewidth}
+\color{gray}
+\footnotesize
+\begin{multicols}{4}
+  \begin{enumerate}
+<>
+  \end{enumerate}
+\end{multicols}
+  \end{minipage}
+\end{turn}
+
+  \end{document}
+#+end_src
+
+* generate pdf
+this writes the generated into a local file and runs ~texi2pdf~ to
+convert it to a pdf.
+
+#+begin_src elisp :results silent :var tex-content=page
+ 

[elpa] externals/org-mathsheet c22f1aece9 16/18: Checkdoc fixes

2025-04-10 Thread ELPA Syncer
branch: externals/org-mathsheet
commit c22f1aece94bc3bf131f99396a102d9935fdc4e2
Author: Ian Martins 
Commit: Ian Martins 

Checkdoc fixes
---
 mathsheet.org| 46 +++---
 org-mathsheet.el | 50 +-
 2 files changed, 48 insertions(+), 48 deletions(-)

diff --git a/mathsheet.org b/mathsheet.org
index 5b3bd55830..4c1440c4ce 100644
--- a/mathsheet.org
+++ b/mathsheet.org
@@ -222,10 +222,10 @@ assigns the constant directly to that named block.
 #+name: variables
 #+begin_src elisp :tangle org-mathsheet.el :var page=page
   (defvar org-mathsheet--var-list '()
-"List of variables used in a problem")
+"List of variables used in a problem.")
 
   (defconst org-mathsheet--worksheet-template page
-"LaTeX template for the worksheet")
+"LaTeX template for the worksheet.")
 #+end_src
 *** Scan problem
 
@@ -274,11 +274,11 @@ of ~open-fields~.
 "Scan a problem.
 
   This parses the problem and produces a list containing info about
-  its fields. For each field it returns a list containing:
+  its fields.  For each field it returns a list containing:
   1. a symbol for the assigned variable or a unique placeholder
   2. a list of variables this field depends on
   3. a cons containing start and end markers for the field in the current 
buffer
-  4. `nil' which is used by `dfs-visit' later"
+  4. nil which is used by `dfs-visit' later"
 (let ((field-index 0)
   open-fields ; stack
   closed-fields ; list
@@ -325,7 +325,7 @@ of ~open-fields~.
(symbol (or "." "," "+" "-" "*" "/" "^" "(" ")" "=")))
 
 (peg-run (peg stuff)
- (lambda (x) (message "failed %s" x))
+ (lambda (x) (message "Failed %s" x))
  (lambda (x)
(funcall x)
`((:fields . ,closed-fields)
@@ -376,8 +376,8 @@ both places to keep them synced.
 "Reduce the field to a number.
 
   Parse the field again, replacing spans with random numbers and
-  evaluating arithmetic operations. The field shouldn't have any
-  internal fields so this should result in a single number. Return
+  evaluating arithmetic operations.  The field shouldn't have any
+  internal fields so this should result in a single number.  Return
   that number."
 (with-peg-rules
 ((field "[" space (or math-func expression sequence assignment value) 
space "]")
@@ -407,7 +407,7 @@ both places to keep them synced.
  (var-lhs (substring letter)) ; var for assignment
  (var-rhs "$" (substring letter) ; var for use
   `(v -- (let ((val (alist-get (intern v) 
org-mathsheet--var-list)))
-   (or val (error "var %s not set" v)
+   (or val (error "Var %s not set" v)
  (math-func (substring (or "sqrt" "sin" "cos" "tan" "asin" "acos" 
"atan" "floor" "ceil" "round"))
 parenthetical
 `(f v -- (string-to-number (calc-eval (format "%s(%s)" f 
v)
@@ -416,7 +416,7 @@ both places to keep them synced.
  (digit [0-9]))
 
   (peg-run (peg field)
-   (lambda (x) (message "failed %s" x))
+   (lambda (x) (message "Failed %s" x))
(lambda (x) (car (funcall x))
 #+end_src
 
@@ -447,10 +447,10 @@ the field.
 #+name: replace-field
 #+begin_src elisp :tangle org-mathsheet.el
   (defun org-mathsheet--replace-field (node)
-"Replace a field with the number to which it reduces
+"Replace a field with the number to which it reduces.
 
   Update the current buffer by replacing the field at point in the
-  current buffer with the number it reduces to. NODE contains the
+  current buffer with the number it reduces to.  NODE contains the
   info for the current field."
 (let ((start (caaddr node))
   (end (1+ (cdaddr node)))
@@ -473,13 +473,13 @@ track of which fields have been visited.
 #+name: dfs-visit
 #+begin_src elisp :tangle org-mathsheet.el
   (defun org-mathsheet--dfs-visit (node fields)
-"Visit NODE as part of a DFS of the problem
+"Visit NODE as part of a DFS of the problem.
 
   Traverse the fields of a problem using depth first search to
-  ensure that field replacement happens in dependency order. FIELDS
-  is a list of all fields in the problem."
+  ensure that field replacement happens in dependency order.
+  FIELDS is a list of all fields in the problem."
 (pcase (cadddr node)
-  (1 (error "cycle detected")) ; cycle
+  (1 (error "Cycle detected")) ; cycle
   (2)  ; skip
   (_   ; process
(setcar (cdddr node) 1) ; started
@@ -502,10 +502,10 @@ processes all fields in a problem.
 
 #+begin_src elisp :tangle org-mathsheet.el
   (defun org-mathsheet--fill-problem (full-problem)
-"Replace all fields in FULL-PROBLEM
+"Replace all fields in FULL-PROBLEM.
 
   Goes through all f

[elpa] externals/minuet 60a8cf0a5d 2/3: chore: release v0.5.3

2025-04-10 Thread ELPA Syncer
branch: externals/minuet
commit 60a8cf0a5df5c26d09a695297bf4b967b2a7a48b
Author: Milan Glacier 
Commit: Milan Glacier 

chore: release v0.5.3
---
 CHANGELOG.md | 10 ++
 minuet.el|  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 764a04c84e..06574d3b3a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,13 @@
+# Version 0.5.3 (2025-04-08)
+
+## Features
+
+- Added `transform` option for OpenAI-FIM-compatible providers.
+
+  This feature enables support for non-OpenAI-FIM-compatible APIs with
+  OpenAI-FIM-compatible, such as the DeepInfra FIM API. Example
+  configurations are available in [recipes.md](.recipes.md).
+
 # Version 0.5.2 (2025-04-03)
 
 This maintenance release focuses on reducing the ELPA tarball size.
diff --git a/minuet.el b/minuet.el
index 54730d1612..be7675add4 100644
--- a/minuet.el
+++ b/minuet.el
@@ -4,7 +4,7 @@
 
 ;; Author: Milan Glacier 
 ;; Maintainer: Milan Glacier 
-;; Version: 0.5.1
+;; Version: 0.5.3
 ;; URL: https://github.com/milanglacier/minuet-ai.el
 ;; Package-Requires: ((emacs "29") (plz "0.9") (dash "2.19.1"))
 



[elpa] externals/modus-themes 1c582c44ff: Tweak the blue used in modus-operandi-tinted 'keyword' mapping

2025-04-10 Thread ELPA Syncer
branch: externals/modus-themes
commit 1c582c44ffa438c8f3ff584666a6aca2a52478b3
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Tweak the blue used in modus-operandi-tinted 'keyword' mapping
---
 modus-operandi-tinted-theme.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modus-operandi-tinted-theme.el b/modus-operandi-tinted-theme.el
index 60762684f3..f504a99ff9 100644
--- a/modus-operandi-tinted-theme.el
+++ b/modus-operandi-tinted-theme.el
@@ -251,7 +251,7 @@ which corresponds to a minimum contrast in relative 
luminance of
   (docmarkup magenta-faint)
   (docstring cyan-faint)
   (fnname yellow-cooler)
-  (keyword blue-cooler)
+  (keyword blue)
   (number fg-main)
   (operator fg-main)
   (preprocessor yellow-warmer)



[elpa] externals/dape 3779a2d912: dape.el: Various cosmetic changes

2025-04-10 Thread ELPA Syncer
branch: externals/dape
commit 3779a2d91239f8a4015dbc90104378cf04e96cac
Author: Stefan Monnier 
Commit: Daniel Pettersson 

dape.el: Various cosmetic changes

* dape.el: Prefer #' to quote function names.
(dape-info-scope-mode-map, dape-info-watch-mode-map): Use keymap
inheritance instead of copying.
(dape--inlay-hint-update-1): Remove unused argument `event` in
local function.
(dape--config-eval-value): Use `lexical-binding` also for `eval`d code.
---
 dape.el | 111 
 1 file changed, 56 insertions(+), 55 deletions(-)

diff --git a/dape.el b/dape.el
index c7118485ac..478ee1fba6 100644
--- a/dape.el
+++ b/dape.el
@@ -1259,8 +1259,8 @@ FN is executed on mouse-2 and \\r, BODY is executed with 
`map' bound."
   (declare (indent defun))
   `(defvar ,name
  (let ((map (make-sparse-keymap)))
-   (define-key map "\r" ',fn)
-   (define-key map [mouse-2] ',fn)
+   (define-key map "\r" #',fn)
+   (define-key map [mouse-2] #',fn)
(define-key map [follow-link] 'mouse-face)
,@body
map)))
@@ -1697,7 +1697,7 @@ See `dape-request' for expected CB signature."
   collect (list :dataId (plist-get plist :dataId)
 :accessType (plist-get plist 
:accessType))
   into breakpoints
-  finally return (apply 'vector breakpoints
+  finally return (apply #'vector breakpoints
 (when error
   (message "Failed to setup data breakpoints: %s" error))
 (cl-loop
@@ -1787,8 +1787,8 @@ See `dape-request' for expected CB signature."
 (plist-put object
:variables
(thread-last variables
-(cl-map 'list 'identity)
-(seq-filter 'identity)))
+(cl-map 'list #'identity)
+(seq-filter #'identity)))
 (dape--request-continue cb)
 
 (defun dape--variables-recursive (conn object path pred cb)
@@ -2109,10 +2109,10 @@ Sets `dape--thread-id' from BODY and invokes ui refresh 
with
 (when (equal reason "exception")
   ;; Output exception info in overlay and REPL
   (let* ((texts
-  (seq-filter 'stringp
+  (seq-filter #'stringp
   (list (plist-get body :text)
 (plist-get body :description
- (str (concat (mapconcat 'identity texts ":\n\t") "\n")))
+ (str (concat (mapconcat #'identity texts ":\n\t") "\n")))
 (setf (dape--exception-description conn) str)
 (dape--repl-insert-error str)))
 ;; Update breakpoints hits
@@ -2237,7 +2237,7 @@ symbol `dape-connection'."
   (process-put server-process 'stderr-pipe stderr-pipe)
   (when dape-debug
 (dape--message "Adapter server started with %S"
-   (mapconcat 'identity command " "
+   (mapconcat #'identity command " "
 ;; FIXME Why do I need this?
 (when (file-remote-p default-directory)
   (sleep-for 0.300)))
@@ -2287,7 +2287,7 @@ symbol `dape-connection'."
 :file-handler t))
 (when dape-debug
   (dape--message "Adapter started with %S"
- (mapconcat 'identity command " "))
+ (mapconcat #'identity command " "))
 (make-instance
  'dape-connection
  :name "dape-connection"
@@ -2552,7 +2552,7 @@ With prefix argument thread is selected by index."
   (thread-first conn (dape--current-thread)
 (plist-get :name)))
   collection nil t
- (alist-get thread-name collection nil nil 'equal)))
+ (alist-get thread-name collection nil nil #'equal)))
   (setf (dape--thread-id conn) thread-id)
   (setq dape--connection-selected conn)
   (dape--update conn nil t)
@@ -2580,7 +2580,7 @@ With prefix argument stack is selected by index."
  (completing-read (format "Select stack (current %s): "
   (plist-get (dape--current-stack-frame 
conn) :name))
   collection nil t
- (list conn (alist-get stack-name collection nil nil 'equal
+ (list conn (alist-get stack-name collection nil nil #'equal
   (setf (dape--stack-id conn) stack-id)
   (dape--update conn nil t))
 
@@ -2988,7 +2988,7 @@ of memory read."
   'keymap (let ((map (make-sparse-keymap)))
 (define-key map [mouse-1] mouse-1-def)
 map))
-  (let ((ov (apply 'make-overlay (dape--overlay-region)))
+  (let ((ov (apply #'make-overlay (dape--overlay-region)))
 (disabled-face 

[elpa] externals/org-mathsheet 3ef5907f2c 13/18: Wrote more documentation and added example worksheets

2025-04-10 Thread ELPA Syncer
branch: externals/org-mathsheet
commit 3ef5907f2c9a79d5769ea027d5c80bf69bb9f2ea
Author: Ian Martins 
Commit: Ian Martins 

Wrote more documentation and added example worksheets
---
 .gitignore   |5 +
 add-sub-1.pdf|  Bin 0 -> 34623 bytes
 algebra-1.pdf|  Bin 0 -> 75836 bytes
 example.org  |   16 +-
 mathsheet.org|  263 -
 org-mathsheet.el |  423 
 readme.md| 1152 ++
 7 files changed, 1754 insertions(+), 105 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00..f145f51ef0
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*.elc
+*.aux
+*.log
+*.pdf
+*.tex
diff --git a/add-sub-1.pdf b/add-sub-1.pdf
new file mode 100644
index 00..0264fb0423
Binary files /dev/null and b/add-sub-1.pdf differ
diff --git a/algebra-1.pdf b/algebra-1.pdf
new file mode 100644
index 00..e96f5acb7e
Binary files /dev/null and b/algebra-1.pdf differ
diff --git a/example.org b/example.org
index 5aae6f8a69..bdc48d12ef 100644
--- a/example.org
+++ b/example.org
@@ -53,12 +53,12 @@
 #+BEGIN: problem-set :templates "algebra-1" :count 8 :prob-cols 2 :instruction 
"Solve for x"
 | problem| answer  |
 |+-|
-| x / (3 + 0) = 4| x = 12  |
-| x / (2 + 2) = 5| x = 20  |
-| 6 / x = 2  | x = 3   |
-| 7 / x = 1  | x = 7   |
-| x = x/3 + 3| x = 9/2 |
-| x/-2 + 1 = 7   | x = -12 |
-| x^2 = sqrt(15 + 1) | x = 2   |
-| x/-5 + 6 = 6   | x = 0   |
+| x / (3 + 4) = 5| x = 35  |
+| x / (2 + 4) = 7| x = 42  |
+| 9 / x = 1  | x = 9   |
+| 12 / x = 2 | x = 6   |
+| x^2 = sqrt(13 + 3) | x = 2   |
+| x/3 + 6 = -8   | x = -42 |
+| x = x/5 + 0| x = 0   |
+| x/-2 + 9 = 4   | x = 10  |
 #+END:
diff --git a/mathsheet.org b/mathsheet.org
index 12634096c8..68d6ae2f93 100644
--- a/mathsheet.org
+++ b/mathsheet.org
@@ -1,4 +1,7 @@
-* TODO rename to org-mathsheet.el
+# -*- eval: (add-hook 'after-save-hook (lambda () (save-excursion 
(org-babel-tangle) (org-export-to-file 'md "readme.md"))) nil 'local); -*-
+#+title: Math Worksheet Generator
+#+author: Ian Martins
+#+email: ia...@jhu.edu
 * Overview
 ** Description
 This is a math worksheet generator. The worksheets are randomly
@@ -7,11 +10,11 @@ include along with the order and relative frequency that 
each type of
 problem should appear on the worksheet.
 ** Audience
 This could be useful for anyone that wants to provide math practice to
-someone else. It could be useful for a teacher, tutor, homeschool
+someone else. It could be useful for a teacher, tutor, homeschooling
 parent, or any parent.
 ** Examples
 Here are some example worksheets generated by this tool:
-1. [[file:add-sub-1.pdf][arithmatic]]
+1. [[file:add-sub-1.pdf][arithmetic]]
 2. [[file:algebra-1.pdf][algebra]]
 
 They were generated using [[file:example.org][this configuration]].
@@ -42,7 +45,7 @@ inclusive, so the above template could result in problems 
like these:
 5 + 1
 #+end_example
  Equation Templates
-In additon to expressions where the answer is a number, templates can
+In addition to expressions where the answer is a number, templates can
 be equations where the solution is found by solving for the
 variable. For example, consider this template:
 #+begin_example
@@ -55,15 +58,15 @@ This can produce the following problems:
 1 x + 8 = -3
 #+end_example
  Field Rules
-These are the field rules:
+These are the different ways fields can be defined:
 - [-2..8] :: choose a random number from -2 to 8, inclusive
 - [1,3,5] :: choose randomly from 1, 3 or 5
 - [-3..-1,1..3] :: choose a random number from -3 to -1 or 1 to 3
 - [10/(2-1)] :: evaluate the expression
 - [round(sin(0.3))] :: expressions can use math functions
-- [a=...] :: assign the variable a to the number chosen for this field
-- [-2..$a] :: any number from -2 to the value assigned to ~a~ in another
-  field
+- [a=...] :: assign the variable ~a~ to the number chosen for this field
+- [-2..$a] :: any number from -2 to the value another field assigned
+  to ~a~
 - [0..[$a/2]] :: any number from 0 to half the value assigned to ~a~.
 
 The ability to keep track of the random number chosen in one field and
@@ -86,7 +89,7 @@ Addition and subtraction, but ensure a positive result
 [a=1..10] + [b=0..10] - [0..($a+$b)]
 #+end_example
 
-Division and ensure we don't divide by zero
+Division but ensure we don't divide by zero
 #+begin_example
 [-10..10] / [-5..-1,1..5]
 #+end_example
@@ -98,7 +101,7 @@ a worksheet, each worksheet is configured with a set of 
templates in a
 templates table. For example
 
 #+name: first-sheet
-| weight | order | template| descr  |
+| weight | order | template| description|
 |+---+-+|
 |  3 | 1 | [1..10] + [1..20]   | addition   |
 |  1 | 2 | [a

[elpa] externals/org-mathsheet b7025320d5 01/18: Initial commit

2025-04-10 Thread ELPA Syncer
branch: externals/org-mathsheet
commit b7025320d5561eb767e57aaf10e98ff1a16806dc
Author: ian martins 
Commit: ian martins 

Initial commit
---
 README.md | 93 +++
 1 file changed, 93 insertions(+)

diff --git a/README.md b/README.md
new file mode 100644
index 00..f4a692b285
--- /dev/null
+++ b/README.md
@@ -0,0 +1,93 @@
+# org-mathsheet
+
+
+
+## Getting started
+
+To make it easy for you to get started with GitLab, here's a list of 
recommended next steps.
+
+Already a pro? Just edit this README.md and make it your own. Want to make it 
easy? [Use the template at the bottom](#editing-this-readme)!
+
+## Add your files
+
+- [ ] 
[Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file)
 or 
[upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file)
 files
+- [ ] [Add files using the command 
line](https://docs.gitlab.com/topics/git/add_files/#add-files-to-a-git-repository)
 or push an existing Git repository with the following command:
+
+```
+cd existing_repo
+git remote add origin https://gitlab.com/ianxm/org-mathsheet.git
+git branch -M main
+git push -uf origin main
+```
+
+## Integrate with your tools
+
+- [ ] [Set up project 
integrations](https://gitlab.com/ianxm/org-mathsheet/-/settings/integrations)
+
+## Collaborate with your team
+
+- [ ] [Invite team members and 
collaborators](https://docs.gitlab.com/ee/user/project/members/)
+- [ ] [Create a new merge 
request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
+- [ ] [Automatically close issues from merge 
requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
+- [ ] [Enable merge request 
approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
+- [ ] [Set 
auto-merge](https://docs.gitlab.com/user/project/merge_requests/auto_merge/)
+
+## Test and Deploy
+
+Use the built-in continuous integration in GitLab.
+
+- [ ] [Get started with GitLab 
CI/CD](https://docs.gitlab.com/ee/ci/quick_start/)
+- [ ] [Analyze your code for known vulnerabilities with Static Application 
Security Testing 
(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
+- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto 
Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
+- [ ] [Use pull-based deployments for improved Kubernetes 
management](https://docs.gitlab.com/ee/user/clusters/agent/)
+- [ ] [Set up protected 
environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
+
+***
+
+# Editing this README
+
+When you're ready to make this README your own, just edit this file and use 
the handy template below (or feel free to structure it however you want - this 
is just a starting point!). Thanks to 
[makeareadme.com](https://www.makeareadme.com/) for this template.
+
+## Suggestions for a good README
+
+Every project is different, so consider which of these sections apply to 
yours. The sections used in the template are suggestions for most open source 
projects. Also keep in mind that while a README can be too long and detailed, 
too long is better than too short. If you think your README is too long, 
consider utilizing another form of documentation rather than cutting out 
information.
+
+## Name
+Choose a self-explaining name for your project.
+
+## Description
+Let people know what your project can do specifically. Provide context and add 
a link to any reference visitors might be unfamiliar with. A list of Features 
or a Background subsection can also be added here. If there are alternatives to 
your project, this is a good place to list differentiating factors.
+
+## Badges
+On some READMEs, you may see small images that convey metadata, such as 
whether or not all the tests are passing for the project. You can use Shields 
to add some to your README. Many services also have instructions for adding a 
badge.
+
+## Visuals
+Depending on what you are making, it can be a good idea to include screenshots 
or even a video (you'll frequently see GIFs rather than actual videos). Tools 
like ttygif can help, but check out Asciinema for a more sophisticated method.
+
+## Installation
+Within a particular ecosystem, there may be a common way of installing things, 
such as using Yarn, NuGet, or Homebrew. However, consider the possibility that 
whoever is reading your README is a novice and would like more guidance. 
Listing specific steps helps remove ambiguity and gets people to using your 
project as quickly as possible. If it only runs in a specific context like a 
particular programming language version or operating system or has dependencies 
that have to be installed ma [...]
+
+## Usage
+Use examples liberally, and show the expected output if you can. It's helpful 
to have inline the smallest example of usage that you can demonstrate, while 
providing li

[elpa] externals/org-mathsheet d7db7a61d1 08/18: Can produce algebra worksheets

2025-04-10 Thread ELPA Syncer
branch: externals/org-mathsheet
commit d7db7a61d13ee660bc342ce7be694dc9722497fd
Author: Ian Martins 
Commit: Ian Martins 

Can produce algebra worksheets
---
 example.org   |  54 
 mathsheet.org | 157 --
 2 files changed, 119 insertions(+), 92 deletions(-)

diff --git a/example.org b/example.org
index 3abcae6d71..aec3af0dbb 100644
--- a/example.org
+++ b/example.org
@@ -1,12 +1,12 @@
 * add and subtract
 
 #+name: add-sub-1
-| weight | order | template| descr 
|
-|+---+-+---|
-|  3 | 1 | [1..10] + [0..10]   | simple
|
-|  2 | 2 | [1..10] + [8..12]   | second number bigger  
|
-|  2 | 2 | [1..12] + [0..10]   | first number bigger   
|
-|  1 | 3 | [a=2..10] - [1..$a] | small number subtraction, positive 
result |
+| weight | order | template  | descr   
  |
+|+---+---+---|
+|  3 | 1 | [1..10] + [0..10] | simple  
  |
+|  2 | 2 | [1..10] + [8..12] | second number bigger
  |
+|  2 | 2 | [1..12] + [0..10] | first number bigger 
  |
+|  1 | 3 | [a=2..10] - [1..$a]   | small number subtraction, positive 
result |
 
 #+name: add-sub-2
 | weight | order | template  | descr   
|
@@ -19,34 +19,22 @@
 |  0 | 0 | [$a*[1..5]] / [a=1..10]   | division
|
 
 #+name: algebra-1
-| weight | order | template   | descr  |
-|+---++|
-|  3 | 1 | x/2 + [a=0..20] = [$a..21] | simple |
+| weight | order | template   | descr  |
+|+---++|
+|  3 | 1 | x / ([2..4] + [a=0..5]) = [$a..10] | simple |
+|  3 | 2 | [$a*[2..10]] / x = [a=1,2,4]   | simple |
 
-#+BEGIN: problem-set :templates "algebra-1" :count 21
-| problem   | answer|
-|---+---|
-| x/2 + 12 = 13 | x / 2. = 1|
-| x/2 + 11 = 18 | x / 14. = 1   |
-| x/2 + 11 = 16 | x / 10. = 1   |
-| x/2 + 6 = 19  | x / 26. = 1   |
-| x/2 + 3 = 5   | x / 4. = 1|
-| x/2 + 19 = 19 | x / 2 = 0 |
-| x/2 + 19 = 20 | x / 2. = 1|
-| x/2 + 2 = 9   | x / 14. = 1   |
-| x/2 + 12 = 20 | x / 16. = 1   |
-| x/2 + 0 = 11  | x / 22. = 1   |
-| x/2 + 2 = 18  | x / 32. = 1   |
-| x/2 + 7 = 15  | x / 16. = 1   |
-| x/2 + 0 = 9   | x / 18. = 1   |
-| x/2 + 17 = 17 | x / 2 = 0 |
-| x/2 + 13 = 17 | x / 8. = 1|
-| x/2 + 0 = 6   | x / 12. = 1   |
-| x/2 + 3 = 4   | x / 2. = 1|
-| x/2 + 8 = 12  | x / 8. = 1|
-| x/2 + 16 = 19 | x / 5.999 = 1 |
-| x/2 + 7 = 13  | x / 12. = 1   |
-| x/2 + 9 = 20  | x / 22. = 1   |
+#+BEGIN: problem-set :templates "algebra-1" :count 8
+| problem | answer |
+|-+|
+| x / (2 + 2) = 2 | x = 8  |
+| x / (2 + 0) = 8 | x = 16 |
+| x / (3 + 1) = 1 | x = 4  |
+| x / (3 + 4) = 7 | x = 49 |
+| 2 / x = 1   | x = 2  |
+| 7 / x = 1   | x = 7  |
+| 10 / x = 2  | x = 5  |
+| 28 / x = 4  | x = 7  |
 #+END:
 
 * bigger addition and multiplications
diff --git a/mathsheet.org b/mathsheet.org
index 17b962d067..386147c5b2 100644
--- a/mathsheet.org
+++ b/mathsheet.org
@@ -44,12 +44,6 @@ that generates the worksheet. Only the first three columns 
are used.
 |  1 | 4 | [a=1..10] + [0..10] - [0..$a] | three terms with 
subtraction |
 |  0 | 0 | [$a*[1..5]] / [a=1..10]   | division
 |
 
-*** TODO handle templates with variables
-can be done like this
-#+begin_export
-(calc-eval "solve(2x = 1 + 2, [x])")
-#+end_export
-
 * Code walkthrough
 ** Problem generation
 *** Dependencies
@@ -81,13 +75,22 @@ end of the problem. returns a list of fields, formatted as:
 '(var (deps) start-marker end-marker nil)
 #+end_example
 
-~var~ is a variable name if there is an assignment, otherwise it is a
-placeholder like ~_0~, ~_1~, etc.
+change to
+
+#+begin_example
+'(asn-var (deps) (start-marker . end-marker) nil)
+#+end_example
+
+~asn-var~ is a variable name if there is an assignment, otherwise it is a
+placeholder like ~_0~, ~_1~, etc. ~asn-var~ must be interned and must
+be the first index since we use this list as an alist later.
+
+~alg-vars~ are algebraic variables if there are any in this problem,
+otherwise ~nil~.
 
 ~start-marker~ and ~end-marker~ are markers in the (temp) buffer.
 
-The last e

[elpa] externals/org-mathsheet d241eb01d5 07/18: Fixed field index and var-list reference, cleanup

2025-04-10 Thread ELPA Syncer
branch: externals/org-mathsheet
commit d241eb01d50e3fc9f8ac25effc9ac4e49c8d0194
Author: Ian Martins 
Commit: Ian Martins 

Fixed field index and var-list reference, cleanup
---
 example.org   |  80 
 mathsheet.org | 168 +-
 2 files changed, 143 insertions(+), 105 deletions(-)

diff --git a/example.org b/example.org
index 53315935e0..3abcae6d71 100644
--- a/example.org
+++ b/example.org
@@ -1,38 +1,52 @@
 * add and subtract
 
-#+name: first-set
-| weight | order | template  | descr  |
-|+---+---+|
-|  3 | 1 | [1..10] + [0..10] | simple |
-|  2 | 2 | [1..10] + [8..15] | second number bigger   |
-|  1 | 2 | [a=3..10] - [0..$a]   | subtraction|
-|  1 | 3 | [1..10] + [1..7] + [1..5] | three numbers  |
-|  1 | 4 | [a=1..10] + [0..10] - [0..$a] | three with subtraction |
-|  0 | 0 | [$a*[1..5]] / [a=1..10]   | division   |
+#+name: add-sub-1
+| weight | order | template| descr 
|
+|+---+-+---|
+|  3 | 1 | [1..10] + [0..10]   | simple
|
+|  2 | 2 | [1..10] + [8..12]   | second number bigger  
|
+|  2 | 2 | [1..12] + [0..10]   | first number bigger   
|
+|  1 | 3 | [a=2..10] - [1..$a] | small number subtraction, positive 
result |
 
-#+BEGIN: problem-set :templates "first-set" :count 21 :name "Noble"
-| problem   | answer |
-|---+|
-| 2 + 7 |  9 |
-| 1 + 3 |  4 |
-| 4 + 6 | 10 |
-| 7 + 0 |  7 |
-| 9 + 1 | 10 |
-| 6 + 7 | 13 |
-| 6 + 8 | 14 |
-| 3 + 13| 16 |
-| 9 + 11| 20 |
-| 9 - 2 |  7 |
-| 4 - 1 |  3 |
-| 5 + 14| 19 |
-| 5 + 11| 16 |
-| 1 + 10| 11 |
-| 8 - 3 |  5 |
-| 7 + 5 + 2 | 14 |
-| 2 + 5 + 4 | 11 |
-| 9 + 4 + 2 | 15 |
-| 5 + 8 - 4 |  9 |
-| 5 + 8 - 3 | 10 |
-| 7 + 9 - 2 | 14 |
+#+name: add-sub-2
+| weight | order | template  | descr   
|
+|+---+---+-|
+|  3 | 1 | [1..10] + [0..10] | simple  
|
+|  2 | 2 | [1..10] + [8..15] | second number bigger
|
+|  1 | 2 | [a=3..10] - [0..$a]   | subtraction 
|
+|  1 | 3 | [1..10] + [1..7] + [1..5] | three numbers   
|
+|  1 | 4 | [a=1..10] + [0..10] - [0..$a] | three with subtraction, 
positive result |
+|  0 | 0 | [$a*[1..5]] / [a=1..10]   | division
|
+
+#+name: algebra-1
+| weight | order | template   | descr  |
+|+---++|
+|  3 | 1 | x/2 + [a=0..20] = [$a..21] | simple |
+
+#+BEGIN: problem-set :templates "algebra-1" :count 21
+| problem   | answer|
+|---+---|
+| x/2 + 12 = 13 | x / 2. = 1|
+| x/2 + 11 = 18 | x / 14. = 1   |
+| x/2 + 11 = 16 | x / 10. = 1   |
+| x/2 + 6 = 19  | x / 26. = 1   |
+| x/2 + 3 = 5   | x / 4. = 1|
+| x/2 + 19 = 19 | x / 2 = 0 |
+| x/2 + 19 = 20 | x / 2. = 1|
+| x/2 + 2 = 9   | x / 14. = 1   |
+| x/2 + 12 = 20 | x / 16. = 1   |
+| x/2 + 0 = 11  | x / 22. = 1   |
+| x/2 + 2 = 18  | x / 32. = 1   |
+| x/2 + 7 = 15  | x / 16. = 1   |
+| x/2 + 0 = 9   | x / 18. = 1   |
+| x/2 + 17 = 17 | x / 2 = 0 |
+| x/2 + 13 = 17 | x / 8. = 1|
+| x/2 + 0 = 6   | x / 12. = 1   |
+| x/2 + 3 = 4   | x / 2. = 1|
+| x/2 + 8 = 12  | x / 8. = 1|
+| x/2 + 16 = 19 | x / 5.999 = 1 |
+| x/2 + 7 = 13  | x / 12. = 1   |
+| x/2 + 9 = 20  | x / 22. = 1   |
 #+END:
+
 * bigger addition and multiplications
diff --git a/mathsheet.org b/mathsheet.org
index d30683cc33..17b962d067 100644
--- a/mathsheet.org
+++ b/mathsheet.org
@@ -5,7 +5,7 @@ distribution and order is also configurable.
 
 Similar to https://www.math-aids.com.
 * Problem Templates
-** Description
+** Overview
 This section contains some example templates. Each table defines a
 worksheet. Each time the worksheet is generated the problems are
 re-randomized.
@@ -31,23 +31,40 @@ in square brackets.
 
 ** Examples
 
+We label the table so that we can refer to it from the dynamic block
+that generates the worksheet. Only the first three columns are used

[elpa] branch externals/org-mathsheet created (now d211483197)

2025-04-10 Thread ELPA Syncer
elpasync pushed a change to branch externals/org-mathsheet.

at  d211483197 Set package dependencies, fix import warnings, and some 
minor changes

This branch includes the following new commits:

   new  b7025320d5 Initial commit
   new  0038935262 initial
   new  688e66613b Can produce problems from template
   new  1cd7959d03 Can generate sheet based on templates
   new  d4415d4e63 can generate worksheets using new templates
   new  b57ce5acc2 Tangle instead of executing source blocks in place
   new  d241eb01d5 Fixed field index and var-list reference, cleanup
   new  d7db7a61d1 Can produce algebra worksheets
   new  8c6b1e9cce Add instruction and use template name for worksheet
   new  c3b9570c2b Use latex math formatting, allow exponent and sqrt
   new  4cfa9040d2 Added math funcs, multi range sequences, worksheet 
instruction
   new  29648b4824 Documented, prefer / for fractions
   new  3ef5907f2c Wrote more documentation and added example worksheets
   new  b67bef9419 Moved examples into subdir
   new  36fb466ca2 Fixed links to org files
   new  c22f1aece9 Checkdoc fixes
   new  3512cd0291 Add GPL license
   new  d211483197 Set package dependencies, fix import warnings, and some 
minor changes




[elpa] externals/org-mathsheet 3512cd0291 17/18: Add GPL license

2025-04-10 Thread ELPA Syncer
branch: externals/org-mathsheet
commit 3512cd02912b055c53f26bc432913d95b47e90ab
Author: Ian Martins 
Commit: Ian Martins 

Add GPL license
---
 LICENSE | 674 
 1 file changed, 674 insertions(+)

diff --git a/LICENSE b/LICENSE
new file mode 100644
index 00..f288702d2f
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,674 @@
+GNU GENERAL PUBLIC LICENSE
+   Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. 
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+   TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you direct

[elpa] externals/org-mathsheet 29648b4824 12/18: Documented, prefer / for fractions

2025-04-10 Thread ELPA Syncer
branch: externals/org-mathsheet
commit 29648b4824c8a60e4cef779921c5562957d319dc
Author: Ian Martins 
Commit: Ian Martins 

Documented, prefer / for fractions
---
 example.org   |  78 +-
 mathsheet.org | 252 +++---
 2 files changed, 193 insertions(+), 137 deletions(-)

diff --git a/example.org b/example.org
index 19ea901393..5aae6f8a69 100644
--- a/example.org
+++ b/example.org
@@ -1,14 +1,6 @@
 * add and subtract
 
 #+name: add-sub-1
-| weight | order | template  | descr   
  |
-|+---+---+---|
-|  3 | 1 | [1..10] + [0..10] | simple  
  |
-|  2 | 2 | [1..10] + [8..12] | second number bigger
  |
-|  2 | 2 | [1..12] + [0..10] | first number bigger 
  |
-|  1 | 3 | [a=2..10] - [1..$a]   | small number subtraction, positive 
result |
-
-#+name: add-sub-2
 | weight | order | template | descr
   |
 
|+---+--+-|
 |  3 | 1 | [1..10] + [0..10]| simple   
   |
@@ -19,21 +11,33 @@
 |  0 | 0 | [$a*[1..5]] / [a=1..10]  | division 
   |
 |  5 | 5 | [a=1..10] + [b=0..10] - [0..($a+$b)] | three with 
subtraction, positive result |
 
-#+BEGIN: problem-set :templates "add-sub-2" :count 12 :instruction "Compute 
the answer"
-| problem   | answer |
-|---+|
-| 2 + 6 |  8 |
-| 6 + 4 | 10 |
-| 9 + 5 | 14 |
-| 4 + 9 | 13 |
-| 6 - 4 |  2 |
-| 6 + 12| 18 |
-| 5 + 3 + 1 |  9 |
-| 4 + 1 - 3 |  2 |
-| 2 + 7 - 5 |  4 |
-| 1 + 7 - 5 |  3 |
-| 9 + 6 - 7 |  8 |
-| 2 + 0 - 0 |  2 |
+#+BEGIN: problem-set :templates "add-sub-1" :count 24 :prob-cols 3 
:instruction "Compute the answer"
+| problem| answer |
+|+|
+| 5 + 6  | 11 |
+| 1 + 5  |  6 |
+| 4 + 7  | 11 |
+| 7 + 1  |  8 |
+| 5 + 4  |  9 |
+| 9 + 1  | 10 |
+| 5 - 4  |  1 |
+| 3 + 13 | 16 |
+| 7 + 8  | 15 |
+| 9 + 12 | 21 |
+| 4 + 9  | 13 |
+| 8 - 5  |  3 |
+| 8 + 5 + 4  | 17 |
+| 6 + 6 + 3  | 15 |
+| 7 + 9 - 1  | 15 |
+| 3 + 2 - 0  |  5 |
+| 8 + 7 - 4  | 11 |
+| 5 + 4 - 7  |  2 |
+| 2 + 9 - 6  |  5 |
+| 1 + 3 - 0  |  4 |
+| 9 + 5 - 3  | 11 |
+| 7 + 8 - 12 |  3 |
+| 8 + 4 - 7  |  5 |
+| 8 + 2 - 8  |  2 |
 #+END:
 
 * algebra
@@ -41,20 +45,20 @@
 | weight | order | template  | descr   
  |
 
|+---+---+---|
 |  3 | 1 | x / ([2..4] + [a=0..5]) = [$a..10]| simple  
  |
-|  3 | 2 | [$a*[2..10]] / x = [a=1,2,4]  | simple  
  |
+|  2 | 2 | [$a*[2..10]] / x = [a=1,2,4]  | simple  
  |
+|  2 | 3 | x/[-5..-1,1..5] + [1..10] = [-10..10] | double range 
sequence |
+|  1 | 3 | x = x/[a=2..6] + [round([1..20]/$a)]  | var twice   
  |
 |  1 | 3 | x^2 = sqrt([16 - $a] + [a=1..5])  | sqrt
  |
-|  3 | 4 | [-5..-1,1..5] x + [0..10] = [-10..10] | double range 
sequence |
-|  3 | 4 | x = 2/x + sin([1..10])| trig, two vars  
  |
 
-#+BEGIN: problem-set :templates "algebra-1" :count 8 :instruction "Solve for x"
-| problem| answer|
-|+---|
-| x / (2 + 3) = 9| x = 45|
-| x / (3 + 3) = 9| x = 54|
-| 8 / x = 2  | x = 4 |
-| 36 / x = 4 | x = 9 |
-| x^2 = sqrt(12 + 4) | x = 2 |
-| -5 x + 8 = 0   | x = 8:5   |
-| -2 x + 3 = 0   | x = 3:2   |
-| x = 2/x + sin(2)   | x = 1.43177096141 |
+#+BEGIN: problem-set :templates "algebra-1" :count 8 :prob-cols 2 :instruction 
"Solve for x"
+| problem| answer  |
+|+-|
+| x / (3 + 0) = 4| x = 12  |
+| x / (2 + 2) = 5| x = 20  |
+| 6 / x = 2  | x = 3   |
+| 7 / x = 1  | x = 7   |
+| x = x/3 + 3| x = 9/2 |
+| x/-2 + 1 = 7   | x = -12 |
+| x^2 = sqrt(15 + 1) | x = 2   |
+| x/-5 + 6 = 6   | x = 0   |
 #+END:
diff --git a/mathsheet.org b/mathsheet.org
index 73279900a5..12634096c8 100644
--- a/mathsheet.org
+++ b/mathsheet.org
@@ -11,10 +11,15 @@ someone else. It could be useful for a teacher, tutor, 
homeschool
 parent, or any parent.
 ** Examples
 Here are some example worksheets generated by this tool:
-1. arithmatic
-2. algebra
-** Parts
-There are two main component

[elpa] externals/org-mathsheet 4cfa9040d2 11/18: Added math funcs, multi range sequences, worksheet instruction

2025-04-10 Thread ELPA Syncer
branch: externals/org-mathsheet
commit 4cfa9040d2a1bd9c178f94e0547547cf98d1e255
Author: Ian Martins 
Commit: Ian Martins 

Added math funcs, multi range sequences, worksheet instruction
---
 example.org   |  88 +++---
 mathsheet.org | 364 +++---
 2 files changed, 286 insertions(+), 166 deletions(-)

diff --git a/example.org b/example.org
index 3abbe060bd..19ea901393 100644
--- a/example.org
+++ b/example.org
@@ -9,58 +9,52 @@
 |  1 | 3 | [a=2..10] - [1..$a]   | small number subtraction, positive 
result |
 
 #+name: add-sub-2
-| weight | order | template  | descr   
|
-|+---+---+-|
-|  3 | 1 | [1..10] + [0..10] | simple  
|
-|  2 | 2 | [1..10] + [8..15] | second number bigger
|
-|  1 | 2 | [a=3..10] - [0..$a]   | subtraction 
|
-|  1 | 3 | [1..10] + [1..7] + [1..5] | three numbers   
|
-|  1 | 4 | [a=1..10] + [0..10] - [0..$a] | three with subtraction, 
positive result |
-|  0 | 0 | [$a*[1..5]] / [a=1..10]   | division
|
+| weight | order | template | descr
   |
+|+---+--+-|
+|  3 | 1 | [1..10] + [0..10]| simple   
   |
+|  2 | 2 | [1..10] + [8..15]| second number bigger 
   |
+|  1 | 2 | [a=3..10] - [0..$a]  | subtraction  
   |
+|  1 | 3 | [1..10] + [1..7] + [1..5]| three numbers
   |
+|  1 | 4 | [a=1..10] + [0..10] - [0..$a]| three with 
subtraction, positive result |
+|  0 | 0 | [$a*[1..5]] / [a=1..10]  | division 
   |
+|  5 | 5 | [a=1..10] + [b=0..10] - [0..($a+$b)] | three with 
subtraction, positive result |
 
-#+BEGIN: problem-set :templates "add-sub-1" :count 21 :instruction "Compute 
the answer"
-| problem | answer |
-|-+|
-| 6 + 3   |  9 |
-| 1 + 6   |  7 |
-| 5 + 6   | 11 |
-| 2 + 0   |  2 |
-| 1 + 4   |  5 |
-| 8 + 7   | 15 |
-| 6 + 5   | 11 |
-| 2 + 3   |  5 |
-| 9 + 9   | 18 |
-| 3 + 8   | 11 |
-| 1 + 11  | 12 |
-| 4 + 2   |  6 |
-| 2 + 9   | 11 |
-| 1 + 4   |  5 |
-| 11 + 1  | 12 |
-| 6 + 0   |  6 |
-| 4 + 9   | 13 |
-| 7 + 10  | 17 |
-| 3 - 1   |  2 |
-| 9 - 8   |  1 |
-| 2 - 1   |  1 |
+#+BEGIN: problem-set :templates "add-sub-2" :count 12 :instruction "Compute 
the answer"
+| problem   | answer |
+|---+|
+| 2 + 6 |  8 |
+| 6 + 4 | 10 |
+| 9 + 5 | 14 |
+| 4 + 9 | 13 |
+| 6 - 4 |  2 |
+| 6 + 12| 18 |
+| 5 + 3 + 1 |  9 |
+| 4 + 1 - 3 |  2 |
+| 2 + 7 - 5 |  4 |
+| 1 + 7 - 5 |  3 |
+| 9 + 6 - 7 |  8 |
+| 2 + 0 - 0 |  2 |
 #+END:
 
 * algebra
 #+name: algebra-1
-| weight | order | template   | descr  |
-|+---++|
-|  3 | 1 | x / ([2..4] + [a=0..5]) = [$a..10] | simple |
-|  3 | 2 | [$a*[2..10]] / x = [a=1,2,4]   | simple |
-|  1 | 3 | x^2 = sqrt([16 - $a] + [a=1..5])   | simple |
+| weight | order | template  | descr   
  |
+|+---+---+---|
+|  3 | 1 | x / ([2..4] + [a=0..5]) = [$a..10]| simple  
  |
+|  3 | 2 | [$a*[2..10]] / x = [a=1,2,4]  | simple  
  |
+|  1 | 3 | x^2 = sqrt([16 - $a] + [a=1..5])  | sqrt
  |
+|  3 | 4 | [-5..-1,1..5] x + [0..10] = [-10..10] | double range 
sequence |
+|  3 | 4 | x = 2/x + sin([1..10])| trig, two vars  
  |
 
 #+BEGIN: problem-set :templates "algebra-1" :count 8 :instruction "Solve for x"
-| problem| answer |
-|+|
-| x / (3 + 0) = 5| x = 15 |
-| x / (3 + 4) = 9| x = 63 |
-| x / (3 + 0) = 4| x = 12 |
-| 12 / x = 2 | x = 6  |
-| 8 / x = 2  | x = 4  |
-| 36 / x = 4 | x = 9  |
-| 6 / x = 2  | x = 3  |
-| x^2 = sqrt(13 + 3) | x = 2  |
+| problem| answer|
+|+---|
+| x / (2 + 3) = 9| x = 45|
+| x / (3 + 3) = 9| x = 54|
+| 8 / x = 2  | x = 4 |
+| 36 / x = 4 | x = 9 |
+| x^2 = sqrt(12 + 4) | x = 2 |
+| -5 x + 

[elpa] externals/org-mathsheet 36fb466ca2 15/18: Fixed links to org files

2025-04-10 Thread ELPA Syncer
branch: externals/org-mathsheet
commit 36fb466ca29cd541633428ac0a0f346dc76e38d3
Author: Ian Martins 
Commit: Ian Martins 

Fixed links to org files
---
 README.md | 26 +-
 mathsheet.org | 10 +-
 2 files changed, 14 insertions(+), 22 deletions(-)

diff --git a/README.md b/README.md
index 9b3380e65e..705829085b 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@ Here are some example worksheets generated by this tool:
 1.  [arithmetic](examples/add-sub-1.pdf)
 2.  [algebra](examples/algebra-1.pdf)
 
-They were generated using [this configuration](examples/example.md).
+They were generated using [this configuration](examples/example.org).
 
 
 ## Requirements
@@ -126,7 +126,7 @@ Both are described in detail below.
 a worksheet, each worksheet is configured with a set of templates in a
 templates table. For example
 
-
+
 
 
 
@@ -146,7 +146,6 @@ Both are described in detail below.
 description
 
 
-
 
 
 3
@@ -155,7 +154,6 @@ Both are described in detail below.
 addition
 
 
-
 
 1
 2
@@ -186,7 +184,7 @@ Both are described in detail below.
 
 Here is another example template table.
 
-
+
 
 
 
@@ -206,7 +204,6 @@ Both are described in detail below.
 description
 
 
-
 
 
 3
@@ -215,7 +212,6 @@ Both are described in detail below.
 simple
 
 
-
 
 2
 2
@@ -223,7 +219,6 @@ Both are described in detail below.
 second number bigger
 
 
-
 
 1
 2
@@ -231,7 +226,6 @@ Both are described in detail below.
 subtraction
 
 
-
 
 1
 3
@@ -239,7 +233,6 @@ Both are described in detail below.
 three terms
 
 
-
 
 1
 4
@@ -247,7 +240,6 @@ Both are described in detail below.
 three terms with subtraction
 
 
-
 
 0
 0
@@ -851,12 +843,12 @@ will overwrite the same file.
 
 # Literate Programming
 
-This is written as a [literate 
program](https://en.wikipedia.org/wiki/Literate_programming) using [emacs 
org-mode](https://orgmode.org/).  [The org
-file](gimp-comic-book.md) contains the code and documentation for the math 
worksheet
-generation script.  When this file is saved, the source code is
-generated using `org-babel-tangle` and the readme is generated using
-`org-md-export-to-file`.
+This is written as a [literate 
program](https://en.wikipedia.org/wiki/Literate_programming) using [emacs
+org-mode](https://orgmode.org/). [The org file](mathsheet.org) contains the 
code and
+documentation for the math worksheet generation script.  When this
+file is saved, the source code is generated using `org-babel-tangle` and
+the readme is generated using `org-md-export-to-file`.
 
-The first line of [the org file](mathsheet.md) configures emacs to run those 
commands
+The first line of [the org file](mathsheet.org) configures emacs to run those 
commands
 whenever this file is saved, which generates the scripts and readme.
 
diff --git a/mathsheet.org b/mathsheet.org
index 9b8fcfab22..5b3bd55830 100644
--- a/mathsheet.org
+++ b/mathsheet.org
@@ -847,11 +847,11 @@ will overwrite the same file.
 #+end_src
 
 * Literate Programming
-This is written as a 
[[https://en.wikipedia.org/wiki/Literate_programming][literate program]] using 
[[https://orgmode.org/][emacs org-mode]].  [[file:gimp-comic-book.org][The org
-file]] contains the code and documentation for the math worksheet
-generation script.  When this file is saved, the source code is
-generated using =org-babel-tangle= and the readme is generated using
-=org-md-export-to-file=.
+This is written as a 
[[https://en.wikipedia.org/wiki/Literate_programming][literate program]] using 
[[https://orgmode.org/][emacs
+org-mode]]. [[file:mathsheet.org][The org file]] contains the code and
+documentation for the math worksheet generation script.  When this
+file is saved, the source code is generated using =org-babel-tangle= and
+the readme is generated using =org-md-export-to-file=.
 
 The first line of [[file:mathsheet.org][the org file]] configures emacs to run 
those commands
 whenever this file is saved, which generates the scripts and readme.



[elpa] externals/org-mathsheet 8c6b1e9cce 09/18: Add instruction and use template name for worksheet

2025-04-10 Thread ELPA Syncer
branch: externals/org-mathsheet
commit 8c6b1e9cce5c91cbba7e1b04feeffcf92e7e4667
Author: Ian Martins 
Commit: Ian Martins 

Add instruction and use template name for worksheet
---
 example.org   | 43 ++-
 mathsheet.org | 25 +
 2 files changed, 51 insertions(+), 17 deletions(-)

diff --git a/example.org b/example.org
index aec3af0dbb..728cdeaa43 100644
--- a/example.org
+++ b/example.org
@@ -18,23 +18,48 @@
 |  1 | 4 | [a=1..10] + [0..10] - [0..$a] | three with subtraction, 
positive result |
 |  0 | 0 | [$a*[1..5]] / [a=1..10]   | division
|
 
+#+BEGIN: problem-set :templates "add-sub-1" :count 21 :instruction "Compute 
the answer"
+| problem | answer |
+|-+|
+| 6 + 3   |  9 |
+| 1 + 6   |  7 |
+| 5 + 6   | 11 |
+| 2 + 0   |  2 |
+| 1 + 4   |  5 |
+| 8 + 7   | 15 |
+| 6 + 5   | 11 |
+| 2 + 3   |  5 |
+| 9 + 9   | 18 |
+| 3 + 8   | 11 |
+| 1 + 11  | 12 |
+| 4 + 2   |  6 |
+| 2 + 9   | 11 |
+| 1 + 4   |  5 |
+| 11 + 1  | 12 |
+| 6 + 0   |  6 |
+| 4 + 9   | 13 |
+| 7 + 10  | 17 |
+| 3 - 1   |  2 |
+| 9 - 8   |  1 |
+| 2 - 1   |  1 |
+#+END:
+
+* algebra
 #+name: algebra-1
 | weight | order | template   | descr  |
 |+---++|
 |  3 | 1 | x / ([2..4] + [a=0..5]) = [$a..10] | simple |
 |  3 | 2 | [$a*[2..10]] / x = [a=1,2,4]   | simple |
 
-#+BEGIN: problem-set :templates "algebra-1" :count 8
+#+BEGIN: problem-set :templates "algebra-1" :count 8 :instruction "Solve for x"
 | problem | answer |
 |-+|
-| x / (2 + 2) = 2 | x = 8  |
-| x / (2 + 0) = 8 | x = 16 |
 | x / (3 + 1) = 1 | x = 4  |
-| x / (3 + 4) = 7 | x = 49 |
+| x / (3 + 0) = 5 | x = 15 |
+| x / (2 + 4) = 5 | x = 30 |
+| x / (2 + 1) = 6 | x = 18 |
+| 16 / x = 2  | x = 8  |
 | 2 / x = 1   | x = 2  |
-| 7 / x = 1   | x = 7  |
-| 10 / x = 2  | x = 5  |
-| 28 / x = 4  | x = 7  |
+| 9 / x = 1   | x = 9  |
+| 8 / x = 4   | x = 2  |
 #+END:
-
-* bigger addition and multiplications
diff --git a/mathsheet.org b/mathsheet.org
index 386147c5b2..727252fd4b 100644
--- a/mathsheet.org
+++ b/mathsheet.org
@@ -475,6 +475,8 @@ I need to extract the values
   ;; should we generate the sheet?
   (when (y-or-n-p "Write worksheet? ")
 (ianxm/gen-worksheet
+ (plist-get params :templates)
+ (plist-get params :instruction)
  problems
 #+end_src
 
@@ -505,10 +507,13 @@ solution for how to enumerate with circled numbers from 
[[https://latex.org/foru
   \rhead{\textmd{\textsf{Date: \today}}}
   \cfoot{}
 
-  \renewcommand{\familydefault}{\ttdefault}
 
   \begin{document}
 
+  \noindent\textbf{<>}
+  \vspace{.2cm}
+  \renewcommand{\familydefault}{\ttdefault}
+
 \begin{multicols}{2}
   \begin{enumerate}[itemsep=0.5cm]
 <>
@@ -542,13 +547,16 @@ convert it to a pdf. We save it as ~worksheet.tex~ and 
the final
 worksheet is named ~worksheet.pdf~. Each execution will overwrite the
 same file.
 
- TODO get the base filename from the org buffer
-
-
 #+begin_src elisp :results silent :tangle mathsheet.el
-  (defun ianxm/gen-worksheet (problems)
-(with-temp-file "worksheet.tex"
+  (defun ianxm/gen-worksheet (template-name instruction problems)
+(with-temp-file (concat template-name ".tex")
   (insert ianxm/worksheet-template)
+
+  (goto-char (point-min))
+  (search-forward "<>")
+  (replace-match "")
+  (insert instruction)
+
   (goto-char (point-min))
   (search-forward "<>")
   (replace-match "")
@@ -558,12 +566,13 @@ same file.
(car row)))
   (insert (format"\\CircledItem %s = 
\\rule[-.2\\baselineskip]{2cm}{0.4pt}\n"
  (car row)
+
   (goto-char (point-min))
   (search-forward "<>")
   (replace-match "")
   (dolist (row problems)
-(insert (format "\\CircledItem %s\n\n"
+(insert (format "\\CircledItem %s\n"
 (cadr row)
-(shell-command "texi2pdf worksheet.tex"
+(shell-command (concat "texi2pdf " template-name ".tex")
(get-buffer-create "*Standard output*")))
 #+end_src



[elpa] externals/org-mathsheet b57ce5acc2 06/18: Tangle instead of executing source blocks in place

2025-04-10 Thread ELPA Syncer
branch: externals/org-mathsheet
commit b57ce5acc238c38d5d2d5e75dc29ae8c799c9f5a
Author: Ian Martins 
Commit: Ian Martins 

Tangle instead of executing source blocks in place
---
 example.org   |  38 
 mathsheet.org | 303 +++---
 2 files changed, 202 insertions(+), 139 deletions(-)

diff --git a/example.org b/example.org
new file mode 100644
index 00..53315935e0
--- /dev/null
+++ b/example.org
@@ -0,0 +1,38 @@
+* add and subtract
+
+#+name: first-set
+| weight | order | template  | descr  |
+|+---+---+|
+|  3 | 1 | [1..10] + [0..10] | simple |
+|  2 | 2 | [1..10] + [8..15] | second number bigger   |
+|  1 | 2 | [a=3..10] - [0..$a]   | subtraction|
+|  1 | 3 | [1..10] + [1..7] + [1..5] | three numbers  |
+|  1 | 4 | [a=1..10] + [0..10] - [0..$a] | three with subtraction |
+|  0 | 0 | [$a*[1..5]] / [a=1..10]   | division   |
+
+#+BEGIN: problem-set :templates "first-set" :count 21 :name "Noble"
+| problem   | answer |
+|---+|
+| 2 + 7 |  9 |
+| 1 + 3 |  4 |
+| 4 + 6 | 10 |
+| 7 + 0 |  7 |
+| 9 + 1 | 10 |
+| 6 + 7 | 13 |
+| 6 + 8 | 14 |
+| 3 + 13| 16 |
+| 9 + 11| 20 |
+| 9 - 2 |  7 |
+| 4 - 1 |  3 |
+| 5 + 14| 19 |
+| 5 + 11| 16 |
+| 1 + 10| 11 |
+| 8 - 3 |  5 |
+| 7 + 5 + 2 | 14 |
+| 2 + 5 + 4 | 11 |
+| 9 + 4 + 2 | 15 |
+| 5 + 8 - 4 |  9 |
+| 5 + 8 - 3 | 10 |
+| 7 + 9 - 2 | 14 |
+#+END:
+* bigger addition and multiplications
diff --git a/mathsheet.org b/mathsheet.org
index 854493acfe..d30683cc33 100644
--- a/mathsheet.org
+++ b/mathsheet.org
@@ -1,18 +1,14 @@
-* goal
-The goal is to generate a math practice sheet made up of dynamic problems that 
are defined in flexible templates.
+* Goal
+The goal is to generate a math practice sheet made up of dynamic
+problems that are defined based on flexible templates. The problem
+distribution and order is also configurable.
 
 Similar to https://www.math-aids.com.
-* script
-** vars
-This sets the name at the top of the page as well as the number of
-problems on the worksheet.
-
-#+property: header-args+ :var student="Noble" problem-count=26
-
-** problem set examples
+* Problem Templates
+** Description
 This section contains some example templates. Each table defines a
-worksheet. Each time the worksheet is created the problems are
-generated randomly.
+worksheet. Each time the worksheet is generated the problems are
+re-randomized.
 
 The table contains the following columns:
 - weight :: the relative number of this type of problem to include on
@@ -33,7 +29,7 @@ in square brackets.
   placeholder
 - [0..[$a/2]] :: placeholders can be embedded within placeholders
 
-*** add and subtract
+** Examples
 
 #+name: firstset
 | weight | order | template  | descr  |
@@ -45,50 +41,54 @@ in square brackets.
 |  1 | 4 | [a=1..10] + [0..10] - [0..$a] | three with subtraction |
 |  0 | 0 | [$a*[1..5]] / [a=1..10]   | division   |
 
+* script
 ** problem generation
+*** variables
+Need ~var-list~ to keep track of the variables between fields.
 
-TODO create a package. if you C-c C-c on a table
-1. if you are on the header, generate a worksheet
-2. if you on on a row, generate a single example
+~worksheet-template~ is the LaTeX template for the worksheet.
 
-*** var-list
-need ~var-list~ to keep track of the variables between fields.
+#+begin_src elisp :tangle mathsheet.el :var page=page
+  (defvar ianxm/var-list '()
+"List of variables used in a problem")
 
-#+name: var-list
-#+begin_src elisp
-(defvar ianxm/var-list '()
-"List of variables used in a problem")
+  (defconst ianxm/worksheet-template page
+"LaTeX template for worksheet")
 #+end_src
-*** scan field
+*** scan problem
 
-must call with point at the start of a field. moves the point to the
-end of the field. returns a list of fields, formatted as:
+must call with point at the start of a problem. moves the point to the
+end of the problem. returns a list of fields, formatted as:
 
 #+begin_example
 '(var (deps) start-marker end-marker nil)
 #+end_example
 
-~var~ is a variable name if there is an assignment, or it is a
-placeholder like ~_0~, ~_1~, etc. the last entry is nil for "not
-visited." ~var~ must be interned and must be the first index since we
-use this as an alist.
+~var~ is a variable name if there is an assignment, otherwise it is a
+placeholder like ~_0~, ~_1~, etc.
 
 ~start-marker~ and ~end-marker~ are markers in the (temp) buffer.
 
+The last entry is ~nil~ for "not visited."  ~var~ must be interned and
+must be the first index since we use this as an alist later.
+
 f

[elpa] externals/org-mathsheet d4415d4e63 05/18: can generate worksheets using new templates

2025-04-10 Thread ELPA Syncer
branch: externals/org-mathsheet
commit d4415d4e637d73f8a62f589895d6be52ff84b48e
Author: Ian Martins 
Commit: Ian Martins 

can generate worksheets using new templates
---
 mathsheet.org | 214 +-
 1 file changed, 121 insertions(+), 93 deletions(-)

diff --git a/mathsheet.org b/mathsheet.org
index 2f08aec235..854493acfe 100644
--- a/mathsheet.org
+++ b/mathsheet.org
@@ -1,16 +1,42 @@
 * goal
-the goal is to generate a math practice sheet.
+The goal is to generate a math practice sheet made up of dynamic problems that 
are defined in flexible templates.
 
-similar to https://www.math-aids.com
+Similar to https://www.math-aids.com.
 * script
 ** vars
+This sets the name at the top of the page as well as the number of
+problems on the worksheet.
+
 #+property: header-args+ :var student="Noble" problem-count=26
 
-** problem sets
+** problem set examples
+This section contains some example templates. Each table defines a
+worksheet. Each time the worksheet is created the problems are
+generated randomly.
+
+The table contains the following columns:
+- weight :: the relative number of this type of problem to include on
+  the worksheet.
+- order :: problems are ordered on the sheet in ascending order. two
+  problems with the same order will be intermingled.
+- template :: this is the template used to generate problems of this
+  type. Templates are described in more detail below.
+- descr :: just notes, not used in worksheet generation.
+
+Templates are problems but the numbers are replaced with placeholders
+in square brackets.
+- [0..10] :: any number from 0 to 10
+- [a=...] :: assign the variable a to the number chosen for this field
+- [1,3,5] :: choose 1 or 3 or 5
+- [10/(2-1)] :: evaluate the expression
+- [-2..$a] :: any number from -2 to the value assigned to a in another
+  placeholder
+- [0..[$a/2]] :: placeholders can be embedded within placeholders
+
 *** add and subtract
 
 #+name: firstset
-| weight | order | problem   | descr  |
+| weight | order | template  | descr  |
 |+---+---+|
 |  3 | 1 | [1..10] + [0..10] | simple |
 |  2 | 2 | [1..10] + [8..15] | second number bigger   |
@@ -73,12 +99,11 @@ new field to the list when we close the current field.
(space (* [space]))
(open (region "[")
  `(l r -- (progn
-(setq
- open-fields (push (list
-(intern (concat "_" 
(number-to-string field-index)))
-nil (copy-marker l) nil nil)
-   open-fields)
- field-index (1+ field-index))
+(push (list
+   (intern (concat "_" (number-to-string 
field-index)))
+   nil (copy-marker l) nil nil)
+  open-fields)
+field-index (1+ field-index)
 ".")))
(assignment (region (substring letter)) "="
`(l v r -- (progn
@@ -88,20 +113,14 @@ new field to the list when we close the current field.
 ".")))
(var "$" (substring letter)
 `(v -- (progn
- (setcar
-  (nthcdr 1 (car open-fields))
-  (push (intern v) (nth 1 (car open-fields
+ (push (intern v) (cadar open-fields))
  ".")))
(close (region "]")
   `(l r -- (progn
- (setcar (nthcdr 3 (car open-fields)) (copy-marker 
l t))
+ (setcar (cdddar open-fields) (copy-marker l t))
  (when (> (length open-fields) 1)
-   (setcar
-(nthcdr 1 (nth 1 open-fields))
-(push (caar open-fields) (nth 1 (nth 1 
open-fields)
- (setq
-  closed-fields
-  (push (pop open-fields) closed-fields))
+   (push (caar open-fields) (cadadr open-fields)))
+ (push (pop open-fields) closed-fields)
  ".")))
(letter [a-z])
(digit [0-9])
@@ -122,41 +141,41 @@ reduces.
 
 #+name: reduce-field
 #+begin_src elisp
-(defun ianxm/reduce-field ()
-  (interactive)
-  (with-peg-rules
-  ((field "[" space (or range sequence assignment expression value) 
space "]")
-   (expression (list value space operation s

[elpa] externals/org-mathsheet 1cd7959d03 04/18: Can generate sheet based on templates

2025-04-10 Thread ELPA Syncer
branch: externals/org-mathsheet
commit 1cd7959d035fff1dc262f44e7ae0932c7642c57d
Author: Ian Martins 
Commit: Ian Martins 

Can generate sheet based on templates
---
 mathsheet.org | 202 ++
 1 file changed, 119 insertions(+), 83 deletions(-)

diff --git a/mathsheet.org b/mathsheet.org
index e3a13d57ae..2f08aec235 100644
--- a/mathsheet.org
+++ b/mathsheet.org
@@ -4,7 +4,7 @@ the goal is to generate a math practice sheet.
 similar to https://www.math-aids.com
 * script
 ** vars
--#+property: header-args+ :var student="Noble" problem-count=24
+#+property: header-args+ :var student="Noble" problem-count=26
 
 ** problem sets
 *** add and subtract
@@ -14,9 +14,9 @@ similar to https://www.math-aids.com
 |+---+---+|
 |  3 | 1 | [1..10] + [0..10] | simple |
 |  2 | 2 | [1..10] + [8..15] | second number bigger   |
+|  1 | 2 | [a=3..10] - [0..$a]   | subtraction|
 |  1 | 3 | [1..10] + [1..7] + [1..5] | three numbers  |
-|  1 | 4 | [a=3..10] - [0..$a]   | subtraction|
-|  1 | 4 | [a=1..10] + [0..10] - [1..$a] | three with subtraction |
+|  1 | 4 | [a=1..10] + [0..10] - [0..$a] | three with subtraction |
 |  0 | 0 | [$a*[1..5]] / [a=1..10]   | division   |
 
 ** problem generation
@@ -159,23 +159,6 @@ reduces.
  (lambda (x) (funcall x)
 #+end_src
 
-#+begin_example
-  simple range
-  [10..11]
-
-  complex range
-  [-10..[10..20]]
-
-  complex with assignment
-  [a=1..[2..8]]
-
-  complex with inner assignment
-  [-10..[b=10..20]]
-
-  simple with variable
-  [0..[$a..$b]]
-#+end_example
-
 *** replace field
 
 replace a field with the value returned from processing it.
@@ -234,7 +217,7 @@ processes all fields in a problem.
 
   ;; find fields, assignments, dependencies
   (setq fields (ianxm/scan-problem))
-  (message "fields %s" fields)
+  ;;(message "fields %s" fields)
 
   ;; order fields according to dependencies
   (dolist (node fields)
@@ -247,93 +230,146 @@ test with this
 #+begin_src elisp :noweb yes
   <>
 
-  (ianxm/fill-problem "[1..12] + [1..10]")
+  ;;(ianxm/fill-problem "[1..12] + [1..10]")
   ;;(ianxm/fill-problem "[1..[2..[10..100]]]")
   ;;(ianxm/fill-problem "[$a*[1..10]] / [a=1..10]")
   ;;(ianxm/fill-problem "[$a]/(3+[a=1..5])")
+  (ianxm/fill-problem "[-10..[10..20]]")
 
 #+end_src
 
 #+RESULTS:
-: 11 + 8
+: -7
+
+other examples
+#+begin_example
+  simple range
+  [10..11]
+
+  complex range
+  [-10..[10..20]]
+
+  complex with assignment
+  [a=1..[2..8]]
+
+  complex with inner assignment
+  [-10..[b=10..20]]
+
+  simple with variable
+  [0..[$a..$b]]
+#+end_example
 
 *** full script
 tangles everything needed to convert a template to a problem
 
 #+name: full
 #+begin_src elisp :noweb yes :tangle mathsheet.el
-<>
+  <>
 
-<>
+  <>
 
-<>
+  <>
 
-<>
+  <>
 
-<>
+  <>
 
-<>
+  <>
 
-<>
-#+end_src
-** generate problem set from template
+  <>
 
-#+name: problem-set
-#+begin_src elisp :noweb yes :var template=first-set
-  (let (prob ret)
-(dotimes (index problem-count ret)
-  (setq prob
-<>)
-  (setq ret (push (list (car prob) (cdr prob)) ret 
+  <>
+#+end_src
+** generate problem set from templates
+
+1. load table
+2. determine how many of each
+   1. sort by weight, low to high
+   2. for each row
+  1. calculate number, round with min 1, but 0->0
+   3. for last entry (highest weight) just take however many are left.
+   4. produce '(order template nil) for each problem
+   5. convert to '(order problem answer)
+3. sort
+4. loop through list, replacing entry with '(problem . solution)
+
+#+name: generate-problems
+#+begin_src elisp :results table :var templates=firstset
+  (defun ianxm/generate-problems ()
+(let (total-weight problems)
+  ;; sort by weight (low to high)
+  (setq templates (sort templates (lambda (a b) (< (car a) (car b
+;; calc total weight
+total-weight (float
+  (seq-reduce (lambda (total item) (+ total (car 
item)))
+  templates
+  0)))
+  ;; calculate number for each row
+  (dotimes (ii (length templates) problems)
+(let* (problem answer
+   (item (nth ii templates))
+   (weight (car item))
+   (needed (cond
+((= weight 0)
+ 0)
+((= ii (1- (length templates)))
+ (- problem-count (length problems)))
+(t
+ (max (round (* (/ weight total-weight) 
problem-count) ) 1)
+  ;; add probl

[elpa] externals/org-mathsheet c3b9570c2b 10/18: Use latex math formatting, allow exponent and sqrt

2025-04-10 Thread ELPA Syncer
branch: externals/org-mathsheet
commit c3b9570c2bd3756111946a4debda724527f92085
Author: Ian Martins 
Commit: Ian Martins 

Use latex math formatting, allow exponent and sqrt
---
 example.org   | 21 +++--
 mathsheet.org | 41 +
 2 files changed, 40 insertions(+), 22 deletions(-)

diff --git a/example.org b/example.org
index 728cdeaa43..3abbe060bd 100644
--- a/example.org
+++ b/example.org
@@ -50,16 +50,17 @@
 |+---++|
 |  3 | 1 | x / ([2..4] + [a=0..5]) = [$a..10] | simple |
 |  3 | 2 | [$a*[2..10]] / x = [a=1,2,4]   | simple |
+|  1 | 3 | x^2 = sqrt([16 - $a] + [a=1..5])   | simple |
 
 #+BEGIN: problem-set :templates "algebra-1" :count 8 :instruction "Solve for x"
-| problem | answer |
-|-+|
-| x / (3 + 1) = 1 | x = 4  |
-| x / (3 + 0) = 5 | x = 15 |
-| x / (2 + 4) = 5 | x = 30 |
-| x / (2 + 1) = 6 | x = 18 |
-| 16 / x = 2  | x = 8  |
-| 2 / x = 1   | x = 2  |
-| 9 / x = 1   | x = 9  |
-| 8 / x = 4   | x = 2  |
+| problem| answer |
+|+|
+| x / (3 + 0) = 5| x = 15 |
+| x / (3 + 4) = 9| x = 63 |
+| x / (3 + 0) = 4| x = 12 |
+| 12 / x = 2 | x = 6  |
+| 8 / x = 2  | x = 4  |
+| 36 / x = 4 | x = 9  |
+| 6 / x = 2  | x = 3  |
+| x^2 = sqrt(13 + 3) | x = 2  |
 #+END:
diff --git a/mathsheet.org b/mathsheet.org
index 727252fd4b..3f18868811 100644
--- a/mathsheet.org
+++ b/mathsheet.org
@@ -1,9 +1,7 @@
 * Goal
 The goal is to generate a math practice sheet made up of dynamic
-problems that are defined based on flexible templates. The problem
-distribution and order is also configurable.
-
-Similar to https://www.math-aids.com.
+problems that are defined based on a set of flexible templates. The
+problem distribution and order should also be configurable.
 * Problem Templates
 ** Overview
 This section contains some example templates. Each table defines a
@@ -46,6 +44,11 @@ that generates the worksheet. Only the first three columns 
are used.
 
 * Code walkthrough
 ** Problem generation
+*** Header
+#+begin_src elisp :tangle mathsheet.el
+;;; mathsheet.el --- Generate dynamic math worksheets  -*- lexical-binding:t 
-*-
+#+end_src
+
 *** Dependencies
 This package needs [[https://elpa.gnu.org/packages/peg.html][peg]].
 
@@ -115,7 +118,7 @@ new field to the list when we close the current field.
   alg-vars)
 
   (with-peg-rules
-  ((stuff (* (or asn-var alg-var digit symbol field space)))
+  ((stuff (* (or asn-var math-func alg-var digit symbol field space)))
(field open (opt assignment) stuff close)
(space (* [space]))
(open (region "[")
@@ -149,9 +152,10 @@ new field to the list when we close the current field.
(push (caar open-fields) (cadadr open-fields)))
  (push (pop open-fields) closed-fields)
  ".")))
+   (math-func (or "sqrt"))
(letter [a-z])
(digit [0-9])
-   (symbol (or "." "," "+" "-" "*" "/" "(" ")" "=")))
+   (symbol (or "." "," "+" "-" "*" "/" "^" "(" ")" "=")))
 
 (peg-run (peg stuff)
  (lambda (x) (message "failed %s" x))
@@ -540,12 +544,25 @@ solution for how to enumerate with circled numbers from 
[[https://latex.org/foru
 
   \end{document}
 #+end_src
+*** Convert calc to latex
+Convert a calc expression to latex format.
+
+#+name: convert-to-latex
+#+begin_src elisp :tangle mathsheet.el
+  (defun ianxm/convert-to-latex (expr)
+(let* ((calc-language 'latex)
+   (calc-expr (math-read-expr expr))
+   (latex-expr (math-format-stack-value (list calc-expr 1 nil)))
+   (latex-expr-cleaned (replace-regexp-in-string (rx "1:" (* space)) 
"" latex-expr)))
+  (concat "$" latex-expr-cleaned "$")))
+#+end_src
 *** Write PDF
 
 This writes the generated into a local file and runs ~texi2pdf~ to
-convert it to a pdf. We save it as ~worksheet.tex~ and the final
-worksheet is named ~worksheet.pdf~. Each execution will overwrite the
-same file.
+convert it to a pdf. We save it as ~[template-name].tex~ and the final
+worksheet is named ~[template-name].pdf~. Each execution with the same
+template name will overwrite the same file.
+
 
 #+begin_src elisp :results silent :tangle mathsheet.el
   (defun ianxm/gen-worksheet (template-name instruction problems)
@@ -563,16 +580,16 @@ same file.
   (dolist (row problems)
 (if (cadddr row)
 (insert (format"\\CircledItem %s\\vspace{4cm}\n"
-   (car row)))
+   (ianxm/convert-to-latex (car row
   (insert (format"\\CircledItem %s = 
\\rule[-.2\\baselineskip]{2cm}{0.4pt}\n"
- (car row)
+ (ianxm/convert-to-latex (car row))
 
   

[elpa] externals/colorful-mode 6bfed16947 3/3: Improve colorful-only-strings behavior.

2025-04-10 Thread ELPA Syncer
branch: externals/colorful-mode
commit 6bfed16947334e8f27069a3606aa0885e4026c92
Author: Elías Gabriel Pérez 
Commit: Elías Gabriel Pérez 

Improve colorful-only-strings behavior.

* colorful-mode.el (colorful-only-strings, colorful--colorize):
Make `only-prog' highlight inside strings only if current major mode
is prog-mode, otherwise just highlight anywhere.
---
 colorful-mode.el | 21 +++--
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/colorful-mode.el b/colorful-mode.el
index 2b2f99fbee..f5a010440d 100644
--- a/colorful-mode.el
+++ b/colorful-mode.el
@@ -306,8 +306,9 @@ Setting this to non-nil can make converted hex inaccurate."
 
 (defcustom colorful-only-strings nil
   "If non-nil, colorful will only highlight colors inside strings.
-If set to `only-prog', only highlight colors in strings if the current
-major mode is derived from `prog-mode'."
+If set to `only-prog', the colors in `prog-mode' will be highlighted
+only if they are inside a string.
+This doesn't include `css-mode' and derived."
   :type '(choice boolean (const :tag "Only in prog-modes" only-prog)))
 
 
@@ -626,15 +627,15 @@ J-L-END is the position where jit-lock region ends."
 (not (nth 4 (syntax-ppss)))
 ;; ... and wheter color is in a string according 
colorful-only-strings...
 (or (not colorful-only-strings)
-(and (eq colorful-only-strings 'only-prog)
- (derived-mode-p 'prog-mode)
- (nth 3 (syntax-ppss)))
-;; CSS is prog-mode derived so ignore only-strings
-;; in CSS derived modes.
 (and colorful-only-strings
- (or (derived-mode-p 'css-mode)
- (derived-mode-p 'LaTeX-mode)
- (nth 3 (syntax-ppss
+ (nth 3 (syntax-ppss)))
+(and (eq colorful-only-strings 'only-prog)
+ (or (not (derived-mode-p 'prog-mode))
+ ;; CSS is prog-mode derived so ignore 
only-strings
+ ;; in CSS derived modes.
+ (derived-mode-p 'css-mode)
+ (and (derived-mode-p 'prog-mode)
+  (nth 3 (syntax-ppss)
 
 (let* ((match-1 (match-string-no-properties 1))
(match-2 (match-string-no-properties 2))



[elpa] externals/colorful-mode a92e2b5b9c 1/3: Use jit-lock region positions for css color variables highlighting.

2025-04-10 Thread ELPA Syncer
branch: externals/colorful-mode
commit a92e2b5b9cf8310692317b618e747564bec28dbb
Author: Elías Gabriel Pérez 
Commit: Elías Gabriel Pérez 

Use jit-lock region positions for css color variables highlighting.

* README.org (Disable colorful in regions):
* colorful-mode.el (colorful--shorten-hex): Rename function...
(colorful--short-hex): ... to this.
(colorful--name-to-hex): Remove unnecessary computation.
(colorful--get-css-variable-color): Convert macro to function.
(colorful--colorize): Add optional argument.
(colorful-mode-fontify-region): Add better case-insensitive colors
detection.
(colorful-color-name-font-lock-keywords): Remove lambda.
---
 README.org   |   2 +-
 colorful-mode.el | 145 ---
 2 files changed, 86 insertions(+), 61 deletions(-)

diff --git a/README.org b/README.org
index 71ef058a91..36b5cf763a 100644
--- a/README.org
+++ b/README.org
@@ -211,7 +211,7 @@ for you:
   ;; the region is.
   (dolist (ov (overlays-in beg end))
 (when (overlay-get ov 'colorful--overlay)
-  (remove-overlays (overlay-start ov) (overlay-end ov) 
'colorful--overlay t))
+  (delete-overlay ov))
 
 (add-hook 'deactivate-mark-hook
   (lambda ()
diff --git a/colorful-mode.el b/colorful-mode.el
index 5f24c30884..bf2d72377d 100644
--- a/colorful-mode.el
+++ b/colorful-mode.el
@@ -257,11 +257,19 @@ Available functions are:
   "If non-nil, use a prefix to preview color instead of highlighting them."
   :type 'boolean)
 
+;; (defcustom colorful-use-indicator nil
+;;   "If non-nil, use a string as indicator instead highlight.
+;;   :type 'boolean)
+
+;; (define-obsolete-variable-alias colorful-use-prefix colorful-use-indicator 
"1.3.0")
+
 (defcustom colorful-prefix-string "●"
   "String to be used in highlights.
 Only relevant if `colorful-use-prefix' is non-nil."
   :type 'string)
 
+;; (define-obsolete-variable-alias colorful-prefix-string 
colorful-indicator-string "1.3.0")
+
 (defcustom colorful-prefix-alignment 'left
   "The position to place the prefix string.
 The value can be `left' or `right'.
@@ -269,21 +277,30 @@ Only relevant if `colorful-use-prefix' is non-nil."
   :type '(choice (const :tag "Left" left)
  (const :tag "Right" right)))
 
+;; (defcustom colorful-indicator-alignment 'left
+;;   "The position to place the indicator string.
+;; The value can be `left' or `right'.
+;; Only relevant if `colorful-use-prefix' is non-nil."
+;;   :type '(choice (const :tag "Left" left)
+;;  (const :tag "Right" right)))
+
+;; (define-obsolete-variable-alias colorful-prefix-alignment 
colorful-indicator-alignment "1.3.0")
+
 (defcustom colorful-exclude-colors '("#define")
   "List of keywords not to highlight."
   :type '(repeat string))
 
-;; XXX: deprecate?
 (defcustom colorful-excluded-buffers nil
   "Do not activate colorful in these buffers.
 In case colorful breaks a buffer, such as a buffer
 derived from `help-mode', this option can be useful for you."
   :type '(repeat string))
 
+;; (make-obsolete-variable colorful-excluded-buffers nil "1.3.0")
+
 (defcustom colorful-short-hex-conversions t
-  "If non-nil, hex values converted by colorful should be as short as possible.
-Setting this to non-nil will make hex values follow a 24-bit
-specification (#RRGGBB[AA]) and can make them inaccurate."
+  "If non-nil, colorful will converted long hex colors to \"#RRGGBB\" format.
+Setting this to non-nil can make converted hex inaccurate."
   :type 'boolean)
 
 (defcustom colorful-only-strings nil
@@ -313,10 +330,9 @@ If PERCENTAGE is above 100%, it is converted to 100."
   (/ (* (min (string-to-number percentage) 100) 255) 100)
 (string-to-number percentage)))
 
-(defun colorful--shorten-hex (hex)
-  "Convert a 6-digit hexadecimal color representation to a 3-digit 
representation.
-HEX should be a string in the format `#RRGGBB' (6-digit form).
-If ALPHA is non-nil then use `#RRGGBBAA' format"
+(defun colorful--short-hex (hex)
+  "Convert a 12-digit hexadecimal color form to a 6-digit form.
+HEX should be a string in the format `#' (12-digit form)."
   (if colorful-short-hex-conversions
   (let ((r (substring hex 1 5))
 (g (substring hex 5 9))
@@ -372,8 +388,8 @@ H must be a float not divided."
 
 (defun colorful--name-to-hex (name)
   "Return color NAME as hex color format."
-  (if-let* ((color-name (color-name-to-rgb name)))
-  (apply #'color-rgb-to-hex color-name)
+  (if (color-defined-p name)
+  name
 (cdr (assoc-string name colorful-html-colors-alist t
 
 ; Overlay functions
@@ -513,11 +529,11 @@ CHOICE is used for get kind of color."
(pcase kind
  ('hex "%s is already a Hex color. Try again: ")
  ;; Is COLOR a Name?
- ('color-name (list (colorful--shorten-hex color-value) beg end))
+ ('color-name 

[elpa] externals/colorful-mode updated (0ebfa75fe1 -> 6bfed16947)

2025-04-10 Thread ELPA Syncer
elpasync pushed a change to branch externals/colorful-mode.

  from  0ebfa75fe1 Use jit-lock instead font-lock-add-keywords.
   new  a92e2b5b9c Use jit-lock region positions for css color variables 
highlighting.
   new  34d301400f Remove unnecessary computation.
   new  6bfed16947 Improve colorful-only-strings behavior.


Summary of changes:
 README.org   |   2 +-
 colorful-mode.el | 217 +++
 test/css.css |   6 +-
 3 files changed, 128 insertions(+), 97 deletions(-)



[elpa] externals/colorful-mode 34d301400f 2/3: Remove unnecessary computation.

2025-04-10 Thread ELPA Syncer
branch: externals/colorful-mode
commit 34d301400f91e79a3b32f5fcfcb35e6ac247464c
Author: Elías Gabriel Pérez 
Commit: Elías Gabriel Pérez 

Remove unnecessary computation.

* colorful-mode.el (colorful--percentage-to-absolute): Fix percentage
convertion.
(colorful--rgb-to-hex): Remove function.
(colorful--hsl-to-hex): Support grad and rad.
(colorful--colorize): Fix computation
(colorful-rgb-font-lock-keywords): Ungroup alpha.
(colorful-hsl-font-lock-keywords): Add grad and rad keywords.
* test/css.css: Update tests.
---
 colorful-mode.el | 85 +---
 test/css.css |  6 ++--
 2 files changed, 48 insertions(+), 43 deletions(-)

diff --git a/colorful-mode.el b/colorful-mode.el
index bf2d72377d..2b2f99fbee 100644
--- a/colorful-mode.el
+++ b/colorful-mode.el
@@ -248,6 +248,7 @@ Available functions are:
 (choice :tag "Function(s)" (repeat function)
 function))
   function)))
+;; TODO: (define-obsolete-variable-alias 
colorful-extra-color-keyword-functions [INSERT NAME] "1.3.0")
 
 (defcustom colorful-allow-mouse-clicks t
   "If non-nil, allow using mouse buttons to change color."
@@ -324,10 +325,10 @@ major mode is derived from `prog-mode'."
   "Return PERCENTAGE as an absolute number.
 PERCENTAGE must be a string.
 If PERCENTAGE is absolute, return PERCENTAGE as a number.
-This will convert \"80 %\" to 204, \"100 %\" to 255 but not \"123\".
+This will convert \"80%\" to 204, \"100%\" to 255 but not \"123\".
 If PERCENTAGE is above 100%, it is converted to 100."
-  (if (seq-contains-p percentage ?%)
-  (/ (* (min (string-to-number percentage) 100) 255) 100)
+  (if (string-suffix-p "%" percentage)
+  (min (max 0 (* 255 (/ (string-to-number percentage) 100.0))) 255)
 (string-to-number percentage)))
 
 (defun colorful--short-hex (hex)
@@ -343,16 +344,14 @@ HEX should be a string in the format `#' 
(12-digit form)."
 (/ (string-to-number b 16) 256)))
 hex))
 
-(defun colorful--rgb-to-hex (r g b)
-  "Return CSS R G B as hexadecimal format."
-  (if-let* ((r (/ r 255.0))
-(g (/ g 255.0))
-(b (/ b 255.0)))
-  (color-rgb-to-hex r g b)))
-
 (defun colorful--hsl-to-hex (h s l)
   "Return CSS H S L as hexadecimal format."
-  (if-let* ((h (/ (string-to-number h) 360.0))
+  (if-let* ((h (cond
+((string-suffix-p "grad" h)
+ (/ (string-to-number h) 400.0))
+((string-suffix-p "rad" h)
+ (/ (string-to-number h) (* 2 float-pi)))
+(t (/ (string-to-number h) 360.0
 (s (/ (string-to-number s) 100.0))
 (l (/ (string-to-number l) 100.0)))
   (apply #'color-rgb-to-hex (color-hsl-to-rgb h s l
@@ -464,7 +463,7 @@ If region is active, convert colors in mark."
 (result (car (colorful--prompt-converter colorful-ov "Copy '%s' 
as: ")))
 ;; Propertize text for message.
 (color (propertize result 'face `(:foreground
-  ,(color-name-to-rgb result)
+  ,(readable-foreground-color 
result)
   :background ,result
   ;; Copy color and notify to user it's done
   (progn (kill-new color)
@@ -634,6 +633,7 @@ J-L-END is the position where jit-lock region ends."
 ;; in CSS derived modes.
 (and colorful-only-strings
  (or (derived-mode-p 'css-mode)
+ (derived-mode-p 'LaTeX-mode)
  (nth 3 (syntax-ppss
 
 (let* ((match-1 (match-string-no-properties 1))
@@ -651,10 +651,10 @@ J-L-END is the position where jit-lock region ends."
 ('latex-rgb
  (setq color
(if (string-prefix-p "{R" color)  ; Check if it's RGB (shorted 
as "{R")
-   (colorful--rgb-to-hex
-(string-to-number match-1) ; r
-(string-to-number match-2) ; g
-(string-to-number match-3)) ; b
+   (format "#%02x%02x%02x"
+   (/ (string-to-number match-1) 250.0) ; r
+   (/ (string-to-number match-2) 250.0) ; g
+   (/ (string-to-number match-3) 250.0)) ; b
  (color-rgb-to-hex
   (string-to-number match-1) ; r
   (string-to-number match-2) ; g
@@ -668,12 +668,13 @@ J-L-END is the position where jit-lock region ends."
 (color-hsl-to-rgb 0 0 (string-to-number 
match-1)
 
 ('css-rgb
- (setq color (colorful--rgb-to-hex (colorful--percentage-to-absolute 
match-1) ; r
-   (colorful--percentage-to-absolute 
match-2) ; g

[elpa] main 5dd9a6bdf4: elpa-packages (org-mathsheet): New package

2025-04-10 Thread Stefan Monnier via
branch: main
commit 5dd9a6bdf42f860f9791e7549e8112005b49cbae
Author: Stefan Monnier 
Commit: Stefan Monnier 

elpa-packages (org-mathsheet): New package
---
 elpa-packages | 4 
 1 file changed, 4 insertions(+)

diff --git a/elpa-packages b/elpa-packages
index c5f29a567b..53b51f1fa4 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -273,6 +273,8 @@
  (dismal   :url nil)
  (djvu :url nil)
  (do-at-point   :url "https://codeberg.org/pkal/do-at-point.el";)
+ ;; FIXME: `doc-follow` or `doc-view-follow`?
+ ;;(doc-follow :url "https://github.com/ultronozm/doc-view-follow.el";)
  (doc-toc  :url "https://github.com/dalanicolai/doc-tools-toc";
   :ignored-files ("LICENSE"))
  (docbook  :url nil)
@@ -596,6 +598,8 @@
   :doc "doc/org-gnosis.org")
  (org-jami-bot :url "https://gitlab.com/hperrey/org-jami-bot";
   :ignored-files ("LICENSE"))
+ (org-mathsheet:url "https://gitlab.com/ianxm/org-mathsheet";
+  :doc "mathsheet.org")
  ;; FIXME: Waiting for copyright paperwork from Brandon Webster.
  ;;(org-drill  :url "https://gitlab.com/phillord/org-drill";)
  (org-modern   :url "https://github.com/minad/org-modern";



[nongnu] elpa/helm 39f79875bf 2/4: Only docstring

2025-04-10 Thread ELPA Syncer
branch: elpa/helm
commit 39f79875bfc9f784845ae9d59b75c856f3311f12
Author: Thierry Volpiatto 
Commit: Thierry Volpiatto 

Only docstring
---
 helm-core.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/helm-core.el b/helm-core.el
index 9964d3fd27..eb954bd3c1 100644
--- a/helm-core.el
+++ b/helm-core.el
@@ -2034,9 +2034,9 @@ The hook should takes one arg SOURCES.")
 
 (defvar helm-dim-prompt-on-update nil
   "Dim prompt when updating.
-Do not set this globaly.  Do not use this in async sources or in
+Do not set this globally.  Do not use this in async sources or in
 commands using an async source in their sources.
-Use this either let-bounded of helm buffer local.")
+Use this either let-bounded or helm buffer local.")
 
 ;; Utility: logging
 (defun helm-log (from format-string &rest args)



[elpa] externals/modus-themes 6725de0b9f 2/3: Further tweak the value of modus-vivendi-tinted 'green-warmer'

2025-04-10 Thread ELPA Syncer
branch: externals/modus-themes
commit 6725de0b9f191b113c7164a86e7c3366fe4760cd
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Further tweak the value of modus-vivendi-tinted 'green-warmer'
---
 modus-vivendi-tinted-theme.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modus-vivendi-tinted-theme.el b/modus-vivendi-tinted-theme.el
index ef61f64881..026b948a72 100644
--- a/modus-vivendi-tinted-theme.el
+++ b/modus-vivendi-tinted-theme.el
@@ -74,7 +74,7 @@ which corresponds to a minimum contrast in relative luminance 
of
   (red-faint   "#ef8386")
   (red-intense "#ff5f5f")
   (green   "#44bc44")
-  (green-warmer"#75ca27")
+  (green-warmer"#75c12b")
   (green-cooler"#00c06f")
   (green-faint "#88ca9f")
   (green-intense   "#44df44")



[nongnu] elpa/cider 2c855f9c56: Add client-info to clone op (#3806)

2025-04-10 Thread ELPA Syncer
branch: elpa/cider
commit 2c855f9c561f27ef46c1b6aaf6c315a68b442b33
Author: Eric Dallo 
Commit: GitHub 

Add client-info to clone op (#3806)

* Add client-info to clone op

* fix nrepl server mock
---
 CHANGELOG.md  | 1 +
 nrepl-client.el   | 6 +-
 test/nrepl-server-mock.el | 5 -
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index f3655d073f..e65ff28e03 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -27,6 +27,7 @@
 - [#3797](https://github.com/clojure-emacs/cider/issues/3797): Completion: 
enable `cider-completion-style` by default (this enables richer completion 
suggestions where candidates don't have to strictly match the prefix).
 - [#3803](https://github.com/clojure-emacs/cider/pull/3803): Enable dynamic 
indentation for `clojure-ts-mode`.
 - [#3805](https://github.com/clojure-emacs/cider/pull/3805): Profiler: update 
to latest profiling middleware.
+- [#3806](https://github.com/clojure-emacs/cider/pull/3806): Add client info 
to `clone` op request.
 
 ### Bugs fixed
 
diff --git a/nrepl-client.el b/nrepl-client.el
index 454fb2fe51..97d53503e8 100644
--- a/nrepl-client.el
+++ b/nrepl-client.el
@@ -1032,12 +1032,16 @@ ADDITIONAL-PARAMS is a plist to be appended to the 
request message."
   connection
   tooling))
 
+(defvar cider-version)
+
 (defun nrepl-sync-request:clone (connection &optional tooling)
   "Sent a :clone request to create a new client session.
 The request is dispatched via CONNECTION.
 Optional argument TOOLING Tooling is set to t if wanting the tooling session
 from CONNECTION."
-  (nrepl-send-sync-request '("op" "clone")
+  (nrepl-send-sync-request `("op" "clone"
+ "client-name" "CIDER"
+ "client-version" ,cider-version)
connection
nil tooling))
 
diff --git a/test/nrepl-server-mock.el b/test/nrepl-server-mock.el
index 6264eb8d21..d02995bedc 100644
--- a/test/nrepl-server-mock.el
+++ b/test/nrepl-server-mock.el
@@ -43,7 +43,10 @@ requirements."
   (let* ((msg (queue-dequeue (cdr (nrepl-bdecode output
  (_ (mock/log! ":mock.filter/msg :in %S" msg))
  (response (pcase msg
- (`(dict "op" "clone" "id" ,id)
+ (`(dict "op" "clone"
+ "client-name" "CIDER"
+ "client-version" ,cider-version
+ "id" ,id)
   `(dict "id" ,id
  "session" "a-session"
  "status" ("done")



[elpa] externals/org-mathsheet 688e66613b 03/18: Can produce problems from template

2025-04-10 Thread ELPA Syncer
branch: externals/org-mathsheet
commit 688e66613b22d5f27c689036d5854a1b8d0b7424
Author: Ian Martins 
Commit: Ian Martins 

Can produce problems from template
---
 mathsheet.org | 280 +++---
 1 file changed, 269 insertions(+), 11 deletions(-)

diff --git a/mathsheet.org b/mathsheet.org
index f290b37773..e3a13d57ae 100644
--- a/mathsheet.org
+++ b/mathsheet.org
@@ -1,25 +1,281 @@
 * goal
 the goal is to generate a math practice sheet.
+
+similar to https://www.math-aids.com
 * script
 ** vars
-#+property: header-args+ :var student="Noble" problem-count=24
+-#+property: header-args+ :var student="Noble" problem-count=24
 
 ** problem sets
 *** add and subtract
-TODO support "var c in [b 5]"
 
-#+name: first-set
+#+name: firstset
+| weight | order | problem   | descr  |
+|+---+---+|
+|  3 | 1 | [1..10] + [0..10] | simple |
+|  2 | 2 | [1..10] + [8..15] | second number bigger   |
+|  1 | 3 | [1..10] + [1..7] + [1..5] | three numbers  |
+|  1 | 4 | [a=3..10] - [0..$a]   | subtraction|
+|  1 | 4 | [a=1..10] + [0..10] - [1..$a] | three with subtraction |
+|  0 | 0 | [$a*[1..5]] / [a=1..10]   | division   |
+
+** problem generation
+
+TODO create a package. if you C-c C-c on a table
+1. if you are on the header, generate a worksheet
+2. if you on on a row, generate a single example
+
+*** var-list
+need ~var-list~ to keep track of the variables between fields.
+
+#+name: var-list
+#+begin_src elisp
+(defvar ianxm/var-list '()
+"List of variables used in a problem")
+#+end_src
+*** scan field
+
+must call with point at the start of a field. moves the point to the
+end of the field. returns a list of fields, formatted as:
+
+#+begin_example
+'(var (deps) start-marker end-marker nil)
+#+end_example
+
+~var~ is a variable name if there is an assignment, or it is a
+placeholder like ~_0~, ~_1~, etc. the last entry is nil for "not
+visited." ~var~ must be interned and must be the first index since we
+use this as an alist.
+
+~start-marker~ and ~end-marker~ are markers in the (temp) buffer.
+
+for example:
+#+begin_example
+[$a + 2 + [a=1..5]] => '((nil (a) m1 m19 nil) (a nil m11 m18 nil))
+#+end_example
+
+~open-fields~ is a stack of fields with the current field on top. we
+push a new field to the stack when we start a new field.
+~closed-fields~ is a list of fields that have been completed. we push a
+new field to the list when we close the current field.
+
+#+name: scan-problem
+#+begin_src elisp
+  (defun ianxm/scan-problem ()
+(interactive)
+(let ((field-index 0)
+  open-fields ; stack (open close (vars) deps)
+  closed-fields) ; list (open close (vars) deps)
+
+  (with-peg-rules
+  ((stuff (* (or var letter digit symbol field space)))
+   (field open (opt assignment) stuff close)
+   (space (* [space]))
+   (open (region "[")
+ `(l r -- (progn
+(setq
+ open-fields (push (list
+(intern (concat "_" 
(number-to-string field-index)))
+nil (copy-marker l) nil nil)
+   open-fields)
+ field-index (1+ field-index))
+".")))
+   (assignment (region (substring letter)) "="
+   `(l v r -- (progn
+(setcar
+ (car open-fields)
+ (intern v))
+".")))
+   (var "$" (substring letter)
+`(v -- (progn
+ (setcar
+  (nthcdr 1 (car open-fields))
+  (push (intern v) (nth 1 (car open-fields
+ ".")))
+   (close (region "]")
+  `(l r -- (progn
+ (setcar (nthcdr 3 (car open-fields)) (copy-marker 
l t))
+ (when (> (length open-fields) 1)
+   (setcar
+(nthcdr 1 (nth 1 open-fields))
+(push (caar open-fields) (nth 1 (nth 1 
open-fields)
+ (setq
+  closed-fields
+  (push (pop open-fields) closed-fields))
+ ".")))
+   (letter [a-z])
+   (digit [0-9])
+   (symbol (or "." "+" "-" "*" "/" "(" ")")))
+
+(peg-run (peg stuff)
+ (lambda (x) (message "failed %s" x))
+ (lambda (x)
+   (funcall x)
+