A force resync of the database does not work in Windows (Cygwin):
apply: Removing old name: Device or resource busy, /home/brschoen/.emacs.d/org-roam.db
Therefore, close the connection first and then try to remove the database file.
Prefer Org's org-collect-keywords over org-roam-get-keyword. This
function is not used anywhere, but perhaps some people's configurations
depend on it, so it will be left as is for now.
Adds org-roam-extract-subtree, which converts the subtree at point
into a top-level file node. This is useful for when a node you are
expanding on gets too big, and deserves its own file.
Closes#1104, #1658
Redefine a new file to Org-roam's capture system as one that does not
have a buffer visiting it yet. This means that if a buffer is already
visiting the file, then the HEAD template will not be inserted. This is
important because Org-roam capture does not enforce the save of files,
and this can lead to scenarios where the template is inserted multiple
times to a buffer for a file that has not yet been written to disk.
Current, when fetching file level org tags (from the #+filetags property), multiple tags are split based on the default `split-string` separator. This is incorrect because the org documentation says that multiple file-level tags should be separated by `:` (like headline level tags). This results in a improper splitting (aka no split) of the tag string into multiple tags. This leads to the inability to delete tags that are there.
Similarly, when writing multiple filetags, the tags are joined by " " instead instead of ":" as mentioned in the org docs. This leads to improperly added tags where newly added tags would not be recognized by org.
This PR fixes both problems, parsing is done by string splitting on ":" (with the `OMIT-NULLS` parameter set to true so you don't get a null values from the fact tags start and end with `:`). Joining multiple tags is now done with the `org-make-tag-string` function instead of manually joining on space. These changes result in the ability to add and remove file level tags such that the resulting value of the `#+filetags` property is a valid tag string.
Previously if a top-level file node is excluded, it would still be
picked up by org-roam-id-at-point. This adds another org-roam-db-node-p
check before returning an ID, fixing the broken behaviour. Fixes#1635.
`org-roam-graph` doesn't need the patch from #1673, because it sort of
lives on its own island, isolated from the rest of the codebase and can
simply do `(require 'org-roam)` when its autoload is fired.
Otherwise the autoload for this command will never end-up resolved,
because nothing `require`s it in the codebase.
The rationale for this change is to allow context-specific capture
consideration. That is to say, in my experience, when I'm working on a
project, I often want to scope my note finding and creation to that
project. By adding `filter-fn` and `templates` I can easily craft
context-aware functions for my note-taking.
I chose to switch these to `cl-defun` to expose `&key` parameters, which I
find more useful as the method signature grows.
Closes#1681
From the Github Issue:
> Adding a `filter-fn` parameter to `org-roam-capture` and a `templates`
> parameter to `org-roam-capture` , `org-roam-node-insert`,
> `org-roam-node-find` would improve their general utility, and reduce
> fiddling with the more inner functionality of `org-roam-capture-` and
> `org-roam-node-read`
At the current state autoloads from non `org-roam.el` unable to start
loading of the package from their own file. See the following to learn
more about the problem:
https://github.com/org-roam/org-roam/issues/1590#issuecomment-885817825
This is no more than a workaround to bandage a more deeper underlying
problem. Until the more fundamental problem won't be fixed, all autoload
cookies from non "org-roam.el" file will need to manually point to the
main entry point of the package -- "org-roam.el" file, to load it
without causing errors.
Fixes#1590, #1620, #1600 and other similar issues.
The previous fix[0] for capture targets did the right thing. However, it
didn't account that `org-roam-capture--get-point` branches to 3
different paths, where each of them set the point to a different
location, and the fix only addressed the branch in which
`org-roam-capture--goto-location` would run.
This commit adjusts the point for all other branches, which fixes a
problem where you would try to run capture to existing node with
something like `org-roam-capture` and it wouldn't set the point to the
right location; same with ref capturing through the `org-roam-protocol`.
[0]: c9bed390b6
This adds the whole new section in `org-roam-mode.el` for node dedicated
buffers, with a new global command `org-roam-buffer-display-dedicated`,
which supersedes `org-roam-buffer` command.
Along the way this also refactors the code for the persistent buffers to
clean it up, make it more clear in what it does, improve its robustness,
and to make it play nice with the dedicated buffers.
1. If it the link is at a headline, it shows the headline's content
instead of just repeating the headline
2. If the link is a bullet item in the plain-list, show the full list instead
org-roam-file-p throws `wrong-type-argument stringp nil` on buffers that
do not have a corresponding file. This fix changes org-roam-file-p to
return nil instead of crashing in this scenario.
Addresses #1645
Non-ASCII characters are displayed incorrectly because
`org-roam-unlinked-references-preview-line` uses
`insert-file-contents-literally` which ignores the encoding.
Use `insert-file-contents` which does the right thing.
fixes#1575
* (doc): Add section for C Compiler
In the Post-Installation Tasks section, I suggest to add a sub-section for the C
compiler requirement for emacsql-sqlite. I have put an explanation for Windows
-- I have tried to make it as succinct as I can without losing some fine points
that I believe important for users to avoid confusion.
I have just removed MSYS2 and the PATH on my Windows machine and repeated the
process as I described it here to confirm that it works.
Since this new part is distinct from the existing paragraphs for SQLite, I also
suggest a sub-section heading for them -- I used "SQLite" as its title.
Please feel feel to change any part as you see fit.
It might be also useful if macOS users added their parts. I believe XCode is the
easiest way to install a C compiler (I believe it would be clang for recent
XCode versions) or perhaps brew. I don't use macOS so I will refrain from adding
this part..
I did not add .texi file to this commit -- last time, I believe you had to
revise the texi file that my machine generated anyway. Let me know if I should
follow up with a texi file.
* remove reference to emacsql-sqlite3
Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>
This mostly goes over docstrings, updating them in places where it was
outdated and adding them to places where they didn't exist or were
existed as placeholders.