[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eev 599901f: Rewrote `eepitch-vterm'.
From: |
ELPA Syncer |
Subject: |
[elpa] externals/eev 599901f: Rewrote `eepitch-vterm'. |
Date: |
Sun, 8 Aug 2021 02:57:09 -0400 (EDT) |
branch: externals/eev
commit 599901f03c47662570643c6cf7bff1fe87fed032
Author: Eduardo Ochs <eduardoochs@gmail.com>
Commit: Eduardo Ochs <eduardoochs@gmail.com>
Rewrote `eepitch-vterm'.
---
ChangeLog | 10 ++++++++++
VERSION | 4 ++--
eepitch.el | 42 +++++++++++++++++++++++++++++++++---------
eev-plinks.el | 33 +++++++++++++++++++--------------
eev.el | 2 +-
5 files changed, 65 insertions(+), 26 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7522863..f4f8dcc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2021-08-08 Eduardo Ochs <eduardoochs@gmail.com>
+
+ * eepitch.el (find-vtermprocess): new function.
+ (eepitch-vterm): use `find-vtermprocess'.
+
+2021-08-07 Eduardo Ochs <eduardoochs@gmail.com>
+
+ * eev-plinks.el (find-wget-elisp): new function.
+ (find-wgeta-elisp): new function.
+
2021-08-06 Eduardo Ochs <eduardoochs@gmail.com>
* eev-plinks.el (ee-find-callprocess00-exit-status): new variable.
diff --git a/VERSION b/VERSION
index bec53b3..4c5141a 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-Sat Aug 7 01:51:46 GMT 2021
-Fri Aug 6 22:51:46 -03 2021
+Sun Aug 8 06:08:09 GMT 2021
+Sun Aug 8 03:08:09 -03 2021
diff --git a/eepitch.el b/eepitch.el
index f7ca025..be03d4d 100644
--- a/eepitch.el
+++ b/eepitch.el
@@ -19,7 +19,7 @@
;;
;; Author: Eduardo Ochs <eduardoochs@gmail.com>
;; Maintainer: Eduardo Ochs <eduardoochs@gmail.com>
-;; Version: 20201129
+;; Version: 20210808
;; Keywords: e-scripts
;;
;; Latest version: <http://angg.twu.net/eev-current/eepitch.el>
@@ -780,16 +780,27 @@ This is useful for for running processes that use pagers
like
;;; \___/ \__|_| |_|\___|_| \__\___|_| |_| |_| |_|___/
;;;
;; «eepitch-vterm» (to ".eepitch-vterm")
-;; 2020nov29: new code. Experimental.
-(defun eepitch-vterm ()
- "(This function is a prototype that only works in a controlled setting!)"
+(defun find-vtermprocess (&optional name program)
+ "This is like `find-comintprocess', but uses vterm.
+If NAME is given then the buffer name is \"*vterm: NAME*\"; if
+not, then it is just \"*vterm*\". If a buffer with that name
+already exists, then just visit it; if it doesn't exist then run
+vterm, asking it to create a buffer with that name and to run a
+vterm on it. If PROGRAM is given then ask vterm to run PROGRAM
+there instead of the default shell.\n
+This function is a prototype and will probably change."
+ (let ((buffername (if name (format "*vterm: %s*" name) "*vterm*"))
+ (vterm-shell (or program vterm-shell)))
+ (if (get-buffer buffername)
+ (find-ebuffer buffername)
+ (vterm buffername))))
+
+(defun eepitch-vterm (&optional name program)
+ "This is like `eepitch-comint', but using vterm instead of comint."
(interactive)
- ;; (eepitch '(vterm))
- (eepitch '(if (get-buffer "*vterm*")
- (set-buffer "*vterm*")
- (vterm "*vterm*")))
- (setq eepitch-line 'eepitch-line-vterm))
+ (prog1 (eepitch `(find-vtermprocess ,name ,program))
+ (setq eepitch-line 'eepitch-line-vterm)))
;; Thanks to Gabriele Bozzola for helping me with this.
(defun eepitch-line-vterm (line)
@@ -798,6 +809,19 @@ This is useful for for running processes that use pagers
like
'(progn (vterm-send-string line) ; "type" the line
(vterm-send-return)))) ; then do a RET
+;; Tests:
+;; (find-vterm-name-program)
+;; (find-vterm-name-program "shell 2")
+;; (find-vterm-name-program "julia" "julia")
+;; (find-vterm-name-program "julia 2" "julia")
+;; (eepitch-vterm)
+;; (eepitch-vterm "shell 2")
+;; (eepitch-vterm "julia" "julia")
+;; (eepitch-vterm "julia 2" "julia")
+;; (eepitch-vterm "top" "top")
+;; (defun eepitch-julia () (interactive) (eepitch-vterm "julia" "julia"))
+;; (defun eepitch-julia2 () (interactive) (eepitch-vterm "julia 2" "julia"))
+
diff --git a/eev-plinks.el b/eev-plinks.el
index ae7e969..86576ce 100644
--- a/eev-plinks.el
+++ b/eev-plinks.el
@@ -19,7 +19,7 @@
;;
;; Author: Eduardo Ochs <eduardoochs@gmail.com>
;; Maintainer: Eduardo Ochs <eduardoochs@gmail.com>
-;; Version: 2021aug06
+;; Version: 20210807
;; Keywords: e-scripts
;;
;; Latest version: <http://angg.twu.net/eev-current/eev-plinks.el>
@@ -302,13 +302,6 @@ TODO: detect the encoding!!!"
(defun find-wget00 (url)
(find-callprocess00 `("wget" "-q" "-O" "-" ,url)))
-(defun find-wget (url &rest rest)
- "Download URL with \"wget -q -O - URL\" and display the output."
- (setq url (ee-expand url))
- (apply 'find-eoutput-reuse (format "*wget: %s*" url)
- `(insert (find-wget00 ,url))
- rest))
-
(defun find-wget (url &rest pos-spec-list)
"Download URL with \"wget -q -O - URL\" and display the output.
If a buffer named \"*wget: URL*\" already exists then this
@@ -333,18 +326,30 @@ If wget can't download URL then this function runs
`error'."
(goto-char (point-min))
(apply 'ee-goto-position pos-spec-list)))))
-;; Tests:
-;; (find-wget "http://angg.twu.net/eev-current/eev-plinks.el")
-;; (find-wget "http://angg.twu.net/eev-current/eev-plinks.el" "find-wget")
-;; (find-wgeta "http://angg.twu.net/eev-current/eev-plinks.el" "find-wget")
-;; (find-wget "http://angg.twu.net/eev-current/DOESNOTEXIST")
-;;
+(defun find-wget-elisp (url &rest pos-spec-list)
+ "Like `find-wget', but puts the output buffer in emacs-lisp-mode."
+ (find-wget url)
+ (emacs-lisp-mode)
+ (apply 'ee-goto-position pos-spec-list))
+
(defun find-wgeta (url &rest pos-spec-list)
"Like `find-wget', but uses `ee-goto-anchor'."
(find-wget url)
(apply 'ee-goto-anchor pos-spec-list))
+(defun find-wgeta-elisp (url &rest pos-spec-list)
+ "Like `find-wgeta', but puts the output buffer in emacs-lisp-mode."
+ (find-wget url)
+ (emacs-lisp-mode)
+ (apply 'ee-goto-anchor pos-spec-list))
+;; Tests:
+;; (find-wget "http://angg.twu.net/eev-current/eev-plinks.el")
+;; (find-wget "http://angg.twu.net/eev-current/eev-plinks.el" "find-wget")
+;; (find-wgeta "http://angg.twu.net/eev-current/eev-plinks.el" "find-wget")
+;; (find-wget "http://angg.twu.net/eev-current/DOESNOTEXIST")
+;; (find-wget-elisp "http://angg.twu.net/eev-current/eev-plinks.el"
"find-wget")
+;; (find-wgeta-elisp "http://angg.twu.net/eev-current/eev-plinks.el"
"find-wget")
diff --git a/eev.el b/eev.el
index 6723ff1..e3fff18 100644
--- a/eev.el
+++ b/eev.el
@@ -6,7 +6,7 @@
;; Package-Requires: ((emacs "24.4"))
;; Keywords: lisp e-scripts
;; URL: http://angg.twu.net/#eev
-;; Version: 20210806
+;; Version: 20210808
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/eev 599901f: Rewrote `eepitch-vterm'.,
ELPA Syncer <=