[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eev 7bafae3220: Fixed `ee-kl-line' and `ee-copy-this-li
From: |
ELPA Syncer |
Subject: |
[elpa] externals/eev 7bafae3220: Fixed `ee-kl-line' and `ee-copy-this-line-to-kill-ring'. |
Date: |
Wed, 3 Jan 2024 09:58:02 -0500 (EST) |
branch: externals/eev
commit 7bafae3220c7349da3e63c5f165f74732cd6e68e
Author: Eduardo Ochs <eduardoochs@gmail.com>
Commit: Eduardo Ochs <eduardoochs@gmail.com>
Fixed `ee-kl-line' and `ee-copy-this-line-to-kill-ring'.
---
ChangeLog | 11 +++++++++++
VERSION | 4 ++--
eev-edit.el | 6 +++---
eev-intro.el | 31 ++++++++++++++++++++++++++++---
eev-kla.el | 7 ++++---
5 files changed, 48 insertions(+), 11 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8a065615df..2c8d0f735e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2024-01-03 Eduardo Ochs <eduardoochs@gmail.com>
+
+ * eev-intro.el (ee-bol-skip-invisible, ee-eol-skip-invisible): new
+ functions.
+
+ * eev-edit.el (ee-copy-this-line-to-kill-ring): use
+ `ee-bol-skip-invisible' and `ee-eol-skip-invisible'.
+
+ * eev-kla.el (ee-kl-line): use `ee-bol-skip-invisible' and
+ `ee-eol-skip-invisible'.
+
2024-01-02 Eduardo Ochs <eduardoochs@gmail.com>
* eev-intro.el (find-kl-here-intro): new function.
diff --git a/VERSION b/VERSION
index c8cd456a99..36c9edeef0 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-Tue Jan 2 18:15:53 GMT 2024
-Tue Jan 2 15:15:53 -03 2024
+Wed Jan 3 12:33:17 GMT 2024
+Wed Jan 3 09:33:17 -03 2024
diff --git a/eev-edit.el b/eev-edit.el
index eb1b48a3b8..743291dde3 100644
--- a/eev-edit.el
+++ b/eev-edit.el
@@ -19,7 +19,7 @@
;;
;; Author: Eduardo Ochs <eduardoochs@gmail.com>
;; Maintainer: Eduardo Ochs <eduardoochs@gmail.com>
-;; Version: 20230127
+;; Version: 20240103
;; Keywords: e-scripts
;;
;; Latest version: <http://anggtwu.net/eev-current/eev-edit.el>
@@ -135,8 +135,8 @@ and you copy that hyperlink to a more permanent place."
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)))
+ (let* ((start (ee-bol-skip-invisible))
+ (end (ee-bol-skip-invisible))
(str (buffer-substring start end))
(msg "Copied the current line to the kill ring - use C-y to
paste"))
(eeflash+ start end eeflash-copy)
diff --git a/eev-intro.el b/eev-intro.el
index cf4b1de75c..d7e32ea04b 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: 20240102
+;; Version: 20240103
;; Keywords: e-scripts
;;
;; Latest version: <http://anggtwu.net/eev-current/eev-intro.el>
@@ -56,6 +56,7 @@
;; Quick index:
;; «.find-intro-dual» (to "find-intro-dual")
;; «.find-eintro» (to "find-eintro")
+;; «.skip-invisible» (to "skip-invisible")
;;
;; «.find-eev-quick-intro» (to "find-eev-quick-intro")
;; «.find-emacs-keys-intro» (to "find-emacs-keys-intro")
@@ -262,6 +263,30 @@ Actually go to: (find-eev \"eev-intro.el\"
\"find-foo-intro\" (ee-last-kill))."
(apply `find-eintro (ee-tolatin1 bigstr) pos-spec-list))
+;;; _ _ _ _ _ _ _
+;;; ___| | _(_)_ __ (_)_ ____ _(_)___(_) |__ | | ___
+;;; / __| |/ / | '_ \ _____| | '_ \ \ / / / __| | '_ \| |/ _ \
+;;; \__ \ <| | |_) |_____| | | | \ V /| \__ \ | |_) | | __/
+;;; |___/_|\_\_| .__/ |_|_| |_|\_/ |_|___/_|_.__/|_|\___|
+;;; |_|
+;;
+;; In buffers generated by `find-eintro' this sexp
+;; (buffer-substring (ee-bol) (ee-eol))
+;; sometimes returns something like this,
+;; "1. Introduction\n==============="
+;; with text properties indicating that the last part is invisible.
+;; The variants of `ee-bol' and `ee-eol' below fix this (but in a
+;; fragile way).
+;;
+;; «skip-invisible» (to ".skip-invisible")
+
+(defun ee-bol-skip-invisible ()
+ (save-excursion (move-beginning-of-line) (point)))
+
+(defun ee-eol-skip-invisible ()
+ (save-excursion (move-beginning-of-line) (move-end-of-line) (point)))
+
+
;;; _ _ _ _
@@ -15950,14 +15975,14 @@ files, but `kl', `kll', and `kls' support all these
kinds of
2. Try it!
==========
-Type `M-x kl'. This will \"kill a link to kere\"; it will detect
+Type `M-x kl'. This will \"kill a link to here\"; it will detect
that we are in an \"intro\", and you will see this message in the
echo area:
Copied to the kill ring: (find-kl-here-intro)
Now go to the line with the title of this section, and type `M-x
-kll'. This will \"kill a link to kere\", where \"here\" is this
+kll'. This will \"kill a link to here\", where \"here\" is this
intro, and refine it to make it point to the current line. You
will see one of these two messages in the echo area:
diff --git a/eev-kla.el b/eev-kla.el
index 62bdb2ca87..bcb856f2ff 100644
--- a/eev-kla.el
+++ b/eev-kla.el
@@ -19,7 +19,7 @@
;;
;; Author: Eduardo Ochs <eduardoochs@gmail.com>
;; Maintainer: Eduardo Ochs <eduardoochs@gmail.com>
-;; Version: 20231228
+;; Version: 20240103
;; Keywords: e-scripts
;;
;; Latest version: <http://anggtwu.net/eev-current/eev-kla.el>
@@ -210,10 +210,11 @@ This function also runs `ee-kl-transform' on the result,
but
;; Used in: (find-eev "eev-kl-here.el" "kl")
;; Test: (ee-kl-line)
+;;
(defun ee-kl-line ()
(interactive "P")
- (let* ((start (ee-bol))
- (end (ee-eol))
+ (let* ((start (ee-bol-skip-invisible))
+ (end (ee-eol-skip-invisible))
(str0 (buffer-substring start end))
(str (ee-no-properties str0)))
(eeflash+ start end eeflash-copy)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/eev 7bafae3220: Fixed `ee-kl-line' and `ee-copy-this-line-to-kill-ring'.,
ELPA Syncer <=