emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/eev 00024a5425: Added `find-tryit-links'.


From: ELPA Syncer
Subject: [elpa] externals/eev 00024a5425: Added `find-tryit-links'.
Date: Fri, 29 Nov 2024 09:57:50 -0500 (EST)

branch: externals/eev
commit 00024a5425d92b8d7e31cf3dfae6c50556c33218
Author: Eduardo Ochs <eduardoochs@gmail.com>
Commit: Eduardo Ochs <eduardoochs@gmail.com>

    Added `find-tryit-links'.
---
 ChangeLog     |  14 +++++++
 VERSION       |   4 +-
 eev-intro.el  |   3 +-
 eev-tlinks.el | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 4 files changed, 146 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index daf6278655..8636f9d7cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2024-11-29  Eduardo Ochs  <eduardoochs@gmail.com>
+
+       * eev-tlinks.el (find-tryit-links): new function.
+       (ee-tryit-compact, ee-tryit-config): new variables.
+       (ee-tryit-read-sexps, ee-tryit-tostring, ee-tryit-has)
+       (ee-tryit-line, ee-tryit-if, ee-tryit-body, ee-tryit-progn)
+       (ee-tryit-progns): new functions.
+
+2024-11-27  Eduardo Ochs  <eduardoochs@gmail.com>
+
+       * eev-intro.el (find-windows-beginner-intro): added "sudo apt-get
+       install -y imagemagick qpdf" (for creating animations with
+       myqdraw).
+
 2024-11-23  Eduardo Ochs  <eduardoochs@gmail.com>
 
        * eev-tlinks.el (ee-dot-emacs-edrxmaxima): new function.
diff --git a/VERSION b/VERSION
index a6a6c28547..5555deddd4 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-Sat Nov 23 14:19:02 GMT 2024
-Sat Nov 23 11:19:02 -03 2024
+Fri Nov 29 12:40:31 GMT 2024
+Fri Nov 29 09:40:31 -03 2024
diff --git a/eev-intro.el b/eev-intro.el
index 76db457cdc..f47e71327d 100644
--- a/eev-intro.el
+++ b/eev-intro.el
@@ -19,7 +19,7 @@
 ;;
 ;; Author:     Eduardo Ochs <eduardoochs@gmail.com>
 ;; Maintainer: Eduardo Ochs <eduardoochs@gmail.com>
-;; Version:    20241013
+;; Version:    20241127
 ;; Keywords:   e-scripts
 ;;
 ;; Latest version: <http://anggtwu.net/eev-current/eev-intro.el>
@@ -15127,6 +15127,7 @@ sudo apt-get install -y yt-dlp
 sudo apt-get install -y dctrl-tools
 sudo apt-get install -y lynx
 sudo apt-get install -y git
+sudo apt-get install -y imagemagick qpdf
 
 
 
diff --git a/eev-tlinks.el b/eev-tlinks.el
index 2bcee5a20b..8c54367abb 100644
--- a/eev-tlinks.el
+++ b/eev-tlinks.el
@@ -19,7 +19,7 @@
 ;;
 ;; Author:     Eduardo Ochs <eduardoochs@gmail.com>
 ;; Maintainer: Eduardo Ochs <eduardoochs@gmail.com>
-;; Version:    20241123
+;; Version:    20241129
 ;; Keywords:   e-scripts
 ;;
 ;; Latest version: <http://anggtwu.net/eev-current/eev-tlinks.el>
@@ -198,6 +198,7 @@
 ;; «.find-debootstrap2-links»          (to "find-debootstrap2-links")
 ;; «.find-package-vc-install-links»    (to "find-package-vc-install-links")
 ;; «.find-ethemes-links»               (to "find-ethemes-links")
+;; «.find-tryit-links»                 (to "find-tryit-links")
 
 
 (require 'eev-env)
@@ -6280,6 +6281,132 @@ git clone {giturl} .
 
 
 
+;;;   __ _           _       _              _ _        _ _       _        
+;;;  / _(_)_ __   __| |     | |_ _ __ _   _(_) |_     | (_)_ __ | | _____ 
+;;; | |_| | '_ \ / _` |_____| __| '__| | | | | __|____| | | '_ \| |/ / __|
+;;; |  _| | | | | (_| |_____| |_| |  | |_| | | ||_____| | | | | |   <\__ \
+;;; |_| |_|_| |_|\__,_|      \__|_|   \__, |_|\__|    |_|_|_| |_|_|\_\___/
+;;;                                   |___/                               
+;;
+;; «find-tryit-links»  (to ".find-tryit-links")
+;; See: http://anggtwu.net/2024-find-tryit-links.html
+;;
+(defvar ee-tryit-compact nil
+  "When this is non-nil `ee-tryit-progn' produces a single-line sexp.")
+(defvar ee-tryit-config  ""
+  "Used by `ee-tryit-progn'.")
+
+;; (find-tryit-links)
+;; (find-tryit-links "e 1e")
+;; (find-tryit-links "e 1e" '((foo) (bar)))
+(defun find-tryit-links (&optional configs sexps &rest pos-spec-list)
+"Visit a temporary buffer containing hyperlinks for tryit."
+  (interactive (list nil (ee-tryit-read-sexps)))
+  (setq configs (or configs "ire 1ire"))
+  (let* ((body (ee-tryit-progns configs sexps)))
+    (apply
+     'find-elinks-elisp
+     `((find-tryit-links ,configs ',sexps)
+       (find-tryit-links "irue 1irue" ',sexps)
+       (find-tryit-links "_ 1" ',sexps)
+       (find-tryit-links "s S" ',sexps)
+       (find-tryit-links "s S s1 S1" ',sexps)
+       ;; Convention: the first sexps always regenerates the buffer.
+       (find-efunction 'find-tryit-links)
+       ""
+       ,(ee-template0 "\
+;; See: http://anggtwu.net/2024-find-tryit-links.html
+;;      https://bpa.st/
+
+{body}
+")
+       )
+     pos-spec-list)))
+
+(defun ee-tryit-read-sexps ()
+  (when current-prefix-arg
+    (ee-goto-eol)
+    (list (read (ee-last-sexp)))))
+
+;; (ee-tryit-tostring 1)
+;; (ee-tryit-tostring 's)
+;; (ee-tryit-tostring '(eev-beginner))
+;; (ee-tryit-tostring ";; See: link")
+(defun ee-tryit-tostring (o)
+  (cond ((stringp o) o)
+       ((consp   o) (ee-S o))
+       (t           (format "%s" o))))
+
+;; (let ((ee-tryit-config "abC")) (ee-tryit-has 'b))
+;; (let ((ee-tryit-config "abC")) (ee-tryit-has 'B))
+;; (let ((ee-tryit-config "abC")) (ee-tryit-has 'c))
+;; (let ((ee-tryit-config "abC")) (ee-tryit-has 'C))
+(defun ee-tryit-has (c)
+  (let ((case-fold-search nil))
+    (string-match (ee-tryit-tostring c)
+                 ee-tryit-config)))
+
+;; (let ((ee-tryit-compact t  )) (ee-tryit-line '(eev-beginner)))
+;; (let ((ee-tryit-compact nil)) (ee-tryit-line '(eev-beginner)))
+(defun ee-tryit-line (sexp)
+  (if sexp
+      (format (if ee-tryit-compact " %s" "\n  %s")
+             (ee-tryit-tostring sexp))
+    ""))
+
+;; (let ((ee-tryit-config "b")) (ee-tryit-if 'b '(eev-beginner)))
+;; (let ((ee-tryit-config "x")) (ee-tryit-if 'b '(eev-beginner)))
+(defun ee-tryit-if (c &rest sexps)
+  (declare (indent 1))
+  (if (ee-tryit-has c)
+      (mapconcat 'ee-tryit-line sexps "")
+    ""))
+  
+;; (let ((ee-tryit-config "im"))   (ee-tryit-body))
+;; (let ((ee-tryit-config "ireb")) (ee-tryit-body))
+;; (let ((ee-tryit-config "ikeb")) (ee-tryit-body))
+(defun ee-tryit-body ()
+  (concat
+   (ee-tryit-if "i" '(package-initialize))
+   (ee-tryit-if "m" '(add-to-list
+                     'package-archives
+                     '("melpa" . "https://melpa.org/packages/";)))
+   ;;
+   (ee-tryit-if "k"
+     ";;"
+     ";; See: http://anggtwu.net/2024-no-public-key.html";
+     '(setq package-check-signature nil)
+     '(package-refresh-contents)
+     '(package-install 'gnu-elpa-keyring-update)
+     '(setq package-check-signature 'allow-unsigned)
+     ";;")
+   ;;
+   (ee-tryit-if "r" '(package-refresh-contents)) ; also in "k"
+   (ee-tryit-if "e" '(package-install 'eev))
+   (ee-tryit-if "<SE>" '(straight-use-package 'eev))
+   (ee-tryit-if "<SG>" '(straight-use-package
+                        '(eev :type git :host github :repo "edrx/eev")))
+   (ee-tryit-if "b" '(eev-beginner))
+   ))
+
+;; (ee-tryit-progn "1ire")
+;; (ee-tryit-progn  "ire")
+;; (ee-tryit-progn  "ire" '((foo) (bar)))
+(defun ee-tryit-progn (config &optional sexps)
+  (let* ((ee-tryit-config config)
+        (ee-tryit-compact (ee-tryit-has "1"))
+        (body (ee-tryit-body))
+        (lastsexps (mapconcat 'ee-tryit-line sexps "")))
+    (format "(progn%s%s)" body lastsexps)))
+
+;; (ee-tryit-progns "ike 1ire")
+;; (ee-tryit-progns "ike 1ire" nil)
+;; (ee-tryit-progns "ike 1ire" '((foo) (bar)))
+(defun ee-tryit-progns (configs &optional sexps)
+  (cl-loop for config in (ee-split configs)
+          concat (ee-tryit-progn config sexps)
+          concat "\n\n"))
+
 
 
 (provide 'eev-tlinks)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]