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

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

[elpa] externals/eev 19bfb01: Small changes in `M-h M-v', `M-h M-e', an


From: ELPA Syncer
Subject: [elpa] externals/eev 19bfb01: Small changes in `M-h M-v', `M-h M-e', and `M-x u0'.
Date: Sat, 23 Oct 2021 04:57:20 -0400 (EDT)

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

    Small changes in `M-h M-v', `M-h M-e', and `M-x u0'.
---
 ChangeLog     | 12 ++++++++++++
 VERSION       |  4 ++--
 eev-elinks.el | 29 +++++++++++++++++------------
 eev-tlinks.el | 28 +++++++++++++++++++++++++---
 4 files changed, 56 insertions(+), 17 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8d372d2..d835a6a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2021-10-22  Eduardo Ochs  <eduardoochs@gmail.com>
+
+       * eev-elinks.el (find-evariable-links): added links starting with
+       `keymapp', `find-ekeymapdescr', and `describe-keymap'; use
+       `(find-function-read 'defvar)' instead of `(find-function-read
+       'variable)'; other cosmetic changes.
+
+       * eev-tlinks.el (ee-0x0-upload-region): use `ee-0x0-upload'.
+       (ee-0x0-upload): new function. The comments explain how to
+       "configure" it on versions of 0x0 that don't have a function
+       `0x0-upload'.
+
 2021-10-21  Eduardo Ochs  <eduardoochs@gmail.com>
 
        * eev-rcirc.el (find-freenode-links): deleted.
diff --git a/VERSION b/VERSION
index 8af705d..1a65115 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-Fri Oct 22 08:15:08 GMT 2021
-Fri Oct 22 05:15:08 -03 2021
+Sat Oct 23 08:15:32 GMT 2021
+Sat Oct 23 05:15:32 -03 2021
diff --git a/eev-elinks.el b/eev-elinks.el
index ae514e9..21e187a 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:    20211002
+;; Version:    20211022
 ;; Keywords:   e-scripts
 ;;
 ;; Latest version: <http://angg.twu.net/eev-current/eev-elinks.el>
@@ -292,21 +292,22 @@ This is an internal function used by 
`find-efunction-links' and
 ;;; |_| |_|_| |_|\__,_|      \___| \_/ \__,_|_|  |_|\__,_|_.__/|_|\___|
 ;;;                                                                    
 ;; «find-evariable-links» (to ".find-evariable-links")
-;; Skel: (find-find-links-links-old "\\M-v" "evariable" "var")
-;; A test: (find-evariable-links 'line-move-visual)
-;;                 (eek "M-h M-v  line-move-visual")
-
-;; Moved to eev-mode.el:
-;; (define-key eev-mode-map "\M-h\M-v" 'find-evariable-links)
-
-;; Test: (find-evariable-links 'line-move-visual)
+;; Skel: (find-find-links-links-new "evariable" "var" "")
+;; Tests: (find-evariable-links 'isearch-mode-map)
+;;        (find-evariable-links 'line-move-visual)
+;;                (eek "M-h M-v  line-move-visual")
+;; Key binding: (find-eev "eev-mode.el" "eev-mode-map-set" "M-h" "M-v")
+;;        
 (defun find-evariable-links (var &rest pos-spec-list)
 "Visit a temporary buffer containing hyperlinks about a variable."
-  (interactive (find-function-read 'variable))
-  (apply 'find-elinks
-   `((find-evariable-links ',var ,@pos-spec-list)
+  (interactive (find-function-read 'defvar))
+  (apply
+   'find-elinks
+   `((find-evariable-links ,var ,@pos-spec-list)
      (eek ,(format "M-h M-v  %s" var))
      ;; Convention: the first sexp always regenerates the buffer.
+     (find-efunction 'find-evariable-links)
+     ""
      ,var
      (describe-variable ',var)
      (find-evardescr ',var)
@@ -315,6 +316,10 @@ This is an internal function used by 
`find-efunction-links' and
      ""
      (find-enode "Variable Index" ,(format "* %S:" var))
      (find-elnode "Index" ,(format "* %S:" var))
+     ""
+     (keymapp ,var)
+     (find-ekeymapdescr ,var)
+     (describe-keymap ,var)
      )
    pos-spec-list))
 
diff --git a/eev-tlinks.el b/eev-tlinks.el
index 47391f4..c6c18e5 100644
--- a/eev-tlinks.el
+++ b/eev-tlinks.el
@@ -2115,7 +2115,8 @@ os.exit()
   (if fname (setq fname (ee-shorten-file-name fname)))
   (setq fname (or fname "{fname}"))
   (setq c (or c "{c}"))
-  (let* ((dir (file-name-directory fname)))
+  (let* ((dir (file-name-directory fname))
+        (fname0 (file-name-nondirectory fname)))
     (apply
      'find-elinks-elisp
      `((find-extra-file-links ,fname ,c ,@pos-spec-list)
@@ -2128,6 +2129,7 @@ os.exit()
 ;;      (find-pdf-like-intro \"9. Generating three pairs\" \"`M-h M-p'\")
 
 ;; Links to this file and directory:
+;; (find-fline {(ee-S dir)} {(ee-S fname0)})
 ;; (find-fline {(ee-S fname)})
 ;; (find-fline {(ee-S dir)})
 \(code-c-d \"{c}\" \"{dir}\")
@@ -2429,6 +2431,27 @@ sudo ./install-tl -select-repository
 (defvar ee-0x0-url nil
   "The last URL generated by a call to `ee-0x0-upload-region'.")
 
+(defun ee-0x0-upload (&rest rest)
+  "This should work like `0x0-upload'. Redefine if needed."
+  (apply '0x0-upload rest))
+
+;; If you are using a version of 0x0 that doesn't have `0x0-upload'
+;; then try using the hack below. See:
+;;   https://gitlab.com/willvaughn/emacs-0x0/-/issues/2
+;;
+;; Based on: (find-efunction '0x0-upload-kill-ring)
+' (defun ee-0x0-upload (b e server-old)
+    "This is a hack. See the source code."
+    (let ((server (0x0--choose-server))
+         (region-contents (buffer-substring-no-properties b e)))
+      (with-temp-buffer
+       (insert region-contents)
+       (let* ((file-name (or (buffer-file-name) (buffer-name) "kill-ring.txt"))
+               (bounds (0x0--make-bounds))
+               (size (0x0--bounds-size bounds))
+               (resp (0x0--send server file-name bounds)))
+         (0x0--handle-resp server size resp)))))
+
 (defun ee-0x0-upload-region (b e)
   "Upload the current region to 0x0 and show some elisp hyperlinks.
 I use this mainly on IRC chats, to send elisp snippets to people
@@ -2451,11 +2474,10 @@ runs in Emacs I can send the find-wget-elisp sexp to 
her and she
 only needs to type `M-e' on it to access the elisp code that I
 sent."
   (interactive "r")
-  (0x0-upload b e '0x0)
+  (ee-0x0-upload b e '0x0)
   (setq ee-0x0-url (ee-last-kill))
   (find-0x0-links))
 
-
 ;; «find-0x0-links»  (to ".find-0x0-links")
 ;; Skel: (find-find-links-links-new "0x0" "url" "")
 ;;



reply via email to

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