[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/annotate b9c908f24c 365/372: Merge pull request #115 from
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/annotate b9c908f24c 365/372: Merge pull request #115 from cage2/fix-delete-ghost-db |
Date: |
Fri, 4 Feb 2022 16:59:23 -0500 (EST) |
branch: elpa/annotate
commit b9c908f24c2119d99cd93c86a0920223ef0568e9
Merge: c737b516b8 1e7bc9c886
Author: cage2 <1257703+cage2@users.noreply.github.com>
Commit: GitHub <noreply@github.com>
Merge pull request #115 from cage2/fix-delete-ghost-db
Fix delete ghost db
---
Changelog | 11 +++++++++++
NEWS.org | 14 ++++++++++++++
annotate.el | 36 +++++++++++++++++++-----------------
3 files changed, 44 insertions(+), 17 deletions(-)
diff --git a/Changelog b/Changelog
index 1dfbfb0f7f..0f3c61a00d 100644
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,14 @@
+2021-09-30 cage
+
+ * NEWS.org,
+ * annotate.el:
+
+ - increased version number.
+ - marked as modified the buffer when an annotation is deleted.
+ - prevented asking to delete a database that does not actually exists
+ on the file system;
+ - updated NEWS.org;
+
2021-09-19 cage
* annotate.el:
diff --git a/NEWS.org b/NEWS.org
index f4300ed4a4..243876fab9 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -261,3 +261,17 @@
This version added a new command to delete the annotation under
cursor.
+
+- 2021-09-30 v1.4.3 cage ::
+
+ This is a bugfix release.
+
+ The program would keep asking to confirmation for deleting a
+ database file even if such file does not actually exists on the
+ file system.
+
+ When the only action on a buffer was deleting an annotation, the
+ buffer was not marked as modified; as a consequence, the deletion
+ would not happens on the database (the database entry for the
+ annotation to be deleted would not be removed from the file) and,
+ when visiting the file, the annotation would be shown again.
diff --git a/annotate.el b/annotate.el
index cac2992623..4494530686 100644
--- a/annotate.el
+++ b/annotate.el
@@ -7,7 +7,7 @@
;; Maintainer: Bastian Bechtold
;; URL: https://github.com/bastibe/annotate.el
;; Created: 2015-06-10
-;; Version: 1.4.2
+;; Version: 1.4.3
;; This file is NOT part of GNU Emacs.
@@ -58,7 +58,7 @@
;;;###autoload
(defgroup annotate nil
"Annotate files without changing them."
- :version "1.4.2"
+ :version "1.4.3"
:group 'text)
;;;###autoload
@@ -1584,19 +1584,21 @@ annotation."
(defun annotate-dump-annotation-data (data &optional save-empty-db)
"Save `data' into annotation file."
- (if (or save-empty-db
- data)
- (with-temp-file annotate-file
- (let* ((print-length nil)
- (%abbreviate-filename (lambda (record)
- (let ((full-filename
(annotate-filename-from-dump record))
- (annotations
(annotate-annotations-from-dump record))
- (file-checksum
(annotate-checksum-from-dump record)))
- (annotate-make-record
(abbreviate-file-name full-filename)
- annotations
-
file-checksum))))
- (actual-data (mapcar %abbreviate-filename data)))
- (prin1 actual-data (current-buffer))))
+ (cond
+ ((or save-empty-db
+ data)
+ (with-temp-file annotate-file
+ (let* ((print-length nil)
+ (%abbreviate-filename (lambda (record)
+ (let ((full-filename
(annotate-filename-from-dump record))
+ (annotations
(annotate-annotations-from-dump record))
+ (file-checksum
(annotate-checksum-from-dump record)))
+ (annotate-make-record
(abbreviate-file-name full-filename)
+ annotations
+ file-checksum))))
+ (actual-data (mapcar %abbreviate-filename data)))
+ (prin1 actual-data (current-buffer)))))
+ ((file-exists-p annotate-file)
(let* ((confirm-message "Delete annotations database file %S? [y/N] ")
(delete-confirmed-p (or (not annotate-database-confirm-deletion)
(string= (read-from-minibuffer (format
confirm-message
@@ -1607,7 +1609,7 @@ annotation."
(delete-file annotate-file t)
(error (message "error removing annotation database: %S"
(error-message-string err))))
- (annotate-dump-annotation-data data t)))))
+ (annotate-dump-annotation-data data t))))))
(cl-defmacro with-matching-annotation-fns ((filename
beginning
@@ -2108,7 +2110,7 @@ point)."
(when-let ((annotation (annotate-annotation-at point)))
(let* ((delete-confirmed-p (annotate--confirm-annotation-delete)))
(when delete-confirmed-p
- (annotate--delete-annotation-chain-prevent-modification annotation)))))
+ (annotate--delete-annotation-chain annotation)))))
(defun annotate-change-annotation (pos)
"Change annotation at point. If empty, delete annotation."
- [nongnu] elpa/annotate 99d99e5bcb 234/372: Merge pull request #72 from cage2/master, (continued)
- [nongnu] elpa/annotate 99d99e5bcb 234/372: Merge pull request #72 from cage2/master, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 4b2fa8f61e 252/372: - removed function 'annotate-load-annotation-data-ignore-errors'., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate c972641056 258/372: - Using "help-echo" to print annotations instead of render it on the buffer., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 9320918b91 270/372: Merge pull request #84 from cage2/fix-regression-multiline-annotations, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 3e70e187b3 262/372: - updated NEWS and Changelog., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 4af196ce04 312/372: - updated Changelog and NEWS.org., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 3a4dc507c2 305/372: - removed unused functions., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 3458b548f4 303/372: - removed warning related to misplaced '(interactive)', ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate ed5f00d51c 351/372: - increased version number., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate ffd6bbcc11 340/372: - allowed paths with spaces in a search query., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate b9c908f24c 365/372: Merge pull request #115 from cage2/fix-delete-ghost-db,
ELPA Syncer <=