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

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

[elpa] externals/eev 615e832 4/4: Make "eev-rcirc.el" support the Libera


From: ELPA Syncer
Subject: [elpa] externals/eev 615e832 4/4: Make "eev-rcirc.el" support the LiberaChat server.
Date: Sat, 29 May 2021 08:57:10 -0400 (EDT)

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

    Make "eev-rcirc.el" support the LiberaChat server.
---
 ChangeLog      | 18 ++++++++++++++
 VERSION        |  4 +--
 eev-blinks.el  |  1 +
 eev-intro.el   | 69 +++++++++++++++++++++++++++++++--------------------
 eev-pdflike.el | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++--------
 eev-rcirc.el   | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
 eev-tla.el     | 18 +++++++++++++-
 eev.el         |  2 +-
 8 files changed, 223 insertions(+), 42 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c5c698c..3d42334 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2021-05-28  Eduardo Ochs  <eduardoochs@gmail.com>
+
+       * eev-pdflike.el (find-pdf-page): make it an alias to
+       `find-xpdf-page'. Also, the comments in "eev-pdflike.el" now say
+       that the recommened a way to change the default viewer is with a
+       `defalias'; before this change the recommended way was with a
+       `code-pdfbackend', that was much harder to understand.
+
+       * eev-rcirc.el (ee-libera-server, ee-libera-ichannels)
+       (ee-libera-achannels): new variables.
+       (find-libera, find-libera-2a, find-libera-3a, eepitch-libera): new
+       functions.
+
+       * eev-intro.el (find-rcirc-intro): use LiberaChat insted of
+       Freenode.
+
+       * eev-tla.el: new file.
+
 2021-05-16  Eduardo Ochs  <eduardoochs@gmail.com>
 
        * eev-blinks.el (ee-insert): use `characterp' instead of
