[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/annotate 3b4ee73c8d 275/372: - stored abbreviated filename
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/annotate 3b4ee73c8d 275/372: - stored abbreviated filenames for the path component of each record |
Date: |
Fri, 4 Feb 2022 16:59:07 -0500 (EST) |
branch: elpa/annotate
commit 3b4ee73c8d168c8f7bc5e65ea67a323ea0cb12f1
Author: cage <cage-invalid@invalid>
Commit: cage <cage-invalid@invalid>
- stored abbreviated filenames for the path component of each record
of the annotations database;
- improved a docstring.
---
annotate.el | 49 ++++++++++++++++++++++++++++++++-----------------
1 file changed, 32 insertions(+), 17 deletions(-)
diff --git a/annotate.el b/annotate.el
index 8ff5875515..1ecb5c9e23 100644
--- a/annotate.el
+++ b/annotate.el
@@ -1376,7 +1376,7 @@ essentially what you get from:
(message "Annotations loaded."))))
(defun annotate-load-annotations ()
- "Load all annotations from disk.
+ "Load all annotations from disk and redraw the buffer to render the
annotations.
The format of the database is:
@@ -1476,20 +1476,27 @@ annotation."
(defun annotate-load-annotation-data (&optional ignore-errors)
"Read and returns saved annotations."
- (cl-flet ((%load-annotation-data ()
- (let ((annotations-file annotate-file))
- (with-temp-buffer
- (let* ((annotate-file annotations-file)
- (attributes (file-attributes annotate-file)))
- (cond
- ((not (file-exists-p annotate-file))
- (signal 'annotate-db-file-not-found (list
annotate-file)))
- ((= (file-attribute-size attributes)
- 0)
- nil)
- (t
- (insert-file-contents annotate-file)
- (read (current-buffer)))))))))
+ (cl-labels ((%load-annotation-data ()
+ (let ((annotations-file annotate-file)
+ (%expand-filename (lambda (record)
+ (let ((short-filename
(annotate-filename-from-dump record))
+ (annotations
(annotate-annotations-from-dump record))
+ (file-checksum
(annotate-checksum-from-dump record)))
+ (annotate-make-record
(expand-file-name short-filename)
+ annotations
+
file-checksum)))))
+ (with-temp-buffer
+ (let* ((annotate-file annotations-file)
+ (attributes (file-attributes annotate-file)))
+ (cond
+ ((not (file-exists-p annotate-file))
+ (signal 'annotate-db-file-not-found (list
annotate-file)))
+ ((= (file-attribute-size attributes)
+ 0)
+ nil)
+ (t
+ (insert-file-contents annotate-file)
+ (mapcar %expand-filename (read
(current-buffer))))))))))
(if ignore-errors
(ignore-errors (%load-annotation-data))
(%load-annotation-data))))
@@ -1497,8 +1504,16 @@ annotation."
(defun annotate-dump-annotation-data (data)
"Save `data` into annotation file."
(with-temp-file annotate-file
- (let ((print-length nil))
- (prin1 data (current-buffer)))))
+ (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)))))
(cl-defmacro with-matching-annotation-fns ((filename
beginning
- [nongnu] elpa/annotate e933d84692 214/372: - fixed removing of annotation in 'annotate-before-change-fn', (continued)
- [nongnu] elpa/annotate e933d84692 214/372: - fixed removing of annotation in 'annotate-before-change-fn', ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate e03edfb2c2 218/372: - increased version number;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate e2c365a376 222/372: - added reference to the issue., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 44b378b16a 219/372: Merge pull request #62 from cage2/master, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate f0a71bb148 223/372: Merge pull request #64 from cage2/fix-face-detection, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 8ac52808e8 226/372: - added a couple of functions to allow an user to change the file that, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 9ea6c4fc71 247/372: - signalled errors when query parsing errors occurs., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate cc0b5da6c1 229/372: Merge pull request #69 from cage2/switch-database, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 914c9ee5b9 264/372: Fixed a regression and some bugs related to incorrect calculation of, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 0b71184865 269/372: - updated changelog., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 3b4ee73c8d 275/372: - stored abbreviated filenames for the path component of each record,
ELPA Syncer <=
- [nongnu] elpa/annotate c4a56cc33d 306/372: - added missing argument to 'annotate-create-annotation'., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 9fc6d7a839 311/372: - allowed deleting of annotations for info files., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 54ac759fac 315/372: Merge pull request #99 from cage2/remove-some-compilation-warnings, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 4ae1d4f2a6 346/372: Merge pull request #112 from cage2/clean-style, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 8471cdaa7c 328/372: - updated Changelog., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 0e5ccfdb4e 326/372: - replaced 'if' with 'when' when no 'else' branch exists., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 7871adfbd8 320/372: - skipped file left with no annotations when saving., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 42587e0623 327/372: - added checks for 'annotate-use-messages' value when trying to print a message., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate d52ee5dec0 359/372: Merge pull request #113 from cage2/master, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate de990d8adf 348/372: - added command to delete an annotation under point;, ELPA Syncer, 2022/02/04