1. Fabrice Gabolde
  2. anote.el

Commits

Fabrice Gabolde  committed 2789788

Interactive `get-this-annotation' function.

Echoes the annotation at point in the minibuffer.

  • Participants
  • Parent commits c914c19
  • Branches default

Comments (0)

Files changed (1)

File anote.el

View file
         (message "There is no annotation here."))
       nil)))
 
+(defun anote/get-this-annotation (&optional silent)
+  "Display the annotation under point in the minibuffer."
+  (interactive)
+  (let ((index (get-text-property (point) 'annotation)))
+    (if index
+        (let ((annotation (anote/get-annotation (current-buffer) index)))
+          (if annotation
+              (message annotation)
+            (unless silent
+              (message "This area is annotated, but the annotation is not on file."))))
+      (unless silent
+        (message "There is no annotation here.")))))
+
 (defun anote/propertize-bounds (index bound-left bound-right)
   "Set the correct annotation properties on a region in the
 current buffer."