[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/wfnames 75bae40bf4 17/98: Add comments
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/wfnames 75bae40bf4 17/98: Add comments |
Date: |
Tue, 8 Aug 2023 04:01:13 -0400 (EDT) |
branch: elpa/wfnames
commit 75bae40bf424de2385dcd8a0cafd0d3e1845cf7b
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Add comments
---
helm-edit-marked.el | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/helm-edit-marked.el b/helm-edit-marked.el
index 15c30fe084..f913cdc91c 100644
--- a/helm-edit-marked.el
+++ b/helm-edit-marked.el
@@ -82,7 +82,12 @@ Special commands:
(old (get-text-property (point) 'old-name))
(new (buffer-substring-no-properties beg end)))
(unless (string= old new) ; not modified.
- (cond ((and (file-exists-p new)
+ (cond (;; New file exists and is one of the
+ ;; next files to rename, make a temp
+ ;; file of OLD and assign this temp
+ ;; file to OLD, then delay renaming
+ ;; to next turn.
+ (and (file-exists-p new)
(member new
helm-ff--edit-marked-old-files)
(not (assoc new delayed)))
@@ -91,16 +96,23 @@ Special commands:
(rename-file old tmpfile)
(add-text-properties
beg end `(old-name ,tmpfile))))
+ ;; New file exists but is not part of
+ ;; the next files to rename, make a
+ ;; temp file of NEW and delay renaming
+ ;; to next turn.
((and (file-exists-p new)
(not (assoc new delayed)))
(let ((tmpfile (make-temp-name new)))
(push (cons new tmpfile) delayed)
(rename-file new tmpfile)))
+ ;; Now really rename files.
(t
(rename-file old new)
(add-text-properties beg end `(old-name ,new))
(let* ((assoc (assoc new delayed))
(tmp (cdr assoc)))
+ ;; The temp file was created in
+ ;; clause 2, delete it.
(when (and tmp (file-exists-p tmp))
(delete-file tmp))
(setq delayed
- [nongnu] elpa/wfnames db1f17a5dd 92/98: Require emacs-24.4 for delete-duplicate-lines, (continued)
- [nongnu] elpa/wfnames db1f17a5dd 92/98: Require emacs-24.4 for delete-duplicate-lines, ELPA Syncer, 2023/08/08
- [nongnu] elpa/wfnames 3a12c46be1 64/98: Comments only, ELPA Syncer, 2023/08/08
- [nongnu] elpa/wfnames c761a398ab 65/98: Add a minimal capf, ELPA Syncer, 2023/08/08
- [nongnu] elpa/wfnames 0064a2b8e4 82/98: Fix errors according to package-lint, ELPA Syncer, 2023/08/08
- [nongnu] elpa/wfnames c7e895f406 86/98: Allow reverting changes line by line, ELPA Syncer, 2023/08/08
- [nongnu] elpa/wfnames 4447417c58 88/98: Bump to 1.1, ELPA Syncer, 2023/08/08
- [nongnu] elpa/wfnames 810a606075 04/98: Use a different face when file would be overwrited, ELPA Syncer, 2023/08/08
- [nongnu] elpa/wfnames 0cf41398c2 05/98: Fix after-change-function, ELPA Syncer, 2023/08/08
- [nongnu] elpa/wfnames 120c08652a 15/98: Revert "Remove unused variable", ELPA Syncer, 2023/08/08
- [nongnu] elpa/wfnames 1219dca135 14/98: Bind beg and end to avoid repeating, ELPA Syncer, 2023/08/08
- [nongnu] elpa/wfnames 75bae40bf4 17/98: Add comments,
ELPA Syncer <=
- [nongnu] elpa/wfnames ca6e126e15 49/98: Change commit buffer default binding, ELPA Syncer, 2023/08/08
- [nongnu] elpa/wfnames 6d661e78a2 68/98: Erase buffer, ELPA Syncer, 2023/08/08
- [nongnu] elpa/wfnames 14e9d0204d 66/98: New user var to decide what to to with buffer when done, ELPA Syncer, 2023/08/08
- [nongnu] elpa/wfnames 4ccea88ae1 93/98: Prefer defcustom over defvar, ELPA Syncer, 2023/08/08
- [nongnu] elpa/wfnames 1f7513b8d1 95/98: Only stylistic changes, ELPA Syncer, 2023/08/08
- [nongnu] elpa/wfnames 25baac1a2e 22/98: Skip rename when saying no in interactive rename, ELPA Syncer, 2023/08/08
- [nongnu] elpa/wfnames d7ff78a1ec 31/98: Add COPYING, ELPA Syncer, 2023/08/08
- [nongnu] elpa/wfnames 5a8d14a584 46/98: Comments only, ELPA Syncer, 2023/08/08
- [nongnu] elpa/wfnames fe5a4fbbe2 45/98: Fix again logic when target is one of olds, ELPA Syncer, 2023/08/08
- [nongnu] elpa/wfnames b050bdabba 57/98: Fix wfnames-revert-changes, ELPA Syncer, 2023/08/08