diff options
author | Thanh Vuong <thanhvg@gmail.com> | 2019-08-18 23:20:48 -0600 |
---|---|---|
committer | Thanh Vuong <thanhvg@gmail.com> | 2019-08-18 23:20:48 -0600 |
commit | 60164ef1edac2e9e07b2ac26be21e242e99acf66 (patch) | |
tree | 6ac31ac1054080ee9e79131bde14d899bfbc879d | |
parent | b1f5f7fbaf04126a580d556607ea273940eacb00 (diff) |
wip work
-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) |