do not annotate HLines with :PROPERTIES:

This commit is contained in:
JAremko 2017-04-19 05:30:25 +03:00 committed by syl20bnr
parent 70538672d1
commit fed4a44189
1 changed files with 13 additions and 12 deletions

View File

@ -121,18 +121,19 @@ compatible."
(let ((heading-regexp "^[\\*]+\s\\(.*\\).*$"))
(goto-char (point-min))
(while (re-search-forward heading-regexp nil t)
(let ((heading (match-string 1)))
(insert (format (concat "\n:PROPERTIES:\n"
":CUSTOM_ID: %s\n"
":END:\n")
(substring (toc-org-hrefify-gh
(replace-regexp-in-string
toc-org-tags-regexp
""
heading))
;; Remove # prefix added by
;; `toc-org-hrefify-gh'.
1)))))))
(unless (looking-at-p ".*\n\s*:PROPERTIES:")
(let ((heading (match-string 1)))
(insert (format (concat "\n:PROPERTIES:\n"
":CUSTOM_ID: %s\n"
":END:\n")
(substring (toc-org-hrefify-gh
(replace-regexp-in-string
toc-org-tags-regexp
""
heading))
;; Remove # prefix added by
;; `toc-org-hrefify-gh'.
1))))))))
(defun spacemacs//reroot-links ()
"Find the links that start with https://github.com/syl20bnr/spacemacs/blob/