~protesilaos/denote

4 2

using Denote with org-roam

Saša Janiška <sjaniska@atmarama.net>
Details
Message ID
<87tu3jw20x.fsf@atmarama.ddns.net>
DKIM signature
missing
Download raw message
Hello,

in a recent thread
(https://org-roam.discourse.group/t/denotes-file-naming-scheme-and-org-roam/2769/22)
at org-roam group, Noboru Ota (nobiot) helped me to achieve
interoperability  between Org-roam and Denote...iow. org-roam-ui 
can
handle Denote's notes if the links are created with  with 
org-roam.

Now I wonder if I'd continue using Denote (to take advantage of 
its
(re)naming scheme, tagging etc.) with the hyperlinks created with
org-roam - in order to make them work with org-roam-ui, what could 
I
possible lose from the sigght of Denote?


Sincerely,
Saša

-- 
Whatever action a great man performs, common men follow. And
whatever standards he sets by exemplary acts, all the world 
pursues.
Details
Message ID
<87bkpr3uel.fsf@protesilaos.com>
In-Reply-To
<87tu3jw20x.fsf@atmarama.ddns.net> (view parent)
DKIM signature
pass
Download raw message
> From: Saša Janiška <sjaniska@atmarama.net>
> Date: Tue,  1 Nov 2022 08:39:35 +0100
>
> Hello,

Hello Saša,

> in a recent thread
> (https://org-roam.discourse.group/t/denotes-file-naming-scheme-and-org-roam/2769/22)
> at org-roam group, Noboru Ota (nobiot) helped me to achieve
> interoperability between Org-roam and Denote...iow. org-roam-ui can
> handle Denote's notes if the links are created with with org-roam.
>
> Now I wonder if I'd continue using Denote (to take advantage of its
> (re)naming scheme, tagging etc.) with the hyperlinks created with
> org-roam - in order to make them work with org-roam-ui, what could I
> possible lose from the sigght of Denote?

Noboru is on this list but is on holidays right now.

I am afraid I cannot provide feedback on this issue, as I do not know
how org-roam works.  My understanding is that you are complicating your
setup with no obvious upside.  Since you really need the graphing
capabilities, there is only one option: org-roam.

Trying to mix denote with org-roam is an exercise for tinkerers or
researchers who are searching for something to experiment with.  From a
user's perspective, what matters is a reliable note-taking system.
Denote, org-roam, or one of the other relevant packages will do.

The manual describes alternatives to Denote:
<https://protesilaos.com/emacs/denote#h:dbb51a1b-90b8-48e8-953c-e2fb3e36981e>.

A cursory look at your linked entry suggests that we have already
covered the other topics mentioned therein.  To recapitulate:

* Performance might be a problem at a very large scale.  The same is
  true for enormous file sizes.  This is not a problem with Denote, but
  with Emacs, grep, and other such tools.  Computing capabilities are
  finite.  As a prolific writer myself, I encourage you to consider
  quality of quantity.  Think how you take notes and what goes into
  them.  Are millions of files with small snippets truly useful to you
  long-term ("long-term" is key---I am not talking about TODO items)?
  Don't think in terms of computer capabilities but in terms of what
  you, as a reader of your own notes, would prefer to read.  I find it
  easier to study fully fledged notes that capture complete thoughts.
  Not quotes but "complete thoughts", meaning that I understood what I
  was reading/thinking and put it in my own words.  I let the computer
  handle stuff like organising the files and letting me narrow to what I
  am searching for.

* I do not have a use-case for graphing capabilities.  Also, I do not
  have the expertise to implement such a feature for Denote.  It seems
  org-roam-ui is a web application, which consists of technologies I
  know nothing about.  I am happy if someone else does it and am
  prepared to provide help to the extent I can.  Though I do not mind if
  we never get such a feature: I am sceptical of its contribution to the
  elucidation of thoughts.  Perhaps I am missing something important
  though and would be happy to learn from someone who benefits from such
  a graph (I know the theoretical benefits, but is anyone actually more
  productive and generally better because of the graph?).  This is not
  an argument against the org-roam-ui package.  I am considering the
  graphing capability as such.

All the best,
Prot

-- 
Protesilaos Stavrou
https://protesilaos.com
Details
Message ID
<87fsf33tq4.fsf@prevos.net>
In-Reply-To
<87tu3jw20x.fsf@atmarama.ddns.net> (view parent)
DKIM signature
pass
Download raw message
Hi Saša,

I just installed Org Roam and it seems that Denote links are also 
stored in the database. It just hoovers up any Org Mode links. So 
as long as your Denote files have a ID tag that Org Roam 
recognises, you can graph them with one minor modification.

The  org-roam-ui--get-links function fetches the links from the 
database. If you add (= links:type "denote"), then the graph will 
also show Denote links.

