Anonymous committed 1565284

Hacked around top-level link creation.

It works a little better, thanks to ugly hacks.

  • Participants
  • Parent commits 492725c

Comments (0)

Files changed (2)


File contents unchanged.

File org-annotate-file.el

   (abbreviate-file-name (or (buffer-file-name) buffer)))
 (defun get-link (filename)
-  (org-make-link-string (concat "file:" filename)))
+  ; TODO make this handle non-file links
+  ; like docview: or html: links.
+  (org-store-link (point-at-bol)))
 (defun org-annotate-file-add-upper-level (link)
+  (defun ugly-hack ()
+	"Something causes ']' to fall off the end of the link.  This
+ugly hack is required to work around the limitation."
+	(insert "]"))
   (insert "* ")
-  (insert link))
+  (insert link)
+  (ugly-hack))
 (defun org-annotate-file-add-second-level (link)
   "Safely positions cursor for a new entry."
   (goto-char (point-max))
   (unless (= (char-before) 10)
-	(newline)))
+  	(newline)))
 (defun put-cursor-in-annotation ()
   "After a link is inserted, position cursor with newlines to avoid