Nicolas Petton
72bc00f3ec
Remove advice before before org-capture-place template
Now that nroam inserts a non read-only \n after the sections so that text can be
inserted after nroam sections at the end of the buffer, remove the extra
read-only \n so that org-capture can insert templates.
* nroam.el (nroam--handle-org-capture): Remove function and advice.
* nroam-unlinked.el (nroam-unlinked--insert-toggle-button): Do not insert a
read-only newline as it prevents org-capture from inserting the template as it
tries to delete empty lines at the end of the buffer.
2 years ago
Nicolas Petton
4b6d598a1d
* nroam.el: Bump dependency of org to 9.4.4 for `org-hide-drawer-toggle'.
2 years ago
Nicolas Petton
a6dfa9d763
Merge pull request #15 from Whil-/master
nroam-backlinks.el: Update levels due to pull request #14
2 years ago
Gustav Wikström
530a184e83
nroam-backlinks.el: Update levels due to pull request #14
Adding a single backlinks heading changes the depth by 1 for most
everything. Some things wasn't updated in that pull request. This pull
request fixes some things missing.
* nroam-backlinks.el (nroam-backlinks--insert-backlink-subtree)
(nroam-backlinks--insert-subtree): Add one level of depth.
2 years ago
Nicolas Petton
425e78770d
* nroam-utils.el (nroam--insert-heading): Copyedit docstring.
2 years ago
Nicolas Petton
f5b369c7b6
Fix a byte-compiler warning
* nroam-backlinks.el: Require org for `org-hide-drawer-toggle'.
2 years ago
Nicolas Petton
2f4b1ce021
* nroam-backlinks.el (nroam-backlinks--insert-group): Fix a let(*).
2 years ago
Nicolas Petton
78ee615bae
Merge pull request #14 from cdlm/single-heading
Organize backlinks under single heading
2 years ago
Damien Pollet
f2deda6cd7
Improve comment of nroam--insert-heading
2 years ago
Damien Pollet
6b5fd99e2e
Organize backlinks under single heading
2 years ago
Nicolas Petton
7ae549a222
Fix #13 #10
* nroam.el (with-nroam-markers): Add an extra \n char in read-write so that text
can be inserted at the end of the buffer.
2 years ago
Nicolas Petton
e44ea27370
* nroam-utils.el (nroam--ensure-empty-line): Copyedit docstring.
2 years ago
Nicolas Petton
a60533106a
Merge pull request #12 from DamienCassou/dont-export-sections
Remove nroam sections from export
2 years ago
Damien Cassou
7221386120
Remove nroam sections from export
* nroam-backlinks.el (nroam-backlinks--insert-heading):
* nroam-unlinked.el (nroam-unlinked--insert-heading): Add the
:noexport: tag to prevent exporting nroam sections. See docstring of
`org-export-exclude-tags'.
2 years ago
Nicolas Petton
13e364edef
Fix #9
Document installation with straight.el.
2 years ago
Nicolas Petton
68e9270ebe
Fix docstrings
* nroam-backlinks.el (nroam-backlinks-section):
* nroam-unlinked.el (nroam-unlinked-section):
* nroam.el (nroam-setup-maybe):
(nroam-update):
(nroam--org-roam-file-p):
(nroam--update-maybe): Fix docstrings according to `checkdoc'.
2 years ago
Nicolas Petton
7c5042417f
Only use package headers in nroam.el
* nroam-backlinks.el:
* nroam-unlinked.el:
* nroam-utils.el: Remove package headers.
2 years ago
Nicolas Petton
8e3f03fa30
Merge pull request #8 from Whil-/master
nroam.el: Fix nroam mode-line lighter
2 years ago
Gustav Wikström
bee436e53e
nroam.el: Fix nroam mode-line lighter
* nroam.el (nroam-mode): Ligher needs an empty space as first character.
2 years ago
Nicolas Petton
d619735185
Merge pull request #7 from DamienCassou/improve-readme
Improve readme
2 years ago
Damien Cassou
4615973a7d
* readme.org: Describe what unlinked references are
2 years ago
Damien Cassou
ceaa4556c9
* readme.org: Fix typo
2 years ago
Damien Cassou
ad80e997f1
* readme.org: Fill paragraphs
2 years ago
Nicolas Petton
c150603a25
Bump nroam to v0.9.0
2 years ago
Nicolas Petton
22be2cc219
Merge pull request #6 from Whil-/master
nroam-backlinks.el: Add logic for heading level for backlink subtree
2 years ago
Gustav Wikström
49468cd28c
nroam-backlinks.el: Add logic for heading level for backlink subtree
* nroam-backlinks.el (nroam-backlinks--insert-backlink-subtree): Use
the existance (or not) of an outline to infer the subtree level of the
content.
2 years ago
Nicolas Petton
b7e79c5ed8
Fix a let(*) definition
* nroam-backlinks.el (nroam-backlinks--hide-drawers): Use `let*’ as `elt’ is
used in other let forms.
2 years ago
Nicolas Petton
edbd6f0c7e
Merge pull request #5 from Whil-/master
nroam-backlinks.el: Fix edge case (again)
2 years ago
Gustav Wikström
03663d5e76
nroam-backlinks.el: Fix edge case (again)
* nroam-backlinks.el (nroam-backlinks--crawl-source): Set full-outline
to nil if point is before first heading using a built in org function.
2 years ago
Nicolas Petton
6a412e8c32
Refactoring: rename a function
* nroam-backlinks.el (nroam-backlinks--insert-backlink-breadcrumbs): Rename from
`nroam-backlinks--insert-backlink-outline’.
2 years ago
Nicolas Petton
df4ff299f3
Refactor nroam-backlinks--insert-backlink
* nroam-backlinks.el (nroam-backlinks--insert-backlink): Refactor by extracting
new functions.
(nroam-backlinks--insert-backlink-subtree):
(nroam-backlinks--insert-backlink-content):
(nroam-backlinks--insert-backlink-outline): New functions.
2 years ago
Nicolas Petton
5ceb4f6729
Fix an edge case in `nroam-backlinks--crawl-source’
* nroam-backlinks.el (nroam-backlinks--crawl-source): Do not attempt to get the
full outline when outline is nil, as `org-get-outline-path’ will throw.
2 years ago
Nicolas Petton
64687fc8d4
Merge pull request #4 from Whil-/master
nroam-backlinks.el: Add more context to backlinks
2 years ago
Gustav Wikström
a514dbb687
nroam-backlinks.el: Add more context to backlinks
* nroam-backlinks.el (nroam-backlinks--insert-backlink)
(nroam-backlinks--crawl-source): Make sure the outline hierarchy
is included in the backlinks section.
2 years ago
Nicolas Petton
eebd4b9a10
Create FUNDING.yml
2 years ago
Nicolas Petton
f6306fdae6
* readme.org: Copyedit.
2 years ago
Nicolas Petton
9f2cb5277a
* readme.org: Update for unlinked references
2 years ago
Nicolas Petton
4fccc56fff
Add support for unlinked references
* nroam-unlinked.el: New file.
* nroam.el: Setup unlinked references section.
2 years ago
Nicolas Petton
c51e54957d
Split nroam.el
* nroam-backlinks.el:
* nroam-utils.el: New files.
2 years ago
Nicolas Petton
b909ccd800
Insert sections when turning the mode on if the buffer file exists.
* nroam.el (nroam-mode): Conditionally insert sections when turning enabling
`nroam-mode'.
(nroam--maybe-insert-immediately): New function.
2 years ago
Nicolas Petton
71dad15b6d
* nroam.el (nroam--insert): Extract `nroam--set-sections-visibility'.
2 years ago
Nicolas Petton
90a0ba1599
* nroam.el (nroam--hide-drawers): Reformat.
2 years ago
Nicolas Petton
580aa03822
* nroam.el (nroam--ensure-empty-line): Do dot move to point-max.
2 years ago
Nicolas Petton
645c380b27
Refactor nroam--insert-backlink
* nroam.el (nroam--insert-source-content): Inline into `nroam--insert-backlink'.
2 years ago
Nicolas Petton
857dd4f845
* nroam.el (nroam--insert): Rename let variable
2 years ago
Nicolas Petton
0a80d806fe
* nroam.el (nroam--insert-backlinks-heading): Simplify
2 years ago
Nicolas Petton
ca401e4872
* nroam.el: Remove a double space
2 years ago
Nicolas Petton
00506d08ed
Minor refactoring
* nroam.el (nroam--insert-source-content): Rename let vars for clarity.
2 years ago
Nicolas Petton
e24bb972f6
Do not insert a new line if the buffer is empty
* nroam.el (nroam--insert): When the buffer is empty, do not insert a newline at
it would be inserted at the beginning of the buffer.
2 years ago
Nicolas Petton
4ff1c7d89b
Ensure one empty line between each heading in nroam sections
* nroam.el (nroam--do-separated-by-newlines): New function.
(nroam-backlinks-section):
(nroam--insert):
(nroam--insert-backlink-group): Call `nroam--do-separated-by-newlines' to ensure
one empty line is inserted between headings.
2 years ago