Code Monkey home page Code Monkey logo

Comments (5)

sati-bodhi avatar sati-bodhi commented on June 4, 2024

@nobiot, I've fixed the problem downstream with the following config.el settings:

(use-package! org-remark
...
  (map! :leader
        (:prefix-map ("r" . "reading")
        :desc "Make highlight annotation for EPUB or PDF" "h" #'my-reading-make-highlight-annotation)
...
)

(defun my-reading-make-highlight-annotation ()
  "Highlight text and activate the annotation notes for input.
This single function can be called for both EPUBs and PDFs."
  (interactive)
  (cond ((eq major-mode 'nov-mode)
         (apply 'org-remark-mark (org-remark-region-or-word))
         (org-remark-view (- (point) 1))
         (switch-to-buffer "*marginal notes*")
         (evil-org-open-below 1))

        ((eq major-mode 'pdf-view-mode)
         (pdf-annot-add-highlight-markup-annotation pdf-view-active-region)
         (evil-insert 1)
         )))

I'll leave it up to you to decide if it is necessary to add that filter upstream at source level.

from org-remark.

nobiot avatar nobiot commented on June 4, 2024

Thanks. I will think of a way upstream for dev/nov.el branch.

from org-remark.

nobiot avatar nobiot commented on June 4, 2024

Fix 32149d5 is in the dev/nov.el branch.

When you have some time, I'd appreciate it if you could test it on your end.

from org-remark.

sati-bodhi avatar sati-bodhi commented on June 4, 2024

When you have some time, I'd appreciate it if you could test it on your end.

Tested the fix.

It now exits with org-remark: Highlights not saved; buffer is not supported when org-remark-mark is called on a PDFView buffer, which is what we want.

from org-remark.

sati-bodhi avatar sati-bodhi commented on June 4, 2024

Guess we can close this issue for now.

from org-remark.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.