[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eev dd13d0c: Some fixes in eev-rcirc.el.
From: |
ELPA Syncer |
Subject: |
[elpa] externals/eev dd13d0c: Some fixes in eev-rcirc.el. |
Date: |
Thu, 21 Oct 2021 03:57:18 -0400 (EDT) |
branch: externals/eev
commit dd13d0ce5aee9f2f6ac05c8da648b37cf91271ed
Author: Eduardo Ochs <eduardoochs@gmail.com>
Commit: Eduardo Ochs <eduardoochs@gmail.com>
Some fixes in eev-rcirc.el.
---
ChangeLog | 34 ++++++++++
VERSION | 4 +-
eepitch.el | 5 +-
eev-compose-hash.el | 2 +
eev-elinks.el | 13 ++--
eev-on-windows.el | 122 ++++++++++++++++++-----------------
eev-plinks.el | 4 +-
eev-rcirc.el | 183 +++++++++++++++++++++++++++++++++-------------------
eev-testblocks.el | 64 +++++++++---------
eev-tlinks.el | 54 ++++++++++++++--
eev.el | 2 +-
11 files changed, 311 insertions(+), 176 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ba17822..143b774 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,37 @@
+2021-10-21 Eduardo Ochs <eduardoochs@gmail.com>
+
+ * eev-rcirc.el (find-freenode-links): deleted.
+ (find-libera-links): new function.
+
+ * eev-plinks.el (find-wget): use `ee-wget-program'.
+
+2021-10-19 Eduardo Ochs <eduardoochs@gmail.com>
+
+ * eepitch.el (eepitch-ielm): new function.
+
+ * eev-testblocks.el (ee-insert-test-c-mode)
+ (ee-insert-test-haskell-mode, ee-insert-test-js-mode)
+ (ee-insert-test-julia-mode, ee-insert-test-lisp-mode)
+ (ee-insert-test-lua-mode, ee-insert-test-org-mode)
+ (ee-insert-test-python-mode, ee-insert-test-racket-mode)
+ (ee-insert-test-ruby-mode, ee-insert-test-scheme-mode)
+ (ee-insert-test-sh-mode, ee-insert-test-tcl-mode)
+ (ee-insert-test-tuareg-mode): use `ee-adjust-red-stars'.
+
+2021-10-18 Eduardo Ochs <eduardoochs@gmail.com>
+
+ * eev-tlinks.el (code-eevvideo-local, find-code-eevvideo-local)
+ (ee-code-eevvideo-local): new functions.
+
+ * eev-rcirc.el (ee-rcirc-connect-or-join): new function.
+ (find-rcirc-buffer-2a): use `ee-rcirc-connect-or-join'.
+ (find-rcirc-buffer-3a): use `ee-rcirc-connect-or-join'.
+
+2021-10-17 Eduardo Ochs <eduardoochs@gmail.com>
+
+ * eev-rcirc.el (ee-rcirc-connected): call `rcirc-buffer-process'
+ with a buffer instead of with a buffer name.
+
2021-10-16 Eduardo Ochs <eduardoochs@gmail.com>
* eev-audiovideo.el (find-eev2019video, find-eev2020video)
diff --git a/VERSION b/VERSION
index ad153f6..856957e 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-Sun Oct 17 00:18:14 GMT 2021
-Sat Oct 16 21:18:14 -03 2021
+Thu Oct 21 07:42:09 GMT 2021
+Thu Oct 21 04:42:09 -03 2021
diff --git a/eepitch.el b/eepitch.el
index 0456d80..b5f8cc3 100644
--- a/eepitch.el
+++ b/eepitch.el
@@ -19,7 +19,7 @@
;;
;; Author: Eduardo Ochs <eduardoochs@gmail.com>
;; Maintainer: Eduardo Ochs <eduardoochs@gmail.com>
-;; Version: 20211016
+;; Version: 20211019
;; Keywords: e-scripts
;;
;; Latest version: <http://angg.twu.net/eev-current/eepitch.el>
@@ -942,7 +942,8 @@ The arguments are explained here:
(defun eepitch-expect () (interactive) (eepitch-comint "expect" "expect"))
;; Lisps and Schemes:
-;; It would be better to run them in Slime.
+(defun eepitch-ielm () (interactive) (eepitch '(ielm)))
+;; It would be better to run these ones in Slime, but how? (Help needed!)
(defun eepitch-sbcl () (interactive) (eepitch-comint "sbcl" "sbcl"))
(defun eepitch-gcl () (interactive) (eepitch-comint "gcl" "gcl"))
(defun eepitch-guile () (interactive) (eepitch-comint "guile" "guile"))
diff --git a/eev-compose-hash.el b/eev-compose-hash.el
index 6b17e4a..08f27df 100644
--- a/eev-compose-hash.el
+++ b/eev-compose-hash.el
@@ -486,6 +486,8 @@ instead of inserting."
⋃ CU \\bigcup
⋄ po \\lozenge
⋅ Do \\Box
+ ⋮ vd \\vdots
+ ⋯ c. \\cdots
〈 <1 \\langle
〉 1> \\rangle
▁ __ \\_
diff --git a/eev-elinks.el b/eev-elinks.el
index b0360ae..ae514e9 100644
--- a/eev-elinks.el
+++ b/eev-elinks.el
@@ -236,14 +236,13 @@ The buffer is put in Emacs Lisp mode."
;; `find-eev-quick-intro':
;;
;; (find-eev-quick-intro "4. Creating Elisp Hyperlinks")
-;; (find-eev-quick-intro "(find-efunction-links 'find-file)")
+;; (find-eev-quick-intro "(find-efunction-links 'find-file)")
+;; (find-eev-quick-intro "4.2. `find-ekey-links' and friends")
+;; (find-efunction-links 'find-file)
+;; (eek "M-h M-f find-file")
+;;
+;; Key binding: (find-eev "eev-mode.el" "eev-mode-map-set" "M-h" "M-f")
;;
-;; Try: (find-efunction-links 'find-file)
-;; (eek "M-h M-f next-line")
-
-;; Moved to eev-mode.el:
-;; (define-key eev-mode-map "\M-h\M-f" 'find-efunction-links)
-
(defun find-efunction-links (&optional f &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks related to the function F."
(interactive (find-function-read))
diff --git a/eev-on-windows.el b/eev-on-windows.el
index f07793f..1c987f7 100644
--- a/eev-on-windows.el
+++ b/eev-on-windows.el
@@ -19,7 +19,7 @@
;;
;; Author: Eduardo Ochs <eduardoochs@gmail.com>
;; Maintainer: Eduardo Ochs <eduardoochs@gmail.com>
-;; Version: 20211016
+;; Version: 20211021
;; Keywords: e-scripts
;;
;; Latest version: <http://angg.twu.net/eev-current/eev-on-windows.el>
@@ -44,24 +44,41 @@
;; This file is not loaded by default. See:
;; (find-eev "eev-load.el")
;;
-;; At this moment what the Windows users need to do is:
-;; (require 'eev-on-windows)
-;; (mkdir "~/bin/" t)
-;; (delete-file "~/bin/wget.exe")
-;; (ee-download-with-eww "http://angg.twu.net/2021-oficina/wget.exe"
"~/bin/")
-;; (ee-use-windows)
-;; and they need to run the tests in this section of this file:
-;; (to "directories")
-;;
-;; The function `(ee-use-windows)' is sort of reversible - with:
-;; (ee-use-gnu-linux)
-;; (ee-use-find-angg-es-local)
-
-;; Setting your ~/.emacs
+;; 0.1. How to test this
;; =====================
+;; The HTMLized version of this file is here:
+;; http://angg.twu.net/eev-current/eev-on-windows.el.html
+;;
+;; Here's how to load it in Emacs and run its tests.
+;; 1. update eev using "M-x list-packages eev",
+;; 2. restart emacs to be 100% sure that it will use the new eev,
+;; 3. run "M-x eev-beginner" to turn eev-mode on,
+;; 4. run `M-j' to remember how to use the main keys of eev,
+;; 5. run "M-x find-eevfile" to open the directory with the source
+;; files of eev,
+;; 6. open the file eev-on-windows.el in that directory,
+;; 7. run the sexps below with `M-e' on each line:
+;;
+;; (require 'eev-on-windows)
+;; (mkdir "~/bin/" t)
+;; (delete-file "~/bin/wget.exe")
+;; (ee-download-with-eww "http://angg.twu.net/2021-oficina/wget.exe"
"~/bin/")
+;; (delete-file "~/bin/pdftotext.exe")
+;; (ee-download-with-eww "http://angg.twu.net/2021-oficina/pdftotext.exe"
"~/bin/")
+;; (ee-use-windows)
+;; (to "directories")
+;;
+;; The sexp `(to ...)' will take you to the two last sections of this
+;; file, where there are instructions for configuring some directories
+;; and s series of tests.
+;;
+;;
+;; 0.2. Setting your ~/.emacs
+;; ==========================
;; If you are helping me to test this AND you know how to edit your
-;; ~/.emacs then this is what you should put there:
+;; ~/.emacs (hey Daniel Bastos!) then this is what you should put
+;; there:
;;
;; ;; See: (find-eevfile "eev-on-windows.el" ".emacs")
;; (require 'eev-load)
@@ -88,10 +105,7 @@
;; «.ee-use-gnu-linux» (to "ee-use-gnu-linux")
;; «.ee-use-windows» (to "ee-use-windows")
;; «.directories» (to "directories")
-;;
-;; 2019:
-;; «.eev-tar» (to "eev-tar")
-;; «.ee-add-to-PATH» (to "ee-add-to-PATH")
+;; «.basic-tests» (to "basic-tests")
@@ -179,6 +193,7 @@
(delete-file eshell-aliases-file)
(eshell/alias "wget" "wget $*")
(setq ee-wget-program "wget")
+ (setq ee-pdftotext-program "pdftotext")
(setq ee-firefox-program "firefox")
(setq ee-googlechrome-program "google-chrome")
(setq ee-mpv-program "mpv")
@@ -192,6 +207,7 @@
(delete-file eshell-aliases-file) ; workaround for a bug
(eshell/alias "wget" "~/bin/wget.exe $*")
(setq ee-wget-program "~/bin/wget.exe")
+ (setq ee-pdftotext-program "~/bin/pdftotext.exe")
(setq ee-firefox-program "$FIREFOXDIR/firefox.exe")
(setq ee-googlechrome-program "$GOOGLECHROMEDIR/chrome.exe")
(setq ee-mpv-program "$MPVDIR/mpv.exe")
@@ -205,21 +221,35 @@
;; These directories are for Daniel Almeida's machine.
;; Most people will have to configure this.
;;
+;; From the internets:
+;;
+;; "If you can start a Mozilla application by using a shortcut or
+;; launcher icon, then you can usually see where its installation
+;; directory is located by context-clicking (right-clicking) the
+;; icon and looking at the properties."
+;;
+;; Apparently you'll have to do this by hand for Firefox, Chrome, and
+;; Mpv - I couldn't find a way to automate this... =/
+;;
(setenv "FIREFOXDIR" "c:/Program Files/Mozilla Firefox")
(setenv "GOOGLECHROMEDIR" "c:/Program Files/Google/Chrome/Application")
(setenv "MPVDIR" "c:/Users/danie/OneDrive/Documentos/mpv")
+;; «basic-tests» (to ".basic-tests")
;; 1. Basic tests
;; ==============
;; (find-fline "~/bin/" "wget.exe")
+;; (find-fline "~/bin/" "pdftotext.exe")
;; (find-fline "$GOOGLECHROMEDIR/" "chrome.exe")
;; (find-fline "$FIREFOXDIR/" "firefox.exe")
;; (find-fline "$MPVDIR/" "mpv.exe")
;; (find-callprocess `("~/bin/wget.exe" "--help"))
+;; (find-callprocess `("~/bin/pdftotext.exe" "--help"))
;; (find-callprocess `("$GOOGLECHROMEDIR/chrome.exe" "--help"))
;; (find-callprocess `("$FIREFOXDIR/firefox.exe" "--help"))
;; (find-callprocess `("$MPVDIR/mpv.exe" "--help"))
;; (find-callprocess `(,ee-wget-program "--help"))
+;; (find-callprocess `(,ee-pdftotext-program "--help"))
;; (find-callprocess `(,ee-googlechrome-program "--help"))
;; (find-callprocess `(,ee-firefox-program "--help"))
;; (find-callprocess `(,ee-mpv-program "--help"))
@@ -227,6 +257,8 @@
;; (find-angg "eev-current/eev-on-windows.el")
;; (find-es "2021-oficina" "M-3-M-e")
;;
+;; KNOWN BUG: the "--help" option doesn't work on chrome in Windows.
+;;
;; 2. Tests for using the browser as a PDF viewer
;; ==============================================
;; For the tests for using browsers as PDF viewers you will need to
@@ -250,14 +282,19 @@
;; (code-pdf-page "livesofanimals" "~/Coetzee99.pdf")
;; (find-livesofanimalspage (+ -110 127) "wrong thoughts")
;;
-;; Note that the links to PDFs converted to text, explained here,
+;; 3. Test the links to PDFs converted to text
+;; ===========================================
+;; The links to PDFs converted to text are explained here:
;; (find-pdf-like-intro "3. Hyperlinks to PDF files")
;; (find-pdf-like-intro "3. Hyperlinks to PDF files" "pdftotext")
-;; don't work on Windows yet because I haven't prepared a way to
-;; install pdftotext on Windows.
-;;
-;;
-;; 3. Test the links to videos
+;; Tests:
+;; (find-pdf-text "~/Coetzee99.pdf" 3)
+;; (code-pdf-text "livesofanimals" "~/Coetzee99.pdf")
+;; (find-livesofanimalstext (+ -110 127) "wrong thoughts")
+;; Try also this:
+;; (find-extra-file-links "~/Coetzee99.pdf" "livesofanimals")
+;;
+;; 4. Test the links to videos
;; ===========================
;; The video links are explained here:
;; (find-videos-intro "2. Short links to eev video tutorials")
@@ -265,7 +302,7 @@
;;
;; Basic tests for video links:
;; (delete-file (ee-expand
"$S/http/angg.twu.net/eev-videos/2021-test-blocks.mp4"))
-;; (brep "http://angg.twu.net/eev-videos/2021-test-blocks.mp4")
+;; (brep
"http://angg.twu.net/eev-videos/2021-test-blocks.mp4")
;; (delete-file (ee-expand
"$S/http/angg.twu.net/eev-videos/2021-test-blocks.mp4"))
;; (find-video "$S/http/angg.twu.net/eev-videos/2021-test-blocks.mp4")
;; (find-video "$S/http/angg.twu.net/eev-videos/2021-test-blocks.mp4" "2:33")
@@ -283,37 +320,6 @@
-
-
-;;; ____ ___ _ ___
-;;; |___ \ / _ \/ |/ _ \
-;;; __) | | | | | (_) |
-;;; / __/| |_| | |\__, |
-;;; |_____|\___/|_| /_/
-;;;
-;;
-;; «eev-tar» (to ".eev-tar")
-;; This is from 2019 and is now very obsolete -
-;; partially because eev is in ELPA.
-;; Moved to:
-;; (find-es "w32" "eev-tar-2019")
-;; New version:
-;; (find-eev-install-intro "5.4. `package-install-file'")
-;;
-;; «ee-add-to-PATH» (to ".ee-add-to-PATH")
-;; Until 2021 these file contained some very primitive functions -
-;; that I wrote in 2019 - to add directories to the PATH. They were
-;; moved to:
-;; (find-es "emacs" "ee-dospath-add")
-
-
-
-
-
-
-
-
-
(provide 'eev-on-windows)
diff --git a/eev-plinks.el b/eev-plinks.el
index 13ec158..e3253ae 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: 20211011
+;; Version: 20211021
;; Keywords: e-scripts
;;
;; Latest version: <http://angg.twu.net/eev-current/eev-plinks.el>
@@ -371,7 +371,7 @@ If a buffer named \"*wget: URL*\" already exists then this
function visits it instead of running wget again.
If wget can't download URL then this function runs `error'."
(let* ((eurl (ee-expand url))
- (wgetprogandargs (list "wget" "-q" "-O" "-" eurl))
+ (wgetprogandargs (list ee-wget-program "-q" "-O" "-" eurl))
(wgetbufname (format "*wget: %s*" eurl)))
(if (get-buffer wgetbufname)
(apply 'find-ebuffer wgetbufname pos-spec-list)
diff --git a/eev-rcirc.el b/eev-rcirc.el
index b9b7235..9acfd97 100644
--- a/eev-rcirc.el
+++ b/eev-rcirc.el
@@ -19,7 +19,7 @@
;;
;; Author: Eduardo Ochs <eduardoochs@gmail.com>
;; Maintainer: Eduardo Ochs <eduardoochs@gmail.com>
-;; Version: 20210528
+;; Version: 20211021
;; Keywords: e-scripts
;;
;; Latest version: <http://angg.twu.net/eev-current/eev-rcirc.el>
@@ -35,6 +35,7 @@
;; «.find-freenode» (to "find-freenode")
;; «.find-libera» (to "find-libera")
;; «.find-freenode-links» (to "find-freenode-links")
+;; «.find-libera-links» (to "find-libera-links")
;;; Commentary:
@@ -157,8 +158,8 @@ SERVER must be the name of an irc server, like
\"irc.freenode.net\"."
(defun ee-rcirc-connected (server)
"Return non-nil if we are already connected to irc server SERVER.
SERVER must be the name of an irc server, like \"irc.freenode.net\"."
- (and (get-buffer (ee-rcirc-buffer server))
- (rcirc-buffer-process (ee-rcirc-buffer server))))
+ (let ((buffer (get-buffer (ee-rcirc-buffer server))))
+ (and buffer (rcirc-buffer-process buffer))))
(defun ee-rcirc-connect (server channels)
"If we are not already connected to the irc server SERVER then connect to it
@@ -179,6 +180,29 @@ CHANNEL can also be nil, meaning the server buffer, or a
nick to /query."
(rcirc-cmd-join channel)
(rcirc-cmd-query channel))))
+;; Written in 2021oct18. Experimental.
+(defun ee-rcirc-connect-or-join (server &optional ichannels achannels channel)
+ "Make sure that we are connected to SERVER, and join the specified channels.
+When not connected to SERVER connect to it, taking the initial
+list of channels from ICHANNELS. When we are already connected to
+SERVER, join the channels in ACHANNELS. The name ACHANNELS
+originally meant \"channels to always connect to\", but this was
+changed years ago.\n
+The argument CHANNEL is a hack: when CHANNEL is non nil it is
+added to both ICHANNELS and ACHANNELS.\n
+In some old versions of eev-rcirc.el SOME functions were able to
+treat channel buffers and query buffers in a unified way...
+\"joining\" the channel \"fsbot\" - note that \"fsbot\" doesn't
+start with a \"#\" - would be the same as /query-ing fsbot. In
+the current version this doesn't work."
+ (if channel (setq ichannels (cons channel (ee-split ichannels))))
+ (if channel (setq achannels (cons channel (ee-split ichannels))))
+ (if (not (ee-rcirc-connected server))
+ (rcirc-connect server nil nil nil nil (ee-split ichannels))
+ (rcirc-join-channels (ee-rcirc-process server) (ee-split achannels))))
+
+
+
;;; __ _ _ _
@@ -196,7 +220,7 @@ CHANNEL can also be nil, meaning the server buffer, or a
nick to /query."
"Switch to the buffer for CHANNEL on SERVER. Make no attempt to (re)connect."
(apply 'find-ebuffer (ee-rcirc-buffer server channel) pos-spec-list))
-;; Test: (find-rcirc-buffer "irc.freenode.net" "#eev #emacs" nil "#eev")
+;; Test: (find-rcirc-buffer ee-libera-server "#eev #emacs" nil "#eev")
(defun find-rcirc-buffer
(server ichannels &optional achannels channel &rest pos-spec-list)
"Switch to the buffer for CHANNEL on SERVER.
@@ -213,62 +237,89 @@ If CHANNEL is nil then switch to the server buffer."
-;; «find-rcirc-buffer-2a» (to ".find-rcirc-buffer-2a")
-;; Test: (find-rcirc-buffer-2a "irc.freenode.net" "#eev" nil "#libreboot")
+;; 2021oct18: experimental.
+;; rcirc.el was heavily changed between the commit 0034067 (dated
+;; 2021sep03) and the commit 608b2ec (dated 2021sep04) - see:
+;;
+;; https://github.com/emacs-mirror/emacs/commits/master/lisp/net/rcirc.el
+;;
+;; and the changes made `find-rcirc-buffer-2a' and
+;; `find-rcirc-buffer-3a' stop working. I am _trying_ to rwrite
+;; `find-rcirc-buffer-2a' and `find-rcirc-buffer-3a' in a way that
+;; make them work on both the old and the new rcircs, but some things
+;; don't work on the rcircs yet.
+
(defun find-rcirc-buffer-2a
+ "This function is being rewritten. See the comments in the source code."
(server ichannels &optional achannels channel &rest pos-spec-list)
- "Connect to the irc server SERVER and create this window setup:
- _________ ________
- | | |
- | current | irc |
- | buffer | buffer |
- |_________|________|
-
-ICHANNELS is the list of initial channels (used when connecting
-to the server for the first time). ACHANNELS is the list of
-channels to always (re)connect to; if nil it defaults to
-ICHANNELS. CHANNEL selects what to display in the window at
-the right - nil means the server buffer, \"#foo\" means channel
-\"#foo\", \"nick\" means query \"nick\"."
+ (ee-rcirc-connect-or-join server ichannels achannels channel)
(find-2a
nil
- `(find-rcirc-buffer server ichannels achannels channel ,@pos-spec-list)))
+ `(find-rcirc-buffer0 server channel ,@pos-spec-list)))
-;; «find-rcirc-buffer-3a» (to ".find-rcirc-buffer-3a")
-;; Test: (find-rcirc-buffer-3a "irc.freenode.net" "#eev" nil "#libreboot")
+;; 2021oct18: experimental.
(defun find-rcirc-buffer-3a
+ "This function is being rewritten. See the comments in the source code."
(server ichannels achannels channel &rest pos-spec-list)
- "Connect to the irc server SERVER and create this window setup:
- _________ _________
- | | |
- | | irc |
- | | server |
- | current |_________|
- | buffer | |
- | | irc |
- | | channel |
- |_________|_________|
-
-ICHANNELS is the list of initial channels (used when connecting
-to the server for the first time). ACHANNELS is the list of
-channels to always (re)connect to; if nil it defaults to
-ICHANNELS. CHANNEL selects what to display in the lower right
-window - \"#foo\" means channel \"#foo\", \"nick\" means query
-\"nick\"."
+ (ee-rcirc-connect-or-join server ichannels achannels channel)
(find-3a
nil
- '(find-rcirc-buffer server ichannels achannels)
- `(find-rcirc-buffer server ichannels achannels channel ,@pos-spec-list)))
-
-
+ '(find-rcirc-buffer0 server nil)
+ `(find-rcirc-buffer0 server channel ,@pos-spec-list)))
+;; 2021oct18: commented out.
+;;
+;; ;; «find-rcirc-buffer-2a» (to ".find-rcirc-buffer-2a")
+;; ;; Test: (find-rcirc-buffer-2a "irc.freenode.net" "#eev" nil "#libreboot")
+;; (defun find-rcirc-buffer-2a
+;; (server ichannels &optional achannels channel &rest pos-spec-list)
+;; "Connect to the irc server SERVER and create this window setup:
+;; _________ ________
+;; | | |
+;; | current | irc |
+;; | buffer | buffer |
+;; |_________|________|
+;;
+;; ICHANNELS is the list of initial channels (used when connecting
+;; to the server for the first time). ACHANNELS is the list of
+;; channels to always (re)connect to; if nil it defaults to
+;; ICHANNELS. CHANNEL selects what to display in the window at
+;; the right - nil means the server buffer, \"#foo\" means channel
+;; \"#foo\", \"nick\" means query \"nick\"."
+;; (find-2a
+;; nil
+;; `(find-rcirc-buffer server ichannels achannels channel ,@pos-spec-list)))
+;;
+;; ;; «find-rcirc-buffer-3a» (to ".find-rcirc-buffer-3a")
+;; ;; Test: (find-rcirc-buffer-3a ee-libera-server "#eev" nil "#libreboot")
+;; (defun find-rcirc-buffer-3a
+;; (server ichannels achannels channel &rest pos-spec-list)
+;; "Connect to the irc server SERVER and create this window setup:
+;; _________ _________
+;; | | |
+;; | | irc |
+;; | | server |
+;; | current |_________|
+;; | buffer | |
+;; | | irc |
+;; | | channel |
+;; |_________|_________|
+;;
+;; ICHANNELS is the list of initial channels (used when connecting
+;; to the server for the first time). ACHANNELS is the list of
+;; channels to always (re)connect to; if nil it defaults to
+;; ICHANNELS. CHANNEL selects what to display in the lower right
+;; window - \"#foo\" means channel \"#foo\", \"nick\" means query
+;; \"nick\"."
+;; (find-3a
+;; nil
+;; '(find-rcirc-buffer server ichannels achannels)
+;; `(find-rcirc-buffer server ichannels achannels channel ,@pos-spec-list)))
-;; (find-find-links-links "{k}" "freenode" "channel")
-;;
;; (defun ee-irc-channel-around-point ()
;; (ee-stuff-around-point "#A-Za-z0-9_"))
;;
@@ -415,27 +466,27 @@ This is like `find-rcirc-buffer-3a' but uses
-;;; __ _ _ _ _
-;;; / _|_ __ ___ ___ _ __ ___ __| | ___ | (_)_ __ | | _____
-;;; | |_| '__/ _ \/ _ \ '_ \ / _ \ / _` |/ _ \_____| | | '_ \| |/ / __|
-;;; | _| | | __/ __/ | | | (_) | (_| | __/_____| | | | | | <\__ \
-;;; |_| |_| \___|\___|_| |_|\___/ \__,_|\___| |_|_|_| |_|_|\_\___/
-;;;
-;; «find-freenode-links» (to ".find-freenode-links")
+;;; _ _ _ _ _ _
+;;; | (_) |__ ___ _ __ __ _ | (_)_ __ | | _____
+;;; | | | '_ \ / _ \ '__/ _` |_____| | | '_ \| |/ / __|
+;;; | | | |_) | __/ | | (_| |_____| | | | | | <\__ \
+;;; |_|_|_.__/ \___|_| \__,_| |_|_|_| |_|_|\_\___/
+;;;
+;; «find-libera-links» (to ".find-libera-links")
-(defun find-freenode-links (&optional c channels &rest pos-spec-list)
-"Visit a temporary buffer containing code for connecting to a freenode
channel."
+(defun find-libera-links (&optional c channels &rest pos-spec-list)
+"Visit a temporary buffer containing code for connecting to a libera channel."
(interactive)
(setq c (or c "{c}"))
(setq channels (or channels "{channels}"))
(let ((channel (car (ee-split channels))))
(apply 'find-elinks
- `((find-freenode-links ,c ,channels)
- (find-freenode-links "e" "#eev")
- (find-freenode-links)
+ `((find-libera-links ,c ,channels)
+ (find-libera-links "e" "#eev")
+ (find-libera-links)
;; Convention: the first sexp always regenerates the buffer.
- ;; (find-efunction 'find-freenode-links)
- ;; (find-efunction 'find-freenode-2a)
+ ;; (find-efunction 'find-libera-links)
+ ;; (find-efunction 'find-libera-2a)
""
,(ee-template0 "\
;; To copy this to your .emacs, use:
@@ -452,17 +503,17 @@ This is like `find-rcirc-buffer-3a' but uses
;;
(setq rcirc-default-nick \"hakuryo\")
(setq rcirc-default-nick \"{(user-login-name)}\")
-(setq ee-freenode-ichannels {(ee-pp0 ee-freenode-ichannels)})
-(setq ee-freenode-achannels nil)
-(defun {c}2 () (interactive) (find-freenode-2a \"{channel}\"))
-(defun {c}3 () (interactive) (find-freenode-3a \"{channel}\"))
+(setq ee-libera-ichannels {(ee-pp0 ee-libera-ichannels)})
+(setq ee-libera-achannels nil)
+(defun {c}2 () (interactive) (find-libera-2a \"{channel}\"))
+(defun {c}3 () (interactive) (find-libera-3a \"{channel}\"))
")
)
pos-spec-list)))
-;; Tests: (find-freenode-links)
-;; (find-freenode-links "e" "#eev")
-;; (find-freenode-links "e" "#eev #emacs")
+;; Tests: (find-libera-links)
+;; (find-libera-links "e" "#eev")
+;; (find-libera-links "e" "#eev #emacs")
;; (find-rcirc-intro)
(provide 'eev-rcirc)
diff --git a/eev-testblocks.el b/eev-testblocks.el
index 899157f..c41415b 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: 20211009
+;; Version: 20211021
;; Keywords: e-scripts
;;
;; Latest version: <http://angg.twu.net/eev-current/eev-testblocks.el>
@@ -37,7 +37,7 @@
;;
;; (find-eepitch-intro "3. Test blocks")
;; (find-eepitch-intro "3.1. `find-eeit-links'")
-
+;; http://angg.twu.net/emacsconf2021.html
;; «.ee-insert-test» (to "ee-insert-test")
;; «.examples» (to "examples")
@@ -81,7 +81,7 @@
(interactive)
(let* ((fnamec (buffer-name))
(fname (replace-regexp-in-string ".c$" "" fnamec)))
- (insert (ee-template0 "\
+ (insert (ee-adjust-red-stars (ee-template0 "\
/*
(eepitch-shell)
(eepitch-kill)
@@ -90,11 +90,11 @@ gcc -o {fname} {fnamec}
./{fname}
*/
-"))))
+")))))
(defun ee-insert-test-haskell-mode ()
(interactive)
- (insert (format "
+ (insert (ee-adjust-red-stars (format "
{-
(eepitch-ghci)
(eepitch-kill)
@@ -102,11 +102,11 @@ gcc -o {fname} {fnamec}
:load %s
-}
-" (buffer-name))))
+" (buffer-name)))))
(defun ee-insert-test-js-mode ()
(interactive)
- (insert (format "
+ (insert (ee-adjust-red-stars (format "
/*
(eepitch-nodejs)
(eepitch-kill)
@@ -114,11 +114,11 @@ gcc -o {fname} {fnamec}
require(\"./%s\")
*/
-" (buffer-name))))
+" (buffer-name)))))
(defun ee-insert-test-julia-mode ()
(interactive)
- (insert (format "
+ (insert (ee-adjust-red-stars (format "
#=
(eepitch-julia)
(eepitch-kill)
@@ -126,11 +126,11 @@ require(\"./%s\")
include(\"%s\")
=#
-" (buffer-name))))
+" (buffer-name)))))
(defun ee-insert-test-lisp-mode ()
(interactive)
- (insert (format "
+ (insert (ee-adjust-red-stars (format "
#|
(eepitch-sbcl)
(eepitch-kill)
@@ -138,11 +138,11 @@ include(\"%s\")
(load \"%s\")
|#
-" (buffer-name))))
+" (buffer-name)))))
(defun ee-insert-test-lua-mode ()
(interactive)
- (insert (format "
+ (insert (ee-adjust-red-stars (format "
--[[
(eepitch-lua51)
(eepitch-kill)
@@ -150,11 +150,11 @@ include(\"%s\")
dofile \"%s\"
--]]
-" (buffer-name))))
+" (buffer-name)))))
(defun ee-insert-test-org-mode ()
(interactive)
- (insert "
+ (insert (ee-adjust-red-stars "
#+begin_comment
(eepitch-shell)
(eepitch-kill)
@@ -162,11 +162,11 @@ dofile \"%s\"
#+end_comment
-"))
+")))
(defun ee-insert-test-python-mode ()
(interactive)
- (insert (format "
+ (insert (ee-adjust-red-stars (format "
\"\"\"
(eepitch-python)
(eepitch-kill)
@@ -174,11 +174,11 @@ dofile \"%s\"
exec(open(\"%s\").read(), globals())
\"\"\"
-" (buffer-name))))
+" (buffer-name)))))
(defun ee-insert-test-racket-mode ()
(interactive)
- (insert (format "
+ (insert (ee-adjust-red-stars (format "
#|
(eepitch-racket)
(eepitch-kill)
@@ -186,11 +186,11 @@ exec(open(\"%s\").read(), globals())
(load \"%s\")
|#
-" (buffer-name))))
+" (buffer-name)))))
(defun ee-insert-test-ruby-mode ()
(interactive)
- (insert (format "
+ (insert (ee-adjust-red-stars (format "
=begin
(eepitch-ruby)
(eepitch-kill)
@@ -198,12 +198,12 @@ exec(open(\"%s\").read(), globals())
load \"%s\"
=end
-" (buffer-name))))
+" (buffer-name)))))
;; For Chez Scheme.
(defun ee-insert-test-scheme-mode ()
(interactive)
- (insert (format "
+ (insert (ee-adjust-red-stars (format "
#|
(eepitch-scheme)
(eepitch-kill)
@@ -211,12 +211,12 @@ load \"%s\"
(load \"%s\")
|#
-" (buffer-name))))
+" (buffer-name)))))
;; ;; For Guile.
;; (defun ee-insert-test-scheme-mode ()
;; (interactive)
-;; (insert (format "
+;; (insert (ee-adjust-red-stars (format "
;; #|
;; (eepitch-guile)
;; (eepitch-kill)
@@ -224,11 +224,11 @@ load \"%s\"
;; (load \"%s\")
;;
;; |#
-;; " (buffer-name))))
+;; " (buffer-name)))))
(defun ee-insert-test-sh-mode ()
(interactive)
- (insert (format "
+ (insert (ee-adjust-red-stars (format "
: <<'%%%%%%%%%%'
(eepitch-sh)
(eepitch-kill)
@@ -236,11 +236,11 @@ load \"%s\"
. %s
%%%%%%%%%%
-" (buffer-name))))
+" (buffer-name)))))
(defun ee-insert-test-tcl-mode ()
(interactive)
- (insert (format "
+ (insert (ee-adjust-red-stars (format "
set THIS_IS_A_TEST_BLOCK {
(eepitch-tclsh)
(eepitch-kill)
@@ -248,11 +248,11 @@ set THIS_IS_A_TEST_BLOCK {
source %s
}
-" (buffer-name))))
+" (buffer-name)))))
(defun ee-insert-test-tuareg-mode ()
(interactive)
- (insert (format "
+ (insert (ee-adjust-red-stars (format "
(*
(eepitch-ocaml)
(eepitch-kill)
@@ -260,7 +260,7 @@ source %s
#use \"%s\";;
*)
-" (buffer-name))))
+" (buffer-name)))))
diff --git a/eev-tlinks.el b/eev-tlinks.el
index b478718..47391f4 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: 20211016
+;; Version: 20211021
;; Keywords: e-scripts
;;
;; Latest version: <http://angg.twu.net/eev-current/eev-tlinks.el>
@@ -65,6 +65,7 @@
;; «.find-eev-install-links» (to "find-eev-install-links")
;; «.find-eev-update-links» (to "find-eev-update-links")
;; «.find-youtubedl-links» (to "find-youtubedl-links")
+;; «.ee-youtubedl-command» (to "ee-youtubedl-command")
;; «.find-psne-links» (to "find-psne-links")
;; «.find-git-links» (to "find-git-links")
;; «.find-fossil-links» (to "find-fossil-links")
@@ -75,6 +76,7 @@
;; «.ee-psne-if-needed» (to "ee-psne-if-needed")
;; «.code-psnevideo» (to "code-psnevideo")
;; «.code-eevvideo» (to "code-eevvideo")
+;; «.code-eevvideo-local» (to "code-eevvideo-local")
;; «.hardcoded-paths» (to "hardcoded-paths")
;; «.find-eev-video-links» (to "find-eev-video-links")
;; «.find-eevshortvideo-links» (to "find-eevshortvideo-links")
@@ -1071,13 +1073,30 @@ Files that look like subtitle files are ignored."
(if (>= (length hash) 11)
(substring hash -11))))
-;; The option `-t' has been deprecated! =(
-;; When we run youtube-dl with `-t' it says:
-;; WARNING: --title is deprecated. Use -o "%(title)s-%(id)s.%(ext)s" instead.
-;; See: (find-man "1 youtube-dl")
-;; (find-man "1 youtube-dl" "\nOUTPUT TEMPLATE")
+;; «ee-youtubedl-command» (to ".ee-youtubedl-command")
+;; The default value is `ee-youtubedl-command' is (still) this one:
;;
(defvar ee-youtubedl-command "youtube-dl -t")
+;;
+;; but this is outdated in several ways:
+;;
+;; 1. when we use it we get this warning:
+;; "WARNING: --title is deprecated. Use
+;; -o "%(title)s-%(id)s.%(ext)s" instead."
+;;
+;; 2. youtube-dl is currently sort of dead. See:
+;;
https://old.reddit.com/r/DataHoarder/comments/p9riey/youtubedl_is_possibly_dead/
+;; https://news.ycombinator.com/item?id=28289981 Youtube-dl is possibly
dead
+;;
+;; 3. yt-dlp doesn't support the options `-t' and `--title':
+;; https://github.com/yt-dlp/yt-dlp
+;; https://github.com/yt-dlp/yt-dlp#Removed
+;;
+;; Suggestion (2021oct17): install yt-dlp and put this in your .emacs:
+;;
+;; (setq ee-youtubedl-command "yt-dlp -o '%(title)s-%(id)s.%(ext)s'")
+
+
;; The directories into which we usually download videos.
;; Tests: (find-elinks (ee-youtubedl-dir-links))
@@ -1660,6 +1679,29 @@ echo '{url}' >> ~/.psne.log
(find-eevvideo-links \"{c}\" \"{stem}\" \"{youtubeid}\" time))
"))
+;; «code-eevvideo-local» (to ".code-eevvideo-local")
+;; Test: (code-eevvideo-local "vlinks" "2021-video-links" "xQqWufQgzVY")
+;; (find-code-eevvideo-local "vlinks" "2021-video-links" "xQqWufQgzVY")
+;;
+(defun code-eevvideo-local (c stem &optional youtubeid)
+ (eval (ee-read (ee-code-eevvideo-local c stem youtubeid))))
+(defun find-code-eevvideo-local (&optional c stem youtubeid &rest rest)
+ (setq c (or c "{c}"))
+ (setq stem (or stem "{stem}"))
+ (setq youtubeid (or youtubeid "{youtubeid}"))
+ (find-estring-elisp (apply 'ee-code-eevvideo-local c stem youtubeid rest)))
+(defun ee-code-eevvideo-local (c stem youtubeid)
+ (ee-template0 "\
+;; (find-code-eevvideo-local \"{c}\" \"{stem}\" \"{youtubeid}\")
+;; (code-eevvideo-local \"{c}\" \"{stem}\" \"{youtubeid}\")
+;;
+;; (find-fline \"$S/http/angg.twu.net/eev-videos/\"
\"{stem}\")
+;; (find-code-video \"{c}video\"
\"$S/http/angg.twu.net/eev-videos/{stem}.mp4\")
+ (code-video \"{c}video\"
\"$S/http/angg.twu.net/eev-videos/{stem}.mp4\")
+;; (find-{c}video \"0:00\")
+"))
+
+
;; «hardcoded-paths» (to ".hardcoded-paths")
;;
diff --git a/eev.el b/eev.el
index f4b2588..d0e3c93 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: 20211016
+;; Version: 20211021
;; 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 dd13d0c: Some fixes in eev-rcirc.el.,
ELPA Syncer <=