diff --git a/VERSION b/VERSION
index 455d5fb..0bdc9ca 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-Sat May 22 19:36:43 GMT 2021
-Sat May 22 16:36:43 -03 2021
+Sat May 29 04:31:39 GMT 2021
+Sat May 29 01:31:39 -03 2021
diff --git a/eev-blinks.el b/eev-blinks.el
index c1d870e..4a2b803 100644
--- a/eev-blinks.el
+++ b/eev-blinks.el
@@ -1021,6 +1021,7 @@ Example: (ee-insert '(?a ?z) 10 \"Foo!\")"
 
 ;; Tests: (find-einsert '((32 1000) 10 (8000 12000)))
 ;;        (find-einsert '("Greek:\n" (913 969) 10 "Bold:\n" (120276 120327)))
+;;        (find-einsert (list (char-from-name "MUSICAL SYMBOL C CLEF")))
 (defun find-einsert (what &rest rest)
 "Show characters, strings, and ranges of characters in a temporary buffer.
 Example of use: (find-einsert '((32 1000) 10 (8000 12000)))"
diff --git a/eev-intro.el b/eev-intro.el
index 31a72be..8ab764a 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:    20210512
+;; Version:    20210529
 ;; Keywords:   e-scripts
 ;;
 ;; Latest version: <http://angg.twu.net/eev-current/eev-intro.el>
@@ -8914,8 +8914,13 @@ support for rcirc (and no support for ERC).
 
 The eev support for rcirc consists mainly of three high-level
 functions that connect to Freenode (the IRC server where most
-discussion of free software projects happen), called
-`find-freenode', `find-freenode-2a' and `find-freenode-3a'.
+discussion of free software projects USED TO happen), and three
+high-level functions that connect to LiberaChat (the IRC server
+where most discussion of free software projects were moved to).
+These functions are called:
+
+  `find-freenode', `find-freenode-2a' and `find-freenode-3a',
+  `find-libera', `find-libera-2a' and `find-libera-3a'.
 
 For a good explanation of what IRC is, see:
 
@@ -8929,21 +8934,21 @@ For a good explanation of what IRC is, see:
 Let's start with an example. In
 
   (setq rcirc-default-nick \"hakuryo\")
-  (setq ee-freenode-ichannels \"#eev\")
-  (find-freenode-3a \"#eev\")
+  (setq ee-libera-ichannels \"#eev\")
+  (find-libera-3a \"#eev\")
 
 the first sexp tells rcirc to use the nickname \"hakuryo\" when
 connecting to an IRC server; the second sets the set of \"initial
-channels\" on Freenode to just one channel, #eev - a channel that
-is usually empty, but that doesn't require authentication; the
-third sexp is a \"sexp hyperlink to the Freenode channel #eev\".
-The third sexp:
+channels\" on LiberaChat to just one channel, #eev - a channel
+that is usually empty, but that doesn't require authentication;
+the third sexp is a \"sexp hyperlink to the LiberaChat channel
+#eev\". The third sexp:
 
   1) creates a window setting like this,
 
        _________________________
       |           |             |
-      |           |   Freenode  |
+      |           |  LiberaChat |
       |           |    server   |
       |           |   messages  |
       |  current  |_____________|    
@@ -8953,7 +8958,7 @@ The third sexp:
       |           |             |
       |___________|_____________|
 
-  2) tells rcirc to connect to Freenode and to the channel #eev
+  2) tells rcirc to connect to LiberaChat and to the channel #eev
      in it,
 
   3) makes the window at the left - window \"A\" in the
@@ -8979,7 +8984,7 @@ the other users in #eev, and to experiment with commands. 
See:
 =========================
 Try this:
 
-  (find-freenode-2a \"#eev\")
+  (find-libera-2a \"#eev\")
 
 It creates a window setting like
 
@@ -9015,6 +9020,10 @@ and how to use it as a one-window setting. Also:
 
   (global-set-key [f2] 'rcirc-next-active-buffer)
 
+  (find-eev \"eev-elinks.el\" \"find-esetkey-links\")
+  (find-eev \"eev-elinks.el\" \"find-esetkey-links\" \"video\")
+  (find-esetkey-links (kbd \"<f2>\") 'rcirc-next-active-buffer)
+
 
 
 
@@ -9030,39 +9039,39 @@ to rcirc. If you connect occasionally to the channels 
#eev,
 your .emacs:
 
   (setq rcirc-default-nick \"hakuryo\")
-  (defun e2 () (interactive) (find-freenode-2a \"#eev\"))
-  (defun e3 () (interactive) (find-freenode-3a \"#eev\"))
-  (defun m2 () (interactive) (find-freenode-2a \"#emacs\"))
-  (defun m3 () (interactive) (find-freenode-3a \"#emacs\"))
-  (defun g2 () (interactive) (find-freenode-2a \"#git\"))
-  (defun g3 () (interactive) (find-freenode-3a \"#git\"))
-  (defun r2 () (interactive) (find-freenode-2a \"#ruby\"))
-  (defun r3 () (interactive) (find-freenode-3a \"#ruby\"))
+  (defun e2 () (interactive) (find-libera-2a \"#eev\"))
+  (defun e3 () (interactive) (find-libera-3a \"#eev\"))
+  (defun m2 () (interactive) (find-libera-2a \"#emacs\"))
+  (defun m3 () (interactive) (find-libera-3a \"#emacs\"))
+  (defun g2 () (interactive) (find-libera-2a \"#git\"))
+  (defun g3 () (interactive) (find-libera-3a \"#git\"))
+  (defun r2 () (interactive) (find-libera-2a \"#ruby\"))
+  (defun r3 () (interactive) (find-libera-3a \"#ruby\"))
 
 
 
 
-5. `find-freenode-links'
+5. `find-libera-links'
 ========================
 You can generate lines like the ones above by running
-`find-freenode-links'. For example:
+`find-libera-links'. For example:
 
-  (find-freenode-links \"e\" \"#eev\")
-  (find-freenode-links \"r\" \"#ruby\")
+  (find-libera-links \"e\" \"#eev\")
+  (find-libera-links \"r\" \"#ruby\")
 
 
 
 6. Other servers
 ================
 TODO: explain how to use find-rcirc-buffer and how to adapt
-find-freenode-* to other servers. Example:
+find-libera-* to other servers. Example:
 
   (find-rcirc-buffer-2a \"irc.debian.org\" \"#debian-live\" nil 
\"#debian-live\")
   (find-rcirc-buffer-3a \"irc.debian.org\" \"#debian-live\" nil 
\"#debian-live\")
 
 See:
 
-  (find-eev \"eev-rcirc.el\" \"find-freenode\")
+  (find-eev \"eev-rcirc.el\" \"find-libera\")
 
 " pos-spec-list)))
 
@@ -13181,10 +13190,18 @@ The functions in the `code-c-d' family produce code 
that is first
 
 8. `let' and `let*'
 ===================
+See:
 
   (find-elnode \"Local Variables\" \"Special Form: let \")
   (find-elnode \"Local Variables\" \"Special Form: let* \")
 
+Try:
+
+  (setq y 2)
+  (let  ((y 1) (z y)) (list y z))
+  (let* ((y 1) (z y)) (list y z))
+
+
 
 
 
diff --git a/eev-pdflike.el b/eev-pdflike.el
index cc77e8b..690bd3b 100644
--- a/eev-pdflike.el
+++ b/eev-pdflike.el
@@ -172,6 +172,7 @@
 ;;   «.code-xxxpdf-alias»              (to "code-xxxpdf-alias")
 ;;
 ;; «.find-pdf-page»                    (to "find-pdf-page")
+;;   «.change-default-viewer»          (to "change-default-viewer")
 ;; «.find-pdf-page-windows»            (to "find-pdf-page-windows")
 ;; «.find-pdf-text»                    (to "find-pdf-text")
 ;;
@@ -514,22 +515,81 @@ newline are spurious - and replaces them by \"(ff)\"."
 ;;;                         |_|                   |_|          |___/      
 ;;
 ;; «find-pdf-page» (to ".find-pdf-page")
-;; (find-code-pdfbackendalias "pdf-page" "xpdf-page")
-        (code-pdfbackendalias "pdf-page" "xpdf-page")
+;; (find-code-pdfbackend "pdf-page")
+        (code-pdfbackend "pdf-page")
 
-;; You can change the backend that `find-pdf-page' uses by running
-;; something like this:
+;; Make all functions in the `find-pdf-page' family use
+;; `find-xpdf-page' by default, in way that makes this default easy to
+;; change. This defalias will OVERRIDE the `find-pdf-page' defined by
+;; the `code-pdfbackend' above.
 ;;
-;; ;; (find-code-pdfbackendalias "pdf-page" "googlechrome-page")
-;;         (code-pdfbackendalias "pdf-page" "googlechrome-page")
+(defalias 'find-pdf-page 'find-xpdf-page)
 
+;; A VERY TECHNICAL DETAIL: apparently it would be cleaner to do
+;; something like this,
+;;
+;;   (defalias 'ee-find-pdf-page 'ee-find-xpdf-page)
+;;
+;; instead of:
+;;
+;;   (defalias 'find-pdf-page 'find-xpdf-page)
+;;
+;; but if we changed the `ee-find-pdf-page' instead of `find-pdf-page'
+;; then it would be much more difficult to change the default to
+;; `find-pdftools-page', and then later change it back to, say,
+;; `find-xpdf-page'...
+
+
+
+;;;  ____        __             _ _           _                        
+;;; |  _ \  ___ / _| __ _ _   _| | |_  __   _(_) _____      _____ _ __ 
+;;; | | | |/ _ \ |_ / _` | | | | | __| \ \ / / |/ _ \ \ /\ / / _ \ '__|
+;;; | |_| |  __/  _| (_| | |_| | | |_   \ V /| |  __/\ V  V /  __/ |   
+;;; |____/ \___|_|  \__,_|\__,_|_|\__|   \_/ |_|\___| \_/\_/ \___|_|   
+;;;                                                                    
+;; «change-default-viewer»  (to ".change-default-viewer")
+;; To make `find-pdf-page' use another default viewer
+;; you just have to use a `defalias', like this:
+;;
+;;   (defalias 'find-pdf-page 'find-xpdf-page)
+;;   (defalias 'find-pdf-page 'find-evince-page)
+;;   (defalias 'find-pdf-page 'find-pdftools-page)
+;;   (defalias 'find-pdf-page 'find-texworkspdf-page)
+;;   (defalias 'find-pdf-page 'find-googlechrome-page)
+;;
+;; You can inspect the current definition of `find-pdf-page' by
+;; looking at its "function cell". Function cells are explained here:
+;;
+;;   (find-elisp-intro "6. Defining functions")
+;;   (find-elisp-intro "11. Byte-compiled functions")
+;;
+;; When a function is defined with `defalias' its function cell
+;; contains a symbol - the "name" of the function that it points to.
+;; Try:
+;;
+;;   (find-efunctionpp                  'find-pdf-page)
+;;                     (symbol-function 'find-pdf-page)
+;;   (find-efunctionpp (symbol-function 'find-pdf-page))
+;;   (find-efunctionpp                  'find-xpdf-page)
+;;   (find-efunctionpp                  'find-evince-page)
+;;   (find-efunctionpp                  'find-pdftools-page)
+;;   (find-efunctionpp                  'find-texworkspdf-page)
+;;   (find-efunctionpp                  'find-googlechrome-page)
+
+
+;;;  ____        __             _ _                  __        ___  
+;;; |  _ \  ___ / _| __ _ _   _| | |_    ___  _ __   \ \      / / | 
+;;; | | | |/ _ \ |_ / _` | | | | | __|  / _ \| '_ \   \ \ /\ / / __)
+;;; | |_| |  __/  _| (_| | |_| | | |_  | (_) | | | |   \ V  V /\__ \
+;;; |____/ \___|_|  \__,_|\__,_|_|\__|  \___/|_| |_|    \_/\_/ (   /
+;;;                                                             |_| 
 ;; «find-pdf-page-windows»  (to ".find-pdf-page-windows")
 ;; (find-elnode "System Environment" "windows-nt")
 ;; (find-evardescr 'system-type)
+;; (to "find-texworkspdf-page")
 ;;
 (if (eq system-type 'windows-nt)
-    ;; (find-code-pdfbackendalias "pdf-page" "texworkspdf-page")
-            (code-pdfbackendalias "pdf-page" "texworkspdf-page")
+    (defalias 'find-pdf-page 'find-texworkspdf-page)
   )
 
 
@@ -546,8 +606,6 @@ newline are spurious - and replaces them by \"(ff)\"."
 ;; (find-code-pdfbackendalias "pdf-text" "pdftotext-text")
         (code-pdfbackendalias "pdf-text" "pdftotext-text")
 
-;; «aliases-windows»  (to ".aliases-windows")
-
 
 
 
diff --git a/eev-rcirc.el b/eev-rcirc.el
index d1b483d..286bfc2 100644
--- a/eev-rcirc.el
+++ b/eev-rcirc.el
@@ -1,6 +1,6 @@
 ;;; eev-rcirc.el -- rcirc-related elisp hyperlinks.
 
-;; Copyright (C) 2012-2019 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2021 Free Software Foundation, Inc.
 ;;
 ;; This file is part of GNU eev.
 ;;
@@ -19,7 +19,7 @@
 ;;
 ;; Author:     Eduardo Ochs <eduardoochs@gmail.com>
 ;; Maintainer: Eduardo Ochs <eduardoochs@gmail.com>
-;; Version:    20190511
+;; Version:    20210528
 ;; Keywords:   e-scripts
 ;;
 ;; Latest version: <http://angg.twu.net/eev-current/eev-rcirc.el>
@@ -33,6 +33,7 @@
 ;; «.find-rcirc-buffer-2a»     (to "find-rcirc-buffer-2a")
 ;; «.find-rcirc-buffer-3a»     (to "find-rcirc-buffer-3a")
 ;; «.find-freenode»            (to "find-freenode")
+;; «.find-libera»              (to "find-libera")
 ;; «.find-freenode-links»      (to "find-freenode-links")
 
 ;;; Commentary:
@@ -344,6 +345,76 @@ This is like `find-rcirc-buffer-3a' but uses
 
 
 
+;;;  _     _ _                     ____ _           _   
+;;; | |   (_) |__   ___ _ __ __ _ / ___| |__   __ _| |_ 
+;;; | |   | | '_ \ / _ \ '__/ _` | |   | '_ \ / _` | __|
+;;; | |___| | |_) |  __/ | | (_| | |___| | | | (_| | |_ 
+;;; |_____|_|_.__/ \___|_|  \__,_|\____|_| |_|\__,_|\__|
+;;;                                                     
+;; «find-libera»  (to ".find-libera")
+;; In may/2021 many important Free Software channels migrated from
+;; Freenode to LiberaChat. These functions are similar to the ones
+;; that start with `find-freenode', but they use LiberaChat instead.
+
+(defvar ee-libera-server "irc.libera.chat")
+
+(defvar ee-libera-ichannels "#eev #rcirc"
+  "The list of initial channels to connect to at libera.")
+
+(defvar ee-libera-achannels nil
+  "The list of channels that `find-libera' always reconnects to.
+When this is nil act as if this was a copy of `ee-libera-ichannels'.")
+
+(defun find-libera (&optional channel &rest pos-spec-list)
+  "Connect to libera and switch to the buffer for channel CHANNEL.
+This is like `find-rcirc-buffer', but uses the variables
+`ee-libera-ichannels' and `ee-libera-achannels'."
+  (apply 'find-rcirc-buffer
+         ee-libera-server
+         ee-libera-ichannels
+         ee-libera-achannels channel pos-spec-list))
+
+(defun find-libera-2a (channel)
+  "Connect to libera and create this window setup:
+   _________ ________
+  |         |        |
+  | current |  irc   |
+  | buffer  | buffer |
+  |_________|________|
+
+This is like `find-rcirc-buffer-2a' but uses
+`ee-libera-ichannels' and `ee-libera-achannels'."
+  (find-2a nil '(find-libera channel)))
+
+(defun find-libera-3a (channel)
+  "Connect to libera and create this window setup:
+   _________ _________
+  |         |         |
+  |         |   irc   |
+  |         |  server |
+  | current |_________|
+  | buffer  |         |
+  |         |   irc   |
+  |         | channel |
+  |_________|_________|
+
+This is like `find-rcirc-buffer-3a' but uses
+`ee-libera-ichannels' and `ee-libera-achannels'."
+  (find-3a nil '(find-libera) '(find-libera channel)))
+
+
+;; See: (find-efunction 'eepitch)
+;;      (find-efunction 'eepitch-to-buffer)
+(defun eepitch-libera (channel)
+  (interactive) (eepitch '(find-libera channel)))
+
+
+
+
+
+
+
+
 ;;;   __                               _            _ _       _        
 ;;;  / _|_ __ ___  ___ _ __   ___   __| | ___      | (_)_ __ | | _____ 
 ;;; | |_| '__/ _ \/ _ \ '_ \ / _ \ / _` |/ _ \_____| | | '_ \| |/ / __|
diff --git a/eev-tla.el b/eev-tla.el
index 0a1b895..b1450bb 100644
--- a/eev-tla.el
+++ b/eev-tla.el
@@ -19,7 +19,7 @@
 ;;
 ;; Author:     Eduardo Ochs <eduardoochs@gmail.com>
 ;; Maintainer: Eduardo Ochs <eduardoochs@gmail.com>
-;; Version:    20210522
+;; Version:    20210524
 ;; Keywords:   e-scripts
 ;;
 ;; Latest version: <http://angg.twu.net/eev-current/eev-tla.el>
@@ -148,6 +148,7 @@
 (defun ee-tla-canonicalize (o)
   (if (stringp o) (ee-shorten-file-name (ee-expand o)) o))
 
+;; Here the argument tla has to be a symbol.
 (defun ee-tla-set (tla fname)
   (setq fname (ee-tla-canonicalize fname))
   (puthash fname tla ee-tla-table)
@@ -173,6 +174,7 @@
                        collect (format "%S -> %S\n" k (ee-tla-get k)))))
     (apply 'concat (sort lines 'string<))))
 
+;; Tests:
 ;; (code-tla "ats" "~/LATEX/2020ats.tex")
 ;; (code-tla "pyt" "~/LATEX/2020pythontex.tex")
 ;; (code-tla "dnv" "~/LATEX/2020dednat6-video.tex")
@@ -198,7 +200,11 @@
 ;; «code-tla»  (to ".code-tla")
 ;;  Skel: (find-code-xxx-links "tla" "tla fname" "")
 ;; Tests: (find-code-tla "qux" "~/LATEX/2019J-ops-algebra.tex")
+;;        (find-code-tla 'qux  "~/LATEX/2019J-ops-algebra.tex")
 ;;        (find-code-tla "qux" "~/LATEX/2019J-ops-algebra.txt")
+;;        (find-code-tla 'qux  "~/LATEX/2019J-ops-algebra.txt")
+;; Note that here the first argument can be either a string or a
+;; symbol - try the tests above!
 
 (defun      code-tla (tla fname)
   (eval (ee-read      (ee-code-tla tla fname))))
@@ -357,6 +363,16 @@ See: (find-eevfile \"eev-tla.el\" \";; Commentary:\")"
 
 
 
+;; Let's make `tla' point to this file,
+(code-tla 'tla (ee-eevfile "eev-tla.el"))
+;; so that people will start with a non-empty
+;; `ee-tla-table'. Try:
+;;   (find-estring (ee-tla-table-to-string) "tla ->")
+;;   (find-estring (ee-tla-table-to-string) "-> tla")
+
+
+
+
 
 (provide 'eev-tla)
 
diff --git a/eev.el b/eev.el
index b804498..765287f 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: 20210522
+;; Version: 20210529
 
 ;; 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



reply via email to

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