[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eev ed28714e64: Now `find-epackages' supports pointing
From: |
ELPA Syncer |
Subject: |
[elpa] externals/eev ed28714e64: Now `find-epackages' supports pointing to a package. |
Date: |
Fri, 16 Dec 2022 00:57:35 -0500 (EST) |
branch: externals/eev
commit ed28714e64378002221935f47dc3b2466534e15d
Author: Eduardo Ochs <eduardoochs@gmail.com>
Commit: Eduardo Ochs <eduardoochs@gmail.com>
Now `find-epackages' supports pointing to a package.
---
ChangeLog | 21 ++++++++++++++++++++
VERSION | 4 ++--
eev-blinks.el | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
eev-elinks.el | 4 ++--
eev-hlinks.el | 15 ++++++++++++--
5 files changed, 98 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f050ccbe38..037a65f3ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2022-12-16 Eduardo Ochs <eduardoochs@gmail.com>
+
+ * eev-blinks.el (find-epackages): renamed to `find-epackages0'.
+ (find-epackages): new function.
+ (ee-goto-position-package, ee-packages-nline-for)
+ (ee-packages-nlines-for, ee-packages-nlines-and-names): new
+ functions.
+
+ * eev-elinks.el (ee-find-epackage-links0): use the new
+ `find-epackages', that has the same name as the old one but
+ different arguments.
+
+ * eev-hlinks.el (ee-packages-package-here): new function.
+ (ee-find-epackages-links): use `ee-packages-package-here' and the
+ new `find-epackages'.
+
+2022-12-15 Eduardo Ochs <eduardoochs@gmail.com>
+
+ * eev-blinks.el (ee-struct-to-triples, find-estructt): new
+ functions.
+
2022-12-14 Eduardo Ochs <eduardoochs@gmail.com>
* eev-hlinks.el (ee-underlinewsp-re): new function.
diff --git a/VERSION b/VERSION
index 4e7ed8a438..98ee25a4f9 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-Fri Dec 16 02:32:21 GMT 2022
-Thu Dec 15 23:32:21 -03 2022
+Fri Dec 16 04:57:38 GMT 2022
+Fri Dec 16 01:57:38 -03 2022
diff --git a/eev-blinks.el b/eev-blinks.el
index 9e71a84713..53f7826831 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: 20221215
+;; Version: 20221216
;; 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-dbsw» (to "find-dbsw")
+;; «.find-epackages» (to "find-epackages")
;; «.find-efaces» (to "find-efaces")
;; «.find-eregionpp» (to "find-eregionpp")
;; «.find-eoverlayspp» (to "find-eoverlayspp")
@@ -375,8 +376,10 @@ then go to the position specified by POS-SPEC-LIST.\n
;; Tests: (find-epackages nil "\n 0x0 ")
;; (find-epackages t "\n 0x0 ")
;;
-(defun find-epackages (&optional no-fetch &rest pos-spec-list)
- "Hyperlink to the output of `list-packages'."
+(defun find-epackages0 (&optional no-fetch &rest pos-spec-list)
+ "Hyperlink to the output of `list-packages'.
+This is similar to `find-epackages', but it is much simpler and
+far less convenient. The suffix `0' means \"low-level\"."
(interactive "P")
(apply 'find-wottb-call '(list-packages no-fetch)
"*Packages*" pos-spec-list))
@@ -428,6 +431,60 @@ change soon."
+;;; __ _ _ _
+;;; / _(_)_ __ __| | ___ _ __ __ _ ___| | ____ _ __ _ ___ ___
+;;; | |_| | '_ \ / _` |_____ / _ \ '_ \ / _` |/ __| |/ / _` |/ _` |/ _ \/ __|
+;;; | _| | | | | (_| |_____| __/ |_) | (_| | (__| < (_| | (_| | __/\__ \
+;;; |_| |_|_| |_|\__,_| \___| .__/ \__,_|\___|_|\_\__,_|\__, |\___||___/
+;;; |_| |___/
+;;
+;; «find-epackages» (to ".find-epackages")
+;; Tests: (find-epackages)
+;; (find-epackages 'eev)
+
+(defun find-epackages (&rest pos-spec-list)
+ "Hyperlink to the output of `list-packages'.
+This is similar to `find-epackages0', but uses these three hacks:
+ 1. if a buffer called \"*Packages*\" exists, just switch to it,
+ 2. if it doesn't exist, create it with (list-packages 'no-fetch),
+ 3. use `ee-goto-position-package' instead of `ee-goto-position'."
+ (interactive "P")
+ (if (get-buffer "*Packages*")
+ (find-ebuffer "*Packages*")
+ (find-wottb-call
+ '(list-packages 'no-fetch)
+ "*Packages*"))
+ (apply 'ee-goto-position-package pos-spec-list))
+
+(defun ee-goto-position-package (&optional pkgsymbol &rest rest)
+ "Like `ee-goto-position', but treats PKGSYMBOL as a package name.
+This is an internal function used by `find-epackages'."
+ (if (and pkgsymbol (symbolp pkgsymbol))
+ (let ((nline (ee-packages-nline-for pkgsymbol)))
+ (if (not nline) (error "Package not found"))
+ (apply 'ee-goto-position nline rest))
+ (apply 'ee-goto-position pkgsymbol rest)))
+
+(defun ee-packages-nline-for (pkgsymbol &optional nns)
+ "This is an internal function that only works in the *Packages* buffer."
+ (car (reverse (ee-packages-nlines-for pkgsymbol nns))))
+
+(defun ee-packages-nlines-for (pkgsymbol &optional nns)
+ "This is an internal function that only works in the *Packages* buffer."
+ (setq nns (or nns (ee-packages-nlines-and-names)))
+ (cl-loop for (nline name) in nns
+ if (eq name pkgsymbol)
+ collect nline))
+
+(defun ee-packages-nlines-and-names (&optional tles)
+ "This is an internal function that only works in the *Packages* buffer."
+ (cl-loop for nline from 1
+ for cols in (or tles tabulated-list-entries)
+ collect (list nline (package-desc-name (car cols)))))
+
+
+
+
;;; __
diff --git a/eev-elinks.el b/eev-elinks.el
index 92584a0c54..206fe52f4f 100644
--- a/eev-elinks.el
+++ b/eev-elinks.el
@@ -19,7 +19,7 @@
;;
;; Author: Eduardo Ochs <eduardoochs@gmail.com>
;; Maintainer: Eduardo Ochs <eduardoochs@gmail.com>
-;; Version: 20221117
+;; Version: 20221216
;; Keywords: e-scripts
;;
;; Latest version: <http://angg.twu.net/eev-current/eev-elinks.el>
@@ -1276,7 +1276,7 @@ If D is t then try to use `ee-package-dir' to get the
directory."
(findelpafiles (mapconcat 'ee-HS findelpafiles1 "\n"))
)
(ee-template0 "\
-# (find-epackages {(ee-S spkg)})
+# (find-epackages '{pkg})
# (find-epackage-links '{pkg})
# (find-epackage '{pkg})
{findelpafiles}
diff --git a/eev-hlinks.el b/eev-hlinks.el
index 58aed83280..fa1899a937 100644
--- a/eev-hlinks.el
+++ b/eev-hlinks.el
@@ -19,7 +19,7 @@
;;
;; Author: Eduardo Ochs <eduardoochs@gmail.com>
;; Maintainer: Eduardo Ochs <eduardoochs@gmail.com>
-;; Version: 20221214
+;; Version: 20221216
;; Keywords: e-scripts
;;
;; Latest version: <http://angg.twu.net/eev-current/eev-hlinks.el>
@@ -582,9 +582,18 @@ a single whitespace character, and the results are
`concat'-ed."
""
,@(ee-find-file-links)))
+(defun ee-packages-package-here ()
+ (intern (car (aref (tabulated-list-get-entry) 0))))
+
+(defun ee-find-epackages-links ()
+ (let ((pkgsymbol (ee-packages-package-here)))
+ `((find-epackages)
+ (find-epackages ',pkgsymbol)
+ (find-epackage ',pkgsymbol)
+ )))
+
(defun ee-find-efaces-links () `((find-efaces)))
(defun ee-find-ecolors-links () `((find-ecolors)))
-(defun ee-find-epackages-links () `((find-epackages)))
(defun ee-find-pdftext-links () (ee-pdflike-page-links))
(defun ee-find-eww-links () `((find-eww ,(plist-get eww-data :url))))
(defun ee-find-w3m-links () `((find-w3m ,w3m-current-url)))
@@ -592,6 +601,8 @@ a single whitespace character, and the results are
`concat'-ed."
+
+
;;; _ _
;;; | |__ ___ __ _(_)_ __ _ __ ___ _ __
;;; | '_ \ / _ \/ _` | | '_ \| '_ \ / _ \ '__|
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/eev ed28714e64: Now `find-epackages' supports pointing to a package.,
ELPA Syncer <=