[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eev 373d390ff6: Added `find-eregionpp'.
From: |
ELPA Syncer |
Subject: |
[elpa] externals/eev 373d390ff6: Added `find-eregionpp'. |
Date: |
Sun, 9 Jan 2022 16:57:42 -0500 (EST) |
branch: externals/eev
commit 373d390ff6d165d7972c9d02ac20b62d1a5f3a6a
Author: Eduardo Ochs <eduardoochs@gmail.com>
Commit: Eduardo Ochs <eduardoochs@gmail.com>
Added `find-eregionpp'.
---
ChangeLog | 13 ++++++++
VERSION | 4 +--
eev-blinks.el | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
eev-intro.el | 24 +++++++++++++--
eev-testblocks.el | 28 ++++++++++++-----
5 files changed, 146 insertions(+), 12 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 70dabe2468..0a47b0c233 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2022-01-09 Eduardo Ochs <eduardoochs@gmail.com>
+
+ * eev-blinks.el (find-eppp-with-prefix): new function.
+ (find-eregionpp): new function.
+ (find-ebuffercontents, ee-buffer-contents, ee-buffer-contents0):
+ new functions.
+ (find-ebufferlocalvars): new function.
+
+2022-01-07 Eduardo Ochs <eduardoochs@gmail.com>
+
+ * eev-testblocks.el (ee-insert-test-makefile-gmake-mode): new
+ function.
+
2022-01-05 Eduardo Ochs <eduardoochs@gmail.com>
* eev-testblocks.el (ee-insert-test-makefile-mode): new function.
diff --git a/VERSION b/VERSION
index d20b201198..9170a6ecdf 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-Wed Jan 5 07:28:42 GMT 2022
-Wed Jan 5 04:28:42 -03 2022
+Sun Jan 9 21:44:49 GMT 2022
+Sun Jan 9 18:44:49 -03 2022
diff --git a/eev-blinks.el b/eev-blinks.el
index ee429056cf..3ab8022e32 100644
--- a/eev-blinks.el
+++ b/eev-blinks.el
@@ -21,7 +21,7 @@
;;
;; Author: Eduardo Ochs <eduardoochs@gmail.com>
;; Maintainer: Eduardo Ochs <eduardoochs@gmail.com>
-;; Version: 20211220
+;; Version: 20220109
;; Keywords: e-scripts
;;
;; Latest version: <http://angg.twu.net/eev-current/eev-blinks.el>
@@ -48,6 +48,7 @@
;; «.find-fline» (to "find-fline")
;; «.find-wottb» (to "find-wottb")
;; «.find-efaces» (to "find-efaces")
+;; «.find-eregionpp» (to "find-eregionpp")
;; «.find-ebufferandpos» (to "find-ebufferandpos")
;; «.find-ebuffer» (to "find-ebuffer")
;; «.find-eoutput» (to "find-eoutput")
@@ -455,6 +456,64 @@ inspecting text proprties."
+;;; __ _ _ _
+;;; / _(_)_ __ __| | ___ _ __ ___ __ _(_) ___ _ __ _ __ _ __
+;;; | |_| | '_ \ / _` |_____ / _ \ '__/ _ \/ _` | |/ _ \| '_ \| '_ \| '_ \
+;;; | _| | | | | (_| |_____| __/ | | __/ (_| | | (_) | | | | |_) | |_) |
+;;; |_| |_|_| |_|\__,_| \___|_| \___|\__, |_|\___/|_| |_| .__/| .__/
+;;; |___/ |_| |_|
+;;
+;; «find-eregionpp» (to ".find-eregionpp")
+;; The functions `find-etpat', `find-etpat0' and `find-etpat00'
+;; defined above can be used to the examine the text properties of
+;; characters in a buffer; `find-eregionpp' can be used to examine all
+;; text properties in a region.
+
+;; Test:
+;; (eek "2*<down> C-a C-SPC <down> C-x 1 C-x 3 C-x o <<find-eregionpp>>")
+;;
+(defun find-eregionpp (b e)
+ "Show the text properties of the text in the region."
+ (interactive "r")
+ (let ((ee-buffer-name (or ee-buffer-name "*(find-eregionpp)*")))
+ (find-epp (buffer-substring b e))))
+
+;; One way to inspect text properties in buffers with weird keymaps is
+;; to copy the contents of these buffers to other buffers that are in
+;; fundamental mode, then edit the copy to leave only the parts that
+;; we want to inspect, and then use `find-eregionpp'.
+
+;; Tests:
+;; (find-wset "1_3o_o" nil '(find-ebuffercontents))
+;; (find-wset "1_3o_o" '(find-eevfile "") '(find-ebuffercontents))
+;;
+(defun find-ebuffercontents (&optional b &rest pos-spec-list)
+ "Show a copy of `(ee-buffer-contents B)' in a buffer in fundamental mode.
+This function does not copy overlays.
+BUG: at this moment invisible text is not copied. I need to fix that!!!"
+ (interactive)
+ (let ((ee-buffer-name (or ee-buffer-name "*(find-ebuffercontents)*")))
+ (apply 'find-estring (ee-buffer-contents b) pos-spec-list)))
+
+(defun ee-buffer-contents (&optional b)
+ "Like `ee-buffer-contents0', but uses the current buffer if B is nil.
+If B neither nil nor an existing buffer this function returns the
+empty string instead of throwing an error."
+ (setq b (or b (current-buffer)))
+ (if (get-buffer b) (ee-buffer-contents0 b) ""))
+
+(defun ee-buffer-contents0 (b)
+ "Return the contents of the buffer B.
+B must be a buffer or the name of an existing buffer. If the
+buffer B is narrowed this function returns only its accessible
+portion."
+ (with-current-buffer b
+ (buffer-substring (point-min) (point-max))))
+
+
+
+
+
;;; __ _ _ __ _ _
;;; / _(_)_ __ __| | ___ / _|_ _ _ __ ___| |_(_) ___ _ __
@@ -1069,6 +1128,16 @@ that `find-epp' would print in a single line."
(pp-to-string (symbol-function symbol)))))
(apply 'find-estring-elisp body pos-spec-list)))
+;; Test: (find-eppp-with-prefix ";; HELLO\n" '(1 "2" (3 4)))
+;;
+(defun find-eppp-with-prefix (prefix object &rest pos-spec-list)
+ "Like `find-eppp', but puts PREFIX at the beginning of the buffer."
+ (let ((ee-buffer-name (or ee-buffer-name "*pp*")))
+ (apply 'find-estring-elisp
+ (concat prefix (ee-ppp0 object))
+ pos-spec-list)))
+
+
;;; _ _ _ _ _
@@ -1146,6 +1215,23 @@ Example: (find-eminorkeymapdescr 'eev-mode)"
Example: (find-ekeymapdescr (ee-minor-mode-keymap 'eev-mode))"
(cdr (assq mode-symbol minor-mode-map-alist)))
+;; Tests:
+;; (find-ebufferlocalvars)
+;; (find-ebufferlocalvars "mode-name")
+;; (find-wset "1_3o_" '(find-eevfile "") '(find-ebufferlocalvars "mode-name"))
+;;
+(defun find-ebufferlocalvars (&rest pos-spec-list)
+ "Show the result of running `(buffer-local-variables)' in the current
buffer."
+ (interactive)
+ (let ((ee-buffer-name (or ee-buffer-name "*(buffer-local-variables)*")))
+ (apply
+ 'find-eppp-with-prefix
+ ";; See:
+;; (find-elnode \"Creating Buffer-Local\" \"buffer-local-variables\")
+;; (find-efunction 'find-ebufferlocalvars)\n\n"
+ (buffer-local-variables)
+ pos-spec-list)))
+
;; Broken? See: (find-efile "international/ccl.el")
(defun find-eccldump (ccl-code &rest pos-spec-list)
"Hyperlink to the result of running `ccl-dump' on CCL-CODE.
@@ -1171,6 +1257,7 @@ Examples: (find-echarsetchars 'mule-unicode-0100-24ff
\"733x\")
+
;;; __ _ _ _ _
;;; / _(_)_ __ __| | ___(_)_ __ ___ ___ _ __| |_
;;; | |_| | '_ \ / _` |_____ / _ \ | '_ \/ __|/ _ \ '__| __|
diff --git a/eev-intro.el b/eev-intro.el
index d615e3b62d..1704c889ec 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: 20211215
+;; Version: 20220106
;; Keywords: e-scripts
;;
;; Latest version: <http://angg.twu.net/eev-current/eev-intro.el>
@@ -6303,7 +6303,27 @@ or
(defun eepitch-preprocess-line (line) line)
-disables the hack.
+disables the hack. A similar technique for using test blocks in
+makefiles is explained here:
+
+ http://angg.twu.net/eev-make.html
+ (find-2022eevmake0video)
+
+Running `M-x eeit' in a makefile runs
+`ee-insert-test-makefile-mode', that inserts a test block like
+this:
+
+ # See: (find-eepitch-intro \"3.3. `eepitch-preprocess-line'\")
+ # (setq eepitch-preprocess-regexp \"^\")
+ # (setq eepitch-preprocess-regexp \"^#T \")
+ #
+ #T (eepitch-shell)
+ #T (eepitch-kill)
+ #T (eepitch-shell)
+ #T make -f nameofthismakefile TARGET
+
+The lines that start with just \"# \" serve as a reminder that
+you need a special setup to make that test block work.
Some languages have syntaxes for comments that are much more
eepitch-unfriendly and test-blocks-unfriendly than this. An
diff --git a/eev-testblocks.el b/eev-testblocks.el
index c373bfd14c..59b7f85962 100644
--- a/eev-testblocks.el
+++ b/eev-testblocks.el
@@ -19,7 +19,7 @@
;;
;; Author: Eduardo Ochs <eduardoochs@gmail.com>
;; Maintainer: Eduardo Ochs <eduardoochs@gmail.com>
-;; Version: 20220105
+;; Version: 20220107
;; Keywords: e-scripts
;;
;; Latest version: <http://angg.twu.net/eev-current/eev-testblocks.el>
@@ -161,17 +161,31 @@ dofile \"%s\"
--]%s]
" equals (buffer-name) equals)))))
+(defun ee-insert-test-makefile-gmake-mode ()
+ (interactive)
+ (insert (ee-adjust-red-stars (format "
+# See: (find-eepitch-intro \"3.3. `eepitch-preprocess-line'\")
+# (setq eepitch-preprocess-regexp \"^\")
+# (setq eepitch-preprocess-regexp \"^#T \")
+#
+#T (eepitch-shell)
+#T (eepitch-kill)
+#T (eepitch-shell)
+#T make -f %s TARGET
+
+" (buffer-name)))))
+
(defun ee-insert-test-makefile-mode ()
(interactive)
(insert (ee-adjust-red-stars (format "
-# (find-eepitch-intro \"3.3. `eepitch-preprocess-line'\")
+# See: (find-eepitch-intro \"3.3. `eepitch-preprocess-line'\")
# (setq eepitch-preprocess-regexp \"^\")
-# (setq eepitch-preprocess-regexp \"^# \")
+# (setq eepitch-preprocess-regexp \"^#T \")
#
-# (eepitch-shell)
-# (eepitch-kill)
-# (eepitch-shell)
-# make -f %s TARGET
+#T (eepitch-shell)
+#T (eepitch-kill)
+#T (eepitch-shell)
+#T make -f %s TARGET
" (buffer-name)))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/eev 373d390ff6: Added `find-eregionpp'.,
ELPA Syncer <=