[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/lentic 236e942322 079/333: Move point to change locatio
From: |
ELPA Syncer |
Subject: |
[elpa] externals/lentic 236e942322 079/333: Move point to change location. |
Date: |
Tue, 27 Feb 2024 13:00:08 -0500 (EST) |
branch: externals/lentic
commit 236e9423221306c17d5ef46e0dae192ac68ca530
Author: Phillip Lord <phillip.lord@newcastle.ac.uk>
Commit: Phillip Lord <phillip.lord@newcastle.ac.uk>
Move point to change location.
Previously, we were dependent on the current location of point
which is not guaranteed to be the same as the change for bulk changes
to the buffer such as rectangle operations.
---
linked-buffer.el | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/linked-buffer.el b/linked-buffer.el
index ecafc57bab..9cd5809b2e 100644
--- a/linked-buffer.el
+++ b/linked-buffer.el
@@ -291,7 +291,7 @@ the linked-buffer."
Currently, this is just a clone all method but may use regions in future."
(let ((this-b (oref conf :this-buffer))
- (that-b (oref conf :that-buffer)))
+ (that-b (oref conf :that-buffer)))
(linked-buffer-log
"(start, stop, length-before):(%s,%s,%s)" start stop length-before)
@@ -301,18 +301,22 @@ Currently, this is just a clone all method but may use
regions in future."
(length-before (or length-before (buffer-size that-b))))
(with-current-buffer that-b
(delete-region (max (point-min) (linked-buffer-convert conf start))
- (min (point-max)
+ (min (point-max)
(+ length-before
(linked-buffer-convert conf start))))
- (insert
- (save-restriction
- (with-current-buffer this-b
- (widen)
- ;; want to see where it goes
- (propertize
- (buffer-substring-no-properties
- start stop)
- 'face 'error)))))))))
+ (save-excursion
+ ;; used this three times now!
+ (goto-char (linked-buffer-convert conf start))
+ (insert
+ (save-restriction
+ (with-current-buffer this-b
+ (widen)
+ ;; want to see where it goes
+ ;; hence the property
+ (propertize
+ (buffer-substring-no-properties
+ start stop)
+ 'face 'error))))))))))
(defun linked-buffer-default-init ()
"Default init function.
- [elpa] externals/lentic b6b9293635 061/333: Added file local functions., (continued)
- [elpa] externals/lentic b6b9293635 061/333: Added file local functions., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic bbc60fc6d4 056/333: Support el-to-org., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic a2d2e6dfcd 065/333: Literate documentation for linked-buffer-org., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic cd2ee3b53c 068/333: Point syncing is now an option., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic fead80b26a 078/333: First nearly working version., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 9913c47912 081/333: Convert start point before changes., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 0740c92916 084/333: Pabbrev support dropped., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 783951ac3e 072/333: Use case insensitive regexp., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic d9ce04d541 087/333: Dependency updates., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 48644ea72c 083/333: Tests uncommented, and expected failures added., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 236e942322 079/333: Move point to change location.,
ELPA Syncer <=
- [elpa] externals/lentic 55c389ec2a 096/333: Cosmetic Change, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic e2fc6ce904 097/333: Re-enabled orgel-org tests., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 1dad92f20a 095/333: Switch to exact-subtract., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic e0840dbfe6 082/333: Stop location now calculated from before functions., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 6ed73a2ef5 088/333: Add string transform function., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 6c5fabb400 091/333: dev options added., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 03ed3f4da2 119/333: Force loading of m-buffer on opening., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 582d4d72b3 125/333: Search and Replace to lentic., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic a00f92e432 133/333: Refactor out a variable., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic a88717f0c4 102/333: Louder output for comments., ELPA Syncer, 2024/02/27