Coder Social home page Coder Social logo

org-noter-plus-djvu's Introduction

ORG-NOTER (fork of a fork)

This is a fork of the c1-g fork with some commits picked from dmitrym

  • In essence, this is close to the original weirdNox (Gonçalo Santos) version that you find on MELPA with the refactoring that c1-g implemented
  • djvu and epub support have also been advanced by c1-g, but I have not tested any of that code.
  • The main new feature for PDF users is 2-D precise notes (introduced by Ahmed Shariff, which can be inserted in two ways:
    1. “Select-precise”: selecting text in the pdf, followed by M-i. c1-g changed the position format to use the entire list returned by edges. This breaks the other way of inserting precise notes. On dmitrym’s fork, select-precise notes auto-fill the note title with the selected text. This has deleterious side effects for other note insertion methods.
    2. “Click-precise”: M-i, followed by clicking a location on the page.
  • Standard notes can also be inserted in two ways:
    1. “TAB”. Hitting tab creates a note title “Notes for page ##”, where the page number is inserted automatically over the octothorpes.
    2. “i”. The fundamental org-noter-insert-note. User types note title into the minibuffer.

Stock vs refactored note insertion

  • more consistent use of selected text in title or body
  • more consistent primary default title (short-selected-text)
  • more consistent secondary default title (“Notes for page <location>”)
  • avoids having different notes with the same heading

    In Stock org-noter, repeated TAB’s give multiple notes. In this refactor, new notes in the same location with the same title are note made. For now, precise notes are excepted from this rule.

  • long quotes are enclosed in #+BEGIN_QUOTE…#+END_QUOTE
  • short quotes are enclosed in “…” (LaTeX style)
  • short/long are differentiated by customizable variable (default 80 char)

    In Stock org-noter, long selections have more than 3 lines.

  • NEW: multicolumn precise-notes defined by property NUM_COLUMNS

    Implements issue #153 in weirdNox/org-noter by adding org-noter-pdf-convert-to-location-cons to org-noter--convert-to-location-cons-hook, where a “virtual” vertical location is calculated by dividing the page into equal width columns. This is not a perfect solution, and is probably best for low-integer numbers of columns, since the page is just divided evenly into NUM_COLUMNS vertical strips.

Stock

insert-note iprecise note M-ino-questions C-i, TAB
title prompt?YYN
default title 1prior note by locationselected-textN/A
default title 2“Notes for page #”“Notes for page # x y”“Notes for page #”
new notewith new titlealwaysalways
bodyselected-text on existing noteselected-text (> 3 lines)none

Refactored

insert-noteprecise noteno-questions
title prompt?YYN
default title 1short-selected-textshort-selected-textshort-selected-text
default title 2“Notes for page #”“Notes for page # x y”“Notes for page #”
new notewith new titlealwayswith new title
bodyselected-text (not title)selected-text (not title)selected-text (not title)
highlight selection???????

Features wishlist

  1. Use pdf-view-current-pagelabel to use the page label instead of page in default titles

    May require altering the org-noter-X–pretty-print-location-hook(s).

  2. Profile org-noter – runs slow on large books (500+ pages) org-element-map is taking 85% of the CPU. Org 9.6 should have a faster way that Charlie Gordon explored.
  3. Bind M-<mouse-1> to precise-note, no-questions.
  4. Make background of arrow transparent (see org-noter–show-arrow)
  5. Dedicated insert-selected-text-into-page-note
  6. Internationalize precise notes to handle right-to-left languages.

Bugs

to fix

  1. Sometimes (when?) M-p doesn’t pick up the containing note-at-point right away (or at all), requiring user to manually type in the (existing) title

fixed

  1. Navigating up from a nested precise note lands in the prior note at the next level up (eg level 3 -> level 2). page notes behave properly.

    [file:org-noter-core.el:2179] (org-element-property :begin (org-noter--get-containing-element)) returns the begin of the element one level up when the current note location is of the form (<page#> <vpos> . <hpos>). It works properly for locations of the form (<page#> . <vpos>).

    It will be one of these two:

    • org-noter--get-containing-heading
      • org-noter--check-location-property found bug: org-noter-core.el:1023 change test from integerp to numberp
    • org-noter--get-containing-property-drawer

Highlighting

my solution is compact, but too pdf-specific. need to sketch out Dmitry’s solution

  • in precise-notes
    1. hook to make the highlight in the document
    2. hook to preserve highlight in org-noter file
  • what contexts would HL be used?
    1. only precise? (current implementation)
    2. anytime (Peter’s implementation)
  • how does this play with quoting text?
    1. HL Y/N
    2. Quoting Y/N
    3. No HL if Q
    4. No Q if HL

org-noter-plus-djvu's People

Contributors

ahmed-shariff avatar c1-g avatar dangirsh avatar dmitrym0 avatar emacsomancer avatar et2010 avatar fuxialexander avatar petermao avatar purcell avatar stettberger avatar swflint avatar weirdnox avatar

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.