diff options
-rw-r--r-- | TODOs.org | 12 | ||||
-rw-r--r-- | hnreader.el | 7 |
2 files changed, 16 insertions, 3 deletions
@@ -17,3 +17,15 @@ top level comment child <td class='ind'><img src="s.gif" height="1" width="40"></td> +* TODO show number of child comments +https://emacs.stackexchange.com/questions/10245/counting-sub-headings-in-org-mode-using-elisp +or recursive on dom will be just fine +* TODO run eslip on org link + +#+begin_example org-mode +[[elisp:(find-function 'describe-function)]] +#+end_example + +[[elisp:(hnreader-comment 20724363)][read] + +* TODO comment page show main link and intro text diff --git a/hnreader.el b/hnreader.el index 57e8047..293744b 100644 --- a/hnreader.el +++ b/hnreader.el @@ -63,7 +63,9 @@ third one is 80.") ;; link (insert (dom-attr (dom-by-class thing "^storylink$") 'href) "\n" ) ;; comment link - (insert "https://news.ycombinator.com/item?id=" (dom-attr thing 'id))) + (insert (format "[[elisp:(hnreader-comment %s)][https://news.ycombinator.com/item?id=%s]]" + (dom-attr thing 'id) + (dom-attr thing 'id)))) (defun hnreader--print-frontpage (dom buf) "Print raw DOM on BUF." @@ -87,8 +89,7 @@ third one is 80.") (insert (format "%s %s\n" (hnreader--get-indent (hnreader--get-img-tag-width comment)) - (hnreader--get-comment-owner comment) - )) + (hnreader--get-comment-owner comment))) (shr-insert-document (hnreader--get-comment comment)))))) (defun hnreader--get-img-tag-width (comment-dom) |