You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
org-noter is already very configurable via configuration flags/variables. There's more that can be customized using hooks and advice.
2
+
3
+
* Customizing note opening process
4
+
5
+
By default org-noter likes to store the notes in =Notes.org= file.
6
+
7
+
Say you want to change that to be dynamically generated, perhaps with =completing-read= of some sort.
8
+
9
+
Override the =org-noter-create-session-from-document-hook=. The hook will call a function of two arguments, =ARG= and =DOC-PATH=.
10
+
11
+
=arg= is not used, and =DOC-PATH= is the complete file path to the pdf (document).
12
+
13
+
This terminates the normal org-noter flow. At this point, org-roam integration generates a new notes file, creates an org-noter heading and reinvokes =(org-noter)=.
14
+
15
+
See the =org-noter--create-session-from-document-file-supporting-org-roam= in [org-noter-org-roam.el](https://github.com/org-noter/org-noter/blob/master/modules/org-noter-org-roam.el#L45).
16
+
17
+
18
+
* Customizing the content of precise notes
19
+
20
+
21
+
When I take precise notes, I like the idea of having the content of the highlight stored below the fold of a heading.
22
+
23
+
This allows me to paraphrase the headline while preserving the original content in the =QUOTE= block.
24
+
25
+
This is achieved with an advise:
26
+
27
+
#+begin_src elisp
28
+
29
+
(define-advice org-noter--insert-heading (:after (level title &optional newlines-number location) add-full-body-quote)
30
+
"Advice for org-noter--insert-heading.
31
+
32
+
When inserting a precise note insert the text of the note in the body as an org mode QUOTE block.
33
+
34
+
=org-noter-max-short-length= should be set to a large value to short circuit the normal behavior:
35
+
=(setq org-noter-max-short-length 80000)="
36
+
37
+
;; this tells us it's a precise note that's being invoked.
0 commit comments