alphapapa / pocket-reader.el

Emacs client for Pocket reading list (getpocket.com)
GNU General Public License v3.0
223 stars 12 forks source link

Establish hook that runs after org-mode #3

Closed justmytwospence closed 7 years ago

justmytwospence commented 7 years ago

Currently it seems that the finalize hook runs before org-mode is set up. I've got some org mode config that I don't want to use for reading pocket articles (linum-mode, etc.). Can a hook be established after org-mode so that things can be customized for reading pocket articles?

alphapapa commented 7 years ago

Hi,

pocket-reader itself doesn't use org-mode. The default link-opening function currently uses org-web-tools, so you're welcome to post this request on that package and I'll be glad to add the hook. You can also use different functions to open the links, like for eww or w3m, etc.

alphapapa commented 7 years ago

BTW, you could actually do this already by setting pocket-reader-open-url-default-function to something like:

(defun spence/pocket-reader-open-url (url)
  (interactive)
  (let ((org-mode-hook (append '(your-fn) org-mode-hook)))
    (funcall pocket-reader-open-url-default-function url)))
justmytwospence commented 7 years ago

I see. Sorry for not understanding what was going on entirely. That looks like it will do nicely. And thanks for this package - its beautiful.

alphapapa commented 7 years ago

Not at all, it is a bit confusing, and I'm not sure I should even use org-web-tools as the default reading function, anyway. I like using it myself, and I put it in as the default while I was testing it, but maybe I should remove it as the default.

I could just use the default Emacs browsing functions, and suggest alternatives like w3m, eww, and org-web-tools.

What do you think?

And thanks for this package - its beautiful.

Thanks, I'm glad you're enjoying it! Please let me know if you have any other feedback.