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

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

[elpa] externals/eev bd9a806d16: Added a debugging option to <f8> (`eepi


From: ELPA Syncer
Subject: [elpa] externals/eev bd9a806d16: Added a debugging option to <f8> (`eepitch-this-line').
Date: Tue, 5 Dec 2023 00:57:52 -0500 (EST)

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

    Added a debugging option to <f8> (`eepitch-this-line').
---
 ChangeLog     |   5 +++
 VERSION       |   4 +--
 eepitch.el    | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++--------
 eev-intro.el  |   1 +
 eev-tlinks.el |  85 ++++++++++++++++++++++++++++++++++++++++++++++-
 5 files changed, 183 insertions(+), 16 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 588610c93f..bbf75ec5de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-12-05  Eduardo Ochs  <eduardoochs@gmail.com>
+
+       * eepitch.el (eepitch-this-line): added the argument `debug'.
+       (find-eepitch-debug-links): new function.
+
 2023-12-03  Eduardo Ochs  <eduardoochs@gmail.com>
 
        * eev-videolinks.el (find-eev2023replsvideo): new function.
diff --git a/VERSION b/VERSION
index 6eac214005..6c9f2d7fc1 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-Sun Dec  3 03:15:06 GMT 2023
-Sun Dec  3 00:15:06 -03 2023
+Tue Dec  5 05:24:50 GMT 2023
+Tue Dec  5 02:24:50 -03 2023
diff --git a/eepitch.el b/eepitch.el
index 6dc2a90c92..86310efa60 100644
--- a/eepitch.el
+++ b/eepitch.el
@@ -19,7 +19,7 @@
 ;;
 ;; Author:     Eduardo Ochs <eduardoochs@gmail.com>
 ;; Maintainer: Eduardo Ochs <eduardoochs@gmail.com>
-;; Version:    20230127
+;; Version:    20231205
 ;; Keywords:   e-scripts
 ;;
 ;; Latest version: <http://anggtwu.net/eev-current/eepitch.el>
@@ -54,6 +54,9 @@
 ;;
 ;; «.eepitch-langs»            (to "eepitch-langs")
 ;; «.eepitch-langs-vterm»      (to "eepitch-langs-vterm")
+;;
+;; «.debug»                    (to "debug")
+;; «.find-eepitch-debug-links» (to "find-eepitch-debug-links")
 
 ;;; Commentary:
 
@@ -404,22 +407,24 @@ This is a low-level function used by `eepitch-this-line'."
             (insert line)                               ; "type" the line
             (call-interactively (key-binding "\r")))))) ; then do a RET
 
-(defun eepitch-this-line ()
+(defun eepitch-this-line (&optional debug)
 "Pitch this line to the target buffer, or eval it as lisp if it starts with 
`'.
 Also, if it starts with `', skip it.
 See: (find-eepitch-intro)
 and: `eepitch', `eepitch-regexp', `eepitch-comment-regexp'."
-  (interactive)
-  (let ((line (buffer-substring (ee-bol) (ee-eol))))  ; get line contents
-    (setq line (eepitch-preprocess-line line))        ;   and preprocess it
-    (cond ((string-match eepitch-comment-regexp line) ; comment lines
-          (message "Comment: %s" line))              ;  are message'd,
-         ((string-match eepitch-regexp line)         ; red star lines
-          (ee-eval-string-print                      ;  are eval'ed and the
-           (match-string 1 line)))                   ;  result is printed,
-         (t (eepitch-prepare)                        ; normal lines
-            (eepitch-line line))))                   ;  are sent
-  (ee-next-line 1))
+  (interactive "P")
+  (if debug
+      (find-eepitch-debug-links)
+    (let ((line (buffer-substring (ee-bol) (ee-eol))))  ; get line contents
+      (setq line (eepitch-preprocess-line line))        ;   and preprocess it
+      (cond ((string-match eepitch-comment-regexp line) ; comment lines
+             (message "Comment: %s" line))              ;  are message'd,
+            ((string-match eepitch-regexp line)         ; red star lines
+             (ee-eval-string-print                      ;  are eval'ed and the
+              (match-string 1 line)))                   ;  result is printed,
+            (t (eepitch-prepare)                        ; normal lines
+               (eepitch-line line))))                   ;  are sent
+    (ee-next-line 1)))
 
 ;; See:
 ;; (find-eepitch-intro "3.3. `eepitch-preprocess-line'")
@@ -1163,6 +1168,79 @@ If the mrepl doesn't start in 30 seconds this function 
yields an error."
 
 
 
+;;;  ____       _                 
+;;; |  _ \  ___| |__  _   _  __ _ 
+;;; | | | |/ _ \ '_ \| | | |/ _` |
+;;; | |_| |  __/ |_) | |_| | (_| |
+;;; |____/ \___|_.__/ \__,_|\__, |
+;;;                         |___/ 
+;;
+;; «debug»  (to ".debug")
+;; This was inspired by the support for a prefix argument in
+;; `find-here-links':
+;;
+;;   1. If we run just `M-h M-h' we get a temporary buffer with some
+;;      "here links" preceded by a header with help, but if we run
+;;      `M-1 M-h M-h' we get a "debug buffer for `find-here-links'".
+;;      Try it:
+;;
+;;        (eek "M-1 M-h M-h")
+;;
+;;   2. Similarly, `<f8>' runs `eepitch-this-line', but `M-1 <f8>'
+;;      shows a "debug buffer for eepitch". Try it:
+;;
+;;        (eek "M-1 <f8>")
+;;
+;; «find-eepitch-debug-links»  (to ".find-eepitch-debug-links")
+;; Skel: (find-find-links-links-new "eepitch-debug" "" "")
+;; Test: (find-eepitch-debug-links)
+;;
+(defun find-eepitch-debug-links (&rest pos-spec-list)
+"Visit a temporary buffer containing hyperlinks for eepitch."
+  (interactive)
+  (apply
+   'find-elinks-elisp
+   `((find-eepitch-debug-links ,@pos-spec-list)
+     ;; Convention: the first sexp always regenerates the buffer.
+     (find-efunction 'find-eepitch-debug-links)
+     ""
+     ,(ee-template0 "\
+;; Basic docs:
+;;   (find-eev-quick-intro \"6. Controlling shell-like programs\")
+;;   (find-eev-quick-intro \"6.1. The main key: <F8>\")
+;;   (find-eev-quick-intro \"6.2. Other targets\")
+;;   (find-eev-quick-intro \"6.3. Creating eepitch blocks: `M-T'\")
+;;   (find-eepitch-intro)
+;;   (find-eepitch-intro \"2.2. `(eepitch-kill)'\")
+;;   (find-eepitch-intro \"2.3. `eepitch'\")
+;; Basic functions:
+;;   (find-elongkey-links \"<f8>  ;; eepitch-this-line\")
+;;   (find-efunction 'eepitch)
+;;   (find-efunction 'eepitch-kill)
+;;   (find-efunction 'eepitch-this-line)
+;;     (find-efunction 'eepitch-prepare)
+;;     (find-efunction 'eepitch-line)
+
+;; Current settings (variables):
+;;   eepitch-code            => {(ee-S eepitch-code)}
+;;   eepitch-buffer-name     => {(ee-S eepitch-buffer-name)}
+;;   eepitch-comment-regexp  => {(ee-S eepitch-comment-regexp)}
+;;   eepitch-regexp          => {(ee-S eepitch-regexp)}
+;;   eepitch-line            => {(ee-S eepitch-line)}
+;;   eepitch-kill            => {(ee-S eepitch-kill)}
+;;   eepitch-window-show     => {(ee-S eepitch-window-show)}
+
+;; Settings for the preprocessor - check if the function
+;; `eepitch-preprocess-line' has been redefined:
+;;   (find-efunction   'eepitch-preprocess-line)
+;;   (find-efunctionpp 'eepitch-preprocess-line)
+;; See:
+;;   (find-eepitch-intro \"3.3. `eepitch-preprocess-line'\")
+")
+     )
+   pos-spec-list))
+
+
 (provide 'eepitch)
 
 
diff --git a/eev-intro.el b/eev-intro.el
index 160be97086..e5e4aec44a 100644
--- a/eev-intro.el
+++ b/eev-intro.el
@@ -6039,6 +6039,7 @@ For a good visual introduction to eepitch, see this page:
   http://anggtwu.net/eepitch.html
 
 My video for the EmacsConf2019 has a simple demo of eepitch:
+  (find-eev2019video \"15:56\")
   https://www.youtube.com/watch?v=86yiRG8YJD0&t=956
   http://anggtwu.net/emacsconf2019.html
 
diff --git a/eev-tlinks.el b/eev-tlinks.el
index 25ff6ee26c..289375e710 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:    20231106
+;; Version:    20231205
 ;; Keywords:   e-scripts
 ;;
 ;; Latest version: <http://anggtwu.net/eev-current/eev-tlinks.el>
@@ -156,6 +156,8 @@
 ;; «.find-melpa-links»                 (to "find-melpa-links")
 ;; «.find-emacsclient-links»           (to "find-emacsclient-links")
 ;; «.code-show2»                       (to "code-show2")
+;; «.find-maximamsg-links»             (to "find-maximamsg-links")
+;; «.find-maximamsg»                   (to "find-maximamsg")
 
 
 (require 'eev-env)
@@ -4288,6 +4290,19 @@ emacsclient --eval '(find-livesofanimalspage 3)'
 
 
 
+
+;;;  ____  _                   ____  
+;;; / ___|| |__   _____      _|___ \ 
+;;; \___ \| '_ \ / _ \ \ /\ / / __) |
+;;;  ___) | | | | (_) \ V  V / / __/ 
+;;; |____/|_| |_|\___/ \_/\_/ |_____|
+;;;                                  
+;; Show2.lua is used by several of the small programs that I mentioned
+;; in my talk at the EmacsConf2023 - and these functions are what we
+;; use to tell Show2.lua which files and directories it should use.
+;;   (find-1stclassvideo-links "eev2023repls")
+;;   (find-1stclassvideodef    "eev2023repls")
+;;
 ;; «code-show2»  (to ".code-show2")
 ;; Skel:  (find-code-xxx-links "show2" "fname0" "")
 ;; Tests: (find-code-show2)
@@ -4386,6 +4401,74 @@ emacsclient --eval '(find-livesofanimalspage 3)'
 
 
 
+;;;  __  __            _                 __  __           
+;;; |  \/  | __ ___  _(_)_ __ ___   __ _|  \/  |___  __ _ 
+;;; | |\/| |/ _` \ \/ / | '_ ` _ \ / _` | |\/| / __|/ _` |
+;;; | |  | | (_| |>  <| | | | | | | (_| | |  | \__ \ (_| |
+;;; |_|  |_|\__,_/_/\_\_|_| |_| |_|\__,_|_|  |_|___/\__, |
+;;;                                                 |___/ 
+;;
+;; «find-maximamsg-links»  (to ".find-maximamsg-links")
+;; Skel:  (find-find-links-links-new "maximamsg" "n yyyymm day" "")
+;; Tests: (find-maximamsg-links)
+;;        (find-maximamsg "37675653 202207  1" "Stavros: structural equality")
+;;
+(defun find-maximamsg-links (&optional n yyyymm day &rest pos-spec-list)
+"Visit a temporary buffer containing hyperlinks to a Maxima message.
+A \"Maxima message\" is a message in the Maxima mailing list."
+  (interactive)
+  (setq n (or n 999999))
+  ;; (setq yyyymm (or yyyymm "{yyyymm}"))
+  ;; (setq day (or day "{day}"))
+  (apply
+   'find-elinks
+   `((find-maximamsg-links ,n ,yyyymm ,day ,@pos-spec-list)
+     ;; Convention: the first sexp always regenerates the buffer.
+     (find-efunction 'find-maximamsg-links)
+     (find-efunction 'find-maximamsg)
+     ""
+     ,@(ee-find-maximamsg-links n yyyymm day)
+     )
+   pos-spec-list))
+
+(defun ee-find-maximamsg-links (&optional n yyyymm day &rest pos-spec-list)
+  (setq yyyymm (or yyyymm (format-time-string "%Y%m")))
+  (setq day    (or day    (format-time-string "%d")))
+  (setq n      (or n      99999))
+  (list (ee-template0 "\
+# (find-es \"maxima\" \"mailing-lists\")
+# (setq last-kbd-macro (kbd \"C-x 1 M-3 M-e M-> M-e M-o\"))
+# (find-maximamsg \"{n} {yyyymm} {day}\" \"\")
+# https://sourceforge.net/p/maxima/mailman/message/{n}/
+# https://sourceforge.net/p/maxima/mailman/maxima-discuss/?viewmonth={yyyymm}
+# 
https://sourceforge.net/p/maxima/mailman/maxima-discuss/?viewmonth={yyyymm}&viewday={day}
+# 
https://sourceforge.net/p/maxima/mailman/maxima-discuss/?viewmonth={yyyymm}&viewday={day}&style=threaded
+# 
https://sourceforge.net/p/maxima/mailman/maxima-discuss/?viewmonth={yyyymm}&style=threaded&limit=250
+# (find-esgrep \"grep --color=auto -nH --null -e find-maximamsg maxima.e\")
+# (find-esgrep \"grep --color=auto -nH --null -e maxima-discuss maxima.e\")
+# (find-esgrep \"grep --color=auto -nH --null -e maxima/mailman maxima.e\")
+# (find-lynx 
\"https://sourceforge.net/p/maxima/mailman/maxima-discuss/?viewmonth={yyyymm}&viewday={day}\";
 \"Showing\")
+# (find-lynx 
\"https://sourceforge.net/p/maxima/mailman/maxima-discuss/?viewmonth={yyyymm}&viewday={day}&style=threaded\";
 \"Showing\")
+# (find-lynx 
\"https://sourceforge.net/p/maxima/mailman/maxima-discuss/?viewmonth={yyyymm}&style=threaded&limit=250\";
 \"Showing\")
+
+# (find-lynx \"https://sourceforge.net/p/maxima/mailman/message/{n}/\"; 75)
+")))
+
+;; «find-maximamsg»  (to ".find-maximamsg")
+;; Tests: (find-maximamsg-links)
+;;        (find-maximamsg "37675653 202207  1" "Stavros: structural equality")
+;;
+(defun find-maximamsg (&optional str &rest rest)
+  (interactive (let ((n (ee-stuff-around-point "[0-9]")))
+                (if (not (equal n ""))
+                    (list n))))
+  (cl-destructuring-bind
+      (&optional n yyyymm day &rest rest) 
+      (ee-split (or str "999999"))
+    (find-maximamsg-links n yyyymm day)))
+
+
+
 
 
 (provide 'eev-tlinks)



reply via email to

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