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

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

[elpa] externals/eev f182220 11/12: Added `ee-copy-preceding-tag-to-kill


From: Stefan Monnier
Subject: [elpa] externals/eev f182220 11/12: Added `ee-copy-preceding-tag-to-kill-ring'.
Date: Mon, 2 Sep 2019 16:57:45 -0400 (EDT)

branch: externals/eev
commit f1822207ce876991605c4184af928587dbb911af
Author: Eduardo Ochs <edrx@circe.birdland>
Commit: Eduardo Ochs <edrx@circe.birdland>

    Added `ee-copy-preceding-tag-to-kill-ring'.
---
 ChangeLog     |  16 ++++++++
 VERSION       |   4 +-
 eev-edit.el   |  43 +++++++++++++++-----
 eev-elinks.el |   5 +++
 eev-intro.el  | 126 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 182 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f38071c..5e2a329 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2019-08-29  Eduardo Ochs  <address@hidden>
+
+       * eev-edit.el (ee-copy-this-line-to-kill-ring): use
+       `ee-copy-preceding-tag-to-kill-ring' when called with an argument.
+       (ee-tag-re, ee-copy-preceding-tag-to-kill-ring): new functions.
+
+2019-08-20  Eduardo Ochs  <address@hidden>
+
+       * eev-intro.el (find-what-sexps-can-do-intro): new intro (script
+       for a video).
+
+2019-08-18  Eduardo Ochs  <address@hidden>
+
+       * eev-elinks.el (find-code-audiovideo-links): added calls to
+       `eev-avadj-mode'.
+
 2019-08-17  Eduardo Ochs  <address@hidden>
 
        * eev-tlinks.el (find-debpkg-links): small changes.
diff --git a/VERSION b/VERSION
index 3946cb0..46e3e96 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-Sun Aug 18 00:22:33 GMT 2019
-Sun Aug 18 01:22:33 BST 2019
+Sun Sep  1 15:53:05 GMT 2019
+Sun Sep  1 16:53:05 BST 2019
diff --git a/eev-edit.el b/eev-edit.el
index e91eeef..53bc716 100644
--- a/eev-edit.el
+++ b/eev-edit.el
@@ -19,7 +19,7 @@
 ;;
 ;; Author:     Eduardo Ochs <address@hidden>
 ;; Maintainer: Eduardo Ochs <address@hidden>
-;; Version:    2019apr25
+;; Version:    2019aug29
 ;; Keywords:   e-scripts
 ;;
 ;; Latest version: <http://angg.twu.net/eev-current/eev-edit.el>
@@ -122,16 +122,39 @@ and you copy that hyperlink to a more permanent place."
 ;; «ee-copy-this-line-to-kill-ring» (to ".ee-copy-this-line-to-kill-ring")
 ;; (define-key eev-mode-map "\M-h\M-w" 'ee-copy-this-line-to-kill-ring)
 
-(defun ee-copy-this-line-to-kill-ring ()
-  "Copy the current line to the kill ring and highlight (\"flash\") it."
+(defun ee-copy-this-line-to-kill-ring (&optional arg)
+  "Copy the current line to the kill ring and highlight (\"flash\") it.
+With a prefix argument run `ee-copy-preceding-tag-to-kill-ring' instead."
+  (interactive "P")
+  (if arg (ee-copy-preceding-tag-to-kill-ring)
+    (let* ((start (ee-bol))
+          (end   (save-excursion (next-line) (ee-bol)))
+          (str   (buffer-substring start end))
+          (msg   "Copied the current line to the kill ring - use C-y to 
paste"))
+      (eeflash+ start end eeflash-copy)
+      (kill-new str)
+      (message msg))))
+
+
+;; Experimental, 2019aug29
+;; (defun ee-tag-re () (ee-tolatin1 "«\\([!-~]+\\)»"))
+(defun ee-tag-re () "«\\([!-~]+\\)»")
+
+(defun ee-copy-preceding-tag-to-kill-ring ()
+  "Copy the preceding tag to the kill ring and highlight (\"flash\") it.
+A \"tag\" is the string between \"«»\"s in an anchor."
   (interactive)
-  (let* ((start (ee-bol))
-        (end   (save-excursion (next-line) (ee-bol)))
-        (str   (buffer-substring start end))
-        (msg   "Copied the current line to the kill ring - use C-y to paste"))
-    (eeflash+ start end eeflash-copy)
-    (kill-new str)
-    (message msg)))
+  (save-excursion
+    (if (re-search-backward (ee-tag-re))
+       (let* ((start (match-beginning 1))
+              (end   (match-end 1))
+              (str   (ee-no-properties (match-string 1)))
+              (msg   (format "Copied \"%s\" to the kill ring" str)))
+         (eeflash start end eeflash-copy)
+         (kill-new str)
+         (message msg))
+      (error "No preceding tag!"))))
+    
 
 
 
