Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement hnreader-mode #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions hnreader.el
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ third one is 80.")
(defvar hnreader--more-link nil
"Load more link.")

(define-derived-mode hnreader-mode org-mode "hnreader-mode"
"Minor mode associated to hnreader buffers.")

;;;###autoload
(defun hnreader-back ()
"Go back to previous location in history."
Expand Down Expand Up @@ -242,7 +245,7 @@ third one is 80.")
(insert "\n* "))
(insert (hnreader--get-morelink dom) " | ")
(insert (format "[[elisp:(hnreader-read-page-back \"%s\")][Reload]]" url) )
(org-mode)
(hnreader-mode)
(goto-char (point-min))
(forward-line 2))))

Expand Down Expand Up @@ -329,7 +332,7 @@ third one is 80.")
(insert "\n* " (format "[[elisp:(hnreader-comment \"%s\")][More]]" (concat "https://news.ycombinator.com/"
(dom-attr more-link 'href)))))
(insert "\n* " (format "[[elisp:(hnreader-comment \"%s\")][Reload]]" url))
(org-mode)
(hnreader-mode)
;; (org-shifttab 3)
(goto-char (point-min))
(forward-line 2))))
Expand Down