Seems to work pretty easily. Perhaps convince the Org Roam UI 
designer to add a variable for link types that can be modified so 
it is easier to include Denote links.

This is my version of the function:

(defun org-roam-ui--get-links (&optional old)
  "Get the cites and links tables as rows from the org-roam db.
Optionally set OLD to t to use the old db model (where the cites
were in the same table as the links)."
(if (not old)
    (org-roam-db-query
     `[:select  [links:source
                 links:dest
                 links:type]
       :from links
       :where (= links:type "id")])
  ;; Left outer join on refs means any id link (or cite link 
  without a
  ;; corresponding node) will have 'nil for the `refs:node-id' 
  value. Any
  ;; cite link where a node has that `:ROAM_REFS:' will have a 
  value.
  (org-roam-db-query
   `[:select [links:source
              links:dest
              links:type
              refs:node-id]
     :from links
     :left :outer :join refs :on (= links:dest refs:ref)
     :where (or
             (= links:type "id")
	     (= links:type "denote")
             (like links:type "%cite%"))])))

Regards

Peter

-- 
Dr Peter Prevos
---------------
peterprevos.com


Saša Janiška <sjaniska@atmarama.net> writes:

> Hello,
>
> in a recent thread
> (https://org-roam.discourse.group/t/denotes-file-naming-scheme-and-org-roam/2769/22)
> at org-roam group, Noboru Ota (nobiot) helped me to achieve
> interoperability  between Org-roam and Denote...iow. org-roam-ui 
> can
> handle Denote's notes if the links are created with  with 
> org-roam.
>
> Now I wonder if I'd continue using Denote (to take advantage of 
> its
> (re)naming scheme, tagging etc.) with the hyperlinks created 
> with
> org-roam - in order to make them work with org-roam-ui, what 
> could I
> possible lose from the sigght of Denote?
>
>
> Sincerely,
> Saša
Details
Message ID
<87bkpr3sqt.fsf@prevos.net>
In-Reply-To
<87fsf33tq4.fsf@prevos.net> (view parent)
DKIM signature
pass
Download raw message
Hi Saša and Prot,

I just added a feature request to the Org Roam UI list to include 
the ability to add Denote links to the graph.

https://github.com/org-roam/org-roam-ui/issues/272

regards

P:)

Peter Prevos <peter@prevos.net> writes:

> Hi Saša,
>
> I just installed Org Roam and it seems that Denote links are 
> also
> stored in the database. It just hoovers up any Org Mode 
> links. So as
> long as your Denote files have a ID tag that Org Roam 
> recognises, you
> can graph them with one minor modification.
>
> The  org-roam-ui--get-links function fetches the links from the
> database. If you add (= links:type "denote"), then the graph 
> will also
> show Denote links.
>
> Seems to work pretty easily. Perhaps convince the Org Roam UI 
> designer
> to add a variable for link types that can be modified so it is 
> easier
> to include Denote links.
>
> This is my version of the function:
>
> (defun org-roam-ui--get-links (&optional old)
>  "Get the cites and links tables as rows from the org-roam db.
> Optionally set OLD to t to use the old db model (where the cites
> were in the same table as the links)."
> (if (not old)
>    (org-roam-db-query
>     `[:select  [links:source
>                 links:dest
>                 links:type]
>       :from links
>       :where (= links:type "id")])
>  ;; Left outer join on refs means any id link (or cite link 
>  without
>    a
>  ;; corresponding node) will have 'nil for the `refs:node-id'
>     value. Any
>  ;; cite link where a node has that `:ROAM_REFS:' will have a 
>  value.
>  (org-roam-db-query
>   `[:select [links:source
>              links:dest
>              links:type
>              refs:node-id]
>     :from links
>     :left :outer :join refs :on (= links:dest refs:ref)
>     :where (or
>             (= links:type "id")
> 	     (= links:type "denote")
>             (like links:type "%cite%"))])))
>
> Regards
>
> Peter


-- 
Dr Peter Prevos
---------------
peterprevos.com
Details
Message ID
<874jvj3sil.fsf@protesilaos.com>
In-Reply-To
<87bkpr3sqt.fsf@prevos.net> (view parent)
DKIM signature
pass
Download raw message
> From: Peter Prevos <peter@prevos.net>
> Date: Tue,  1 Nov 2022 20:52:04 +1100
>
> Hi Saša and Prot,

Hello Peter,

> I just added a feature request to the Org Roam UI list to include 
> the ability to add Denote links to the graph.
>
> https://github.com/org-roam/org-roam-ui/issues/272

Sounds good!  I do not know if that is within the scope of the project,
but it never harms to ask.

All the best,
Prot

-- 
Protesilaos Stavrou
https://protesilaos.com
Reply to thread Export thread (mbox)