chenyanming / shrface

Extend eww/nov with org-mode features, archive web pages to org files with shr.
GNU General Public License v3.0
211 stars 14 forks source link

org-cycle and org-shifttab stop working after updating #7

Open ram535 opened 4 years ago

ram535 commented 4 years ago

It was working before updating.

My config:

(use-package nov
  :init
  (add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))
  :general
  (:states 'normal
           :keymaps 'nov-mode-map
           "TAB" 'org-cycle
           "C-<tab>" 'org-shifttab))

(use-package shrface
  :after shr
  :straight (shrface :type git :host github :repo "chenyanming/shrface")
  :custom
  (shrface-paragraph-indentation 2)
  (shrface-paragraph-fill-column 80)
  :config
   (shrface-basic)
    (shrface-trial)
  (with-eval-after-load 'nov 
    (setq nov-shr-rendering-functions (append nov-shr-rendering-functions shr-external-rendering-functions))))
chenyanming commented 4 years ago

@ram535 Sorry for the confusion. Because start from 1.8, a minor mode was added: shrface-mode, you need to enable the shrface-mode for each package. Add one more line in your config:

(use-package shrface
      :after shr
      ;; :straight (shrface :type git :host github :repo "chenyanming/shrface")
      :custom
      (shrface-paragraph-indentation 2)
      (shrface-paragraph-fill-column 80)
      :config
      (shrface-basic)
      (shrface-trial)
      (with-eval-after-load 'nov
        (setq nov-shr-rendering-functions (append nov-shr-rendering-functions shr-external-rendering-functions))
        (add-hook 'nov-mode-hook 'shrface-mode)))
chenyanming commented 4 years ago

@ram535 Sorry for the confusion. Because start from 1.8, a minor mode was added: shrface-mode, you need to enable the shrface-mode for each package. Add one more line in your config:

(use-package shrface
      :after shr
      ;; :straight (shrface :type git :host github :repo "chenyanming/shrface")
      :custom
      (shrface-paragraph-indentation 2)
      (shrface-paragraph-fill-column 80)
      :config
      (shrface-basic)
      (shrface-trial)
      (with-eval-after-load 'nov
        (setq nov-shr-rendering-functions (append nov-shr-rendering-functions shr-external-rendering-functions))
        (add-hook 'nov-mode-hook 'shrface-mode)))

shrface-mode can be enable/disable on the fly through M-x shrface-mode. And also, shrface-mode-hook was added for more customization options..

ram535 commented 4 years ago

I see thanks. But after adding (add-hook 'nov-mode-hook 'shrface-mode). org-shifttab works. org-cycle do not work.

chenyanming commented 4 years ago

org-cycle will call org-children which can not work perfectly, you can use outline-cycle instead.

chenyanming commented 4 years ago

I see thanks. But after adding (add-hook 'nov-mode-hook 'shrface-mode). org-shifttab works. org-cycle do not work.

But you may need to install outline-magic by yourself. Link could be found in README.

ram535 commented 4 years ago

I see. I just would like to mention org-cycle was working before the update. I will look into outline-magic solution. Thanks

chenyanming commented 4 years ago

I see. I just would like to mention org-cycle was working before the update. I will look into outline-magic solution. Thanks

Oh, if org-cycle is working before the update, it should work after the update, since I did not change the logic of outline features, just introduce shrface-mode, shrface-basic and shrface-trial, let me reopen this ticket and keep watching.

Since outline-cycle is a solution of helping fix the subtrees can not show issue. org-cycle should work on show overview and show all, but sometimes can not show subtrees.

ram535 commented 4 years ago

Feel free to close this issue when you see appropriate . I installed outline-magic which allow me to not need org-cycle.