[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/annotate a02755056e 244/372: - changed occurrence of 'anno
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/annotate a02755056e 244/372: - changed occurrence of 'annotate-load-annotation-data' to 'annotate-load-annotation-data-ignore-errors'. |
Date: |
Fri, 4 Feb 2022 16:59:04 -0500 (EST) |
branch: elpa/annotate
commit a02755056ef37ad9e3c75b915919fe96f2528ac3
Author: cage <cage-invalid@invalid>
Commit: cage <cage-invalid@invalid>
- changed occurrence of 'annotate-load-annotation-data' to
'annotate-load-annotation-data-ignore-errors'.
The existing code relies on the fact that a non existing database file
can be considered as an empty database, wrote a wrapper of
'annotate-load-annotation-data' to keep the old behaviour.
---
annotate.el | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/annotate.el b/annotate.el
index b24c89dff1..7ffbdee270 100644
--- a/annotate.el
+++ b/annotate.el
@@ -1095,7 +1095,7 @@ essentially what you get from:
(= (annotate-beginning-of-annotation
a)
(annotate-ending-of-annotation
a)))
(annotate-describe-annotations)))
- (all-annotations (annotate-load-annotation-data))
+ (all-annotations (annotate-load-annotation-data-ignore-errors))
(filename (annotate-guess-filename-for-dump
(annotate-actual-file-name))))
(if (assoc-string filename all-annotations)
(setcdr (assoc-string filename all-annotations)
@@ -1120,7 +1120,7 @@ essentially what you get from:
"Load all annotations from disk in old format."
(interactive)
(let ((annotations (cdr (assoc-string (annotate-actual-file-name)
- (annotate-load-annotation-data))))
+
(annotate-load-annotation-data-ignore-errors))))
(modified-p (buffer-modified-p)))
;; remove empty annotations created by earlier bug:
(setq annotations (cl-remove-if (lambda (ann) (null (nth 2 ann)))
@@ -1181,7 +1181,7 @@ example:
(not (stringp (cl-first (last annotation))))))
(interactive)
(let* ((filename (annotate-actual-file-name))
- (all-annotations-data (annotate-load-annotation-data))
+ (all-annotations-data (annotate-load-annotation-data-ignore-errors))
(annotation-dump (assoc-string filename all-annotations-data))
(annotations (annotate-annotations-from-dump
annotation-dump))
(old-checksum (annotate-checksum-from-dump annotation-dump))
@@ -1235,9 +1235,15 @@ i.e. the first record is removed."
"Update database *on disk* removing all the records with empty
annotation."
(interactive)
- (let ((db (annotate-db-clean-records (annotate-load-annotation-data))))
+ (let ((db (annotate-db-clean-records
(annotate-load-annotation-data-ignore-errors))))
(annotate-dump-annotation-data db)))
+(defun annotate-load-annotation-data-ignore-errors ()
+ (condition-case error-message
+ (annotate-load-annotation-data)
+ (annotate-db-file-not-found
+ nil)))
+
(defun annotate-load-annotation-data ()
"Read and return saved annotations."
(with-temp-buffer
@@ -1854,7 +1860,7 @@ sophisticated way than plain text"
(ending (button-get button 'ending))
(begin-of-button (button-get button 'begin-of-button))
(end-of-button (button-get button 'end-of-button))
- (db (annotate-load-annotation-data))
+ (db (annotate-load-annotation-data-ignore-errors))
(filtered (annotate-db-remove-annotation db filename beginning
ending)))
(annotate-dump-annotation-data filtered) ; save the new database with
entry removed
(cl-labels ((redraw-summary-window () ; update the summary window
@@ -1883,7 +1889,7 @@ sophisticated way than plain text"
(annotation-beginning (button-get button 'beginning))
(annotation-ending (button-get button 'ending))
(query (button-get button 'query))
- (db (annotate-load-annotation-data))
+ (db (annotate-load-annotation-data-ignore-errors))
(old-annotation (button-get button 'text))
(new-annotation-text (read-from-minibuffer
annotate-annotation-prompt old-annotation)))
(when (not (annotate-string-empty-p new-annotation-text))
@@ -2010,7 +2016,7 @@ results can be filtered with a simple query language: see
(t
".*"))))
(let* ((filter-query (get-query))
- (dump (annotate-summary-filter-db
(annotate-load-annotation-data)
+ (dump (annotate-summary-filter-db
(annotate-load-annotation-data-ignore-errors)
filter-query)))
(if (db-empty-p dump)
(when annotate-use-messages
- [nongnu] elpa/annotate 2cf1a0b6d2 199/372: Merge branch 'master' into rethink-multiline-annotations, (continued)
- [nongnu] elpa/annotate 2cf1a0b6d2 199/372: Merge branch 'master' into rethink-multiline-annotations, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 818f66f4a3 203/372: Merge pull request #58 from cage2/master, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate de116813be 211/372: Merge branch 'master' into rethink-multiline-annotations, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 30f639c524 212/372: - fixed return value of 'maybe-force-newline-policy'., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate ece50f65fe 220/372: - fixed managing return value of "(get-text-property changed-face-pos 'face)", ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate b25fb1ccab 224/372: - Increased version to 0.7.0., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a6097f6326 237/372: - updated NEWS, Changelog and version., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate abe23338cb 235/372: - ensured that the modified status of as buffer is not modified by the local, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 8481eaf0c2 245/372: - signalled an error when annotating a region and it overlaps with an existing annotation., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate dadc57bb3e 231/372: - reverted the version number to 0.8.0;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a02755056e 244/372: - changed occurrence of 'annotate-load-annotation-data' to 'annotate-load-annotation-data-ignore-errors'.,
ELPA Syncer <=
- [nongnu] elpa/annotate 4e23850efa 233/372: - Added file argument 'database-file-path' to 'annotate-switch-db';, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 2687e123cd 243/372: - added signalling 'annotate-load-annotation-data' to:, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 13c4fcbc4f 250/372: - made 'annotate-load-annotation-data-ignore-errors' ignore all errors;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 4cc32fc2fb 256/372: Merge pull request #78 from cage2/master, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 6543d3b1c0 259/372: - fixed indentation., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 8ec9e0ea37 253/372: - increased version., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate c42686bab5 271/372: - allow overwriting (even partial) of annotations., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 9b824d23ec 267/372: - updated Changelog and NEWS.org., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate e015655f62 255/372: - fixed version number contained in code top comment., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 2bf7a7c1ac 254/372: Merge pull request #77 from cage2/signalling-errors, ELPA Syncer, 2022/02/04