[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/annotate 16e0346481 128/372: - prevent showing of summary
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/annotate 16e0346481 128/372: - prevent showing of summary window if metadata contains no annotations at all. |
Date: |
Fri, 4 Feb 2022 16:58:33 -0500 (EST) |
branch: elpa/annotate
commit 16e0346481c8533daf8eb7ebbf7b42b2393c139e
Author: cage <cage-invalid@invalid>
Commit: cage <cage-invalid@invalid>
- prevent showing of summary window if metadata contains no annotations at
all.
---
annotate.el | 62 ++++++++++++++++++++++++++++++++++---------------------------
1 file changed, 35 insertions(+), 27 deletions(-)
diff --git a/annotate.el b/annotate.el
index 55824a352e..2667edf4dd 100644
--- a/annotate.el
+++ b/annotate.el
@@ -1222,33 +1222,41 @@ The searched interval can be customized setting the
variable:
(save-match-data
(replace-regexp-in-string "[\r\n]"
" "
- (buffer-string))))))
-
- (with-current-buffer-window
- "*annotations*" nil nil
- (display-buffer "*annotations*")
- (select-window (get-buffer-window "*annotations*" t))
- (outline-mode)
- (use-local-map nil)
- (local-set-key "q" (lambda ()
- (interactive)
- (kill-buffer "*annotations*")))
- (let ((dump (annotate-load-annotation-data)))
- (dolist (annotation dump)
- (let ((all-annotations (annotate-annotations-from-dump annotation))
- (filename (annotate-filename-from-dump annotation)))
- (when (not (null all-annotations))
- (insert (format (concat annotate-summary-list-prefix-file
"%s\n\n")
- filename))
- (dolist (annotation-field all-annotations)
- (let* ((button-text (format "%s"
- (annotate-annotation-string
annotation-field)))
- (annotation-begin (annotate-beginning-of-annotation
annotation-field))
- (annotation-end (annotate-ending-of-annotation
annotation-field))
- (snippet-text (build-snippet filename
- annotation-begin
- annotation-end)))
- (insert-item-summary snippet-text button-text))))))))))
+ (buffer-string)))))
+ (db-empty-p (dump)
+ (cl-every (lambda (a)
+ (cl-every 'null
+
(annotate-annotations-from-dump a)))
+ dump)))
+ (let ((dump (annotate-load-annotation-data)))
+ (if (db-empty-p dump)
+ (when annotate-use-messages
+ (message "The annotation database is empty"))
+ (with-current-buffer-window
+ "*annotations*" nil nil
+ (display-buffer "*annotations*")
+ (select-window (get-buffer-window "*annotations*" t))
+ (outline-mode)
+ (use-local-map nil)
+ (local-set-key "q" (lambda ()
+ (interactive)
+ (kill-buffer "*annotations*")))
+
+ (dolist (annotation dump)
+ (let ((all-annotations (annotate-annotations-from-dump annotation))
+ (filename (annotate-filename-from-dump annotation)))
+ (when (not (null all-annotations))
+ (insert (format (concat annotate-summary-list-prefix-file
"%s\n\n")
+ filename))
+ (dolist (annotation-field all-annotations)
+ (let* ((button-text (format "%s"
+ (annotate-annotation-string
annotation-field)))
+ (annotation-begin (annotate-beginning-of-annotation
annotation-field))
+ (annotation-end (annotate-ending-of-annotation
annotation-field))
+ (snippet-text (build-snippet filename
+ annotation-begin
+ annotation-end)))
+ (insert-item-summary snippet-text button-text)))))))))))
(provide 'annotate)
;;; annotate.el ends here
- [nongnu] elpa/annotate 80e6b31c78 084/372: - fixed docstring., (continued)
- [nongnu] elpa/annotate 80e6b31c78 084/372: - fixed docstring., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 519aab08ba 100/372: - added a better handling of characters with width > 1., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate d07e406251 097/372: - changed prefix for annotation in summary window., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate cf76d79c00 074/372: - fixed docstring., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 3341c23e5f 038/372: don't annotate or save empty regions, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 242104e55a 108/372: - changed functions name, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 55e318b172 124/372: - fixed reference to a non-existent variable in the procedure that, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 08f520f09a 119/372: - try to elaborate more a function goal., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 354653496d 115/372: - added a bit of (very simple) heuristic to place annotation in the, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a1be01d886 134/372: - try to guess the actual file name of an info document when showing, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 16e0346481 128/372: - prevent showing of summary window if metadata contains no annotations at all.,
ELPA Syncer <=
- [nongnu] elpa/annotate 6ceeb44774 133/372: - removed check for buffer file name in funcion called just before a, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate db9e064342 132/372: - added features: annotate info documents., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 4bcecdc875 156/372: - replaced 'splitted-annotation' with 'multiline-annotation'., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 4fde80fe79 168/372: - updated software version number in the comment on top of the source code;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 696f4ee0cd 167/372: Merge pull request #55 from cage2/update-doc, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a59cc2c6b2 172/372: - when 'delete' button from a summary window is activated redraw and, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 412053cefc 173/372: - [bugfix] When a window is resized ensure that the sizes are, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 41e85c8435 176/372: - increased version number;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate cc4292cce4 181/372: - moved the test for 'limit' up in the lambda of the filtering, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate f4cc83ec84 189/372: Merge branch 'master' into org-mode-fix, ELPA Syncer, 2022/02/04