diff --git a/eev-elinks.el b/eev-elinks.el
index 0705277..50dd5f5 100644
--- a/eev-elinks.el
+++ b/eev-elinks.el
@@ -1403,10 +1403,15 @@ See: (find-here-links-intro \"5. `find-here-links-1'\")"
 ;; (find-audio \"{fname}\")
 \(code-audio \"{c}audio\" \"{fname}\")
 ;; \(find-{c}audio)
+;; \(find-{c}audio \"0:00\")
 
 ;; (find-video \"{fname}\")
 \(code-video \"{c}video\" \"{fname}\")
 ;; \(find-{c}video)
+;; \(find-{c}video \"0:00\")
+
+;; (eev-avadj-mode 0)
+;; (eev-avadj-mode)
 ")
        )
      pos-spec-list)))
diff --git a/eev-intro.el b/eev-intro.el
index a07372c..43056b4 100644
--- a/eev-intro.el
+++ b/eev-intro.el
@@ -93,6 +93,7 @@
 
 ;; Videos:
 ;; «.find-three-main-keys-intro»       (to "find-three-main-keys-intro")
+;; «.find-what-sexps-can-do-intro»     (to "find-what-sexps-can-do-intro")
 ;; «.find-creating-links-intro»                (to "find-creating-links-intro")
 
 
@@ -10088,6 +10089,131 @@ Btw, the videos that I produced using this \"script\" 
are here:
 
 
 
+;;; __        ___           _                                               
+;;; \ \      / / |__   __ _| |_   ___  _____  ___ __  ___    ___ __ _ _ __  
+;;;  \ \ /\ / /| '_ \ / _` | __| / __|/ _ \ \/ / '_ \/ __|  / __/ _` | '_ \ 
+;;;   \ V  V / | | | | (_| | |_  \__ \  __/>  <| |_) \__ \ | (_| (_| | | | |
+;;;    \_/\_/  |_| |_|\__,_|\__| |___/\___/_/\_\ .__/|___/  \___\__,_|_| |_|
+;;;                                            |_|                          
+;;
+;; «find-what-sexps-can-do-intro»  (to ".find-what-sexps-can-do-intro")
+;; (find-intro-links "what-sexps-can-do")
+
+(defun find-what-sexps-can-do-intro (&rest pos-spec-list) (interactive)
+  (let ((ee-buffer-name "*(find-what-sexps-can-do-intro)*"))
+    (apply 'find-eintro "\
+
+  What Lisp expressions can do:
+  A mini tutorial
+    Eduardo Ochs
+    http://angg.twu.net/#eev
+    http://angg.twu.net/#eev-screencasts
+    (Version: 2019aug20)
+
+  Everybody knows that Emacs is written in Lisp and that one of
+  its main key sequences, `C-x C-e', executes the Lisp expression
+  before the cursor and shows the result in the echo area... this
+  can be used to calculate,
+
+       (* 2 3)
+               (* 4 5)
+    (+ (* 2 3) (* 4 5))
+
+  and can be used to call external programs - for examples, here
+  he have some Lisp expressions that invoke a video player,
+
+  (find-video \"~/eev-videos/Punch_and_Judy_Mark_Poulton-K6LmZ0A1s9U.mp4\")
+  (code-video \"punchandjudyvideo\" 
\"~/eev-videos/Punch_and_Judy_Mark_Poulton-K6LmZ0A1s9U.mp4\")
+  (find-punchandjudyvideo)
+  (find-punchandjudyvideo \"0:00\")
+  (find-punchandjudyvideo \"0:10\" \"calls the baby\")
+  (find-punchandjudyvideo \"0:40\" \"where's the baby\")
+  (find-punchandjudyvideo \"1:04\" \"right position\")
+  (find-punchandjudyvideo \"1:17\" \"he will sing the baby to sleep\")
+  (find-punchandjudyvideo \"1:33\" \"1-2-3\")
+  (find-punchandjudyvideo \"1:48\" \"baby downstairs\")
+  (find-punchandjudyvideo \"3:12\" \"slaps\")
+  (find-punchandjudyvideo \"3:50\" \"1-2-3\")
+  (find-punchandjudyvideo \"4:34\" \"you keep an eye on mr Punch\")
+  (find-punchandjudyvideo \"4:46\" \"hat\")
+  (find-punchandjudyvideo \"5:03\" \"hat\")
+  (find-punchandjudyvideo \"5:25\" \"did you see him?\")
+  (find-punchandjudyvideo \"5:55\" \"clown\")
+  (find-punchandjudyvideo \"6:14\" \"slaps\")
+  (find-punchandjudyvideo \"6:52\" \"sausages\")
+  (find-punchandjudyvideo \"7:24\" \"crocodile\")
+  (find-punchandjudyvideo \"8:07\" \"crocodile + sausages\")
+  (find-punchandjudyvideo \"8:32\" \"another scene\")
+  (find-punchandjudyvideo \"8:39\" \"fight\")
+  (find-punchandjudyvideo \"9:03\" \"clown\")
+  (find-punchandjudyvideo \"9:45\" \"mr punch\")
+
+  and here we have some Lisp expressions that open a PDF at a
+  given page:
+
+  (code-pdf-page \"livesofanimals\" \"~/Coetzee99.pdf\")
+  (code-pdf-text \"livesofanimals\" \"~/Coetzee99.pdf\" -110)
+  (find-livesofanimalspage)
+  (find-livesofanimalstext)
+  (find-livesofanimalspage (+ -110 113))
+  (find-livesofanimalstext (+ -110 113))
+  (find-livesofanimalspage (+ -110 113) \"LECTURE I.\")
+  (find-livesofanimalstext (+ -110 113) \"LECTURE I.\")
+  (find-livesofanimalspage (+ -110 127) \"wrong thoughts\")
+  (find-livesofanimalstext (+ -110 127) \"wrong thoughts\")
+  (find-livesofanimalspage (+ -110 132) \"into the place of their victims\")
+  (find-livesofanimalstext (+ -110 132) \"into the place of their victims\")
+  (find-livesofanimalspage (+ -110 133) \"To write that book I had to think\")
+  (find-livesofanimalstext (+ -110 133) \"To write that book I had to think\")
+  (find-livesofanimalspage (+ -110 134) \"woke up haggard in the mornings\")
+  (find-livesofanimalstext (+ -110 134) \"woke up haggard in the mornings\")
+  (find-livesofanimalspage (+ -110 143) \"Babies have no self-consciousness\")
+  (find-livesofanimalstext (+ -110 143) \"Babies have no self-consciousness\")
+  (find-livesofanimalspage (+ -110 145) \"squirrel doing its thinking\")
+  (find-livesofanimalstext (+ -110 145) \"squirrel doing its thinking\")
+  (find-livesofanimalspage (+ -110 147) \"Rilke's panther\")
+  (find-livesofanimalstext (+ -110 147) \"Rilke's panther\")
+  (find-livesofanimalspage (+ -110 162) \"a grasp of the meaning\")
+  (find-livesofanimalstext (+ -110 162) \"a grasp of the meaning\")
+  (find-livesofanimalspage (+ -110 164) \"last common ground\")
+  (find-livesofanimalstext (+ -110 164) \"last common ground\")
+
+
+
+
+Preparation:
+
+ (eepitch-shell)
+ (eepitch-kill)
+ (eepitch-shell)
+cd
+wget -nc https://tannerlectures.utah.edu/_documents/a-to-z/c/Coetzee99.pdf
+
+ (eepitch-shell)
+ (eepitch-kill)
+ (eepitch-shell)
+# http://www.youtube.com/watch?v=K6LmZ0A1s9U
+# http://angg.twu.net/eev-videos/Punch_and_Judy_Mark_Poulton-K6LmZ0A1s9U.mp4
+mkdir ~/eev-videos/
+cd    ~/eev-videos/
+wget -nc 
http://angg.twu.net/eev-videos/Punch_and_Judy_Mark_Poulton-K6LmZ0A1s9U.mp4
+
+# (find-eev \"eev-audiovideo.el\" \"find-mpv-video\" \"ee-mpv-video-options\")
+# (setq ee-mpv-video-options '(\"--fs\" \"--osd-level=2\"))
+# (setq ee-mpv-video-options        '(\"--osd-level=2\"))
+
+
+# (find-fline \"~/eev-videos/\")
+
+
+
+" pos-spec-list)))
+
+;; (find-what-sexps-can-do-intro)
+
+
+
+
 
 
 ;; «find-creating-links-intro»  (to ".find-creating-links-intro")



reply via email to

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