Authentication-Results: mail-b.sr.ht; dkim=pass header.d=prevos.net header.i=@prevos.net Received: from gproxy1-pub.mail.unifiedlayer.com (gproxy1-pub.mail.unifiedlayer.com [69.89.25.95]) by mail-b.sr.ht (Postfix) with ESMTPS id 068BB11F01F for <~protesilaos/denote@lists.sr.ht>; Tue, 1 Nov 2022 09:33:15 +0000 (UTC) Received: from cmgw12.mail.unifiedlayer.com (unknown [10.0.90.127]) by progateway3.mail.pro1.eigbox.com (Postfix) with ESMTP id 2C62810045DA3 for <~protesilaos/denote@lists.sr.ht>; Tue, 1 Nov 2022 09:33:00 +0000 (UTC) Received: from box5359.bluehost.com ([162.241.216.29]) by cmsmtp with ESMTP id pndgoBKW4RLHCpndhoGWCv; Tue, 01 Nov 2022 09:33:00 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=C8QsdSD+ c=1 sm=1 tr=0 ts=6360e7cc a=z4NHZwuyxlzT7DsDget91A==:117 a=z4NHZwuyxlzT7DsDget91A==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IkcTkHD0fZMA:10:nop_charset_1 a=9xFQ1JgjjksA:10:nop_rcvd_month_year a=_RufMteo4dQA:10:endurance_base64_authed_username_1 a=FyCsj8VSAAAA:8 a=PTbRxlQZAAAA:8 a=4LMfHR3NAAAA:8 a=FkFQRuwmFQBo2O_d9kIA:9 a=QEXdDO2ut3YA:10:nop_charset_2 a=jt-XRDgE8ogUvRm92E93:22 a=wYfl21A2utSiUSvwfoUr:22 a=g_5S8E14a53tgmVDnogI:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=prevos.net; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: In-reply-to:Date:Subject:Cc:To:From:References:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=7GJgUhWYu8WjypZwNefzsYbrw0fTBB8M4+J5s1B6xS4=; b=ljj+NnnFnFl+jDJ0Lx+OZMo9jB d3Se8Ei5o2m8Py3K7Sy8ViQxxXvmHSsN5+emai302bQV2M1Tlvwa37CJ9iP1ri6kdw3AYISmj6xrU 7PscNAtBkc4Us7j51oLAqjkUzNLejcMDX68bLeNtsrrSOcFHdKvV50MryKkTNvc7JFamZqg1asm1o 4Q2vLNAmO21qiH4Q/9ROMnKWwXItt7R1kWLsD2bxn2V4/6BSM1XUf+420VL7yIVnCyd5Nzs2q9kKo VCLbq0kWCYGUIBOdbjviE6a7Z0k0AY/8ORbqCzU8fKMnO/1s9u5UbrqiLeu1w3IOC6k+108AV4oOS 4IWoO21g==; Received: from 182-239-219-25.ip.adam.com.au ([182.239.219.25]:47672 helo=xps-9315) by box5359.bluehost.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1opndg-000Agg-1P; Tue, 01 Nov 2022 03:32:56 -0600 References: <87tu3jw20x.fsf@atmarama.ddns.net> User-agent: mu4e 1.6.10; emacs 28.1 From: Peter Prevos To: =?utf-8?B?U2HFoWEgSmFuacWha2E=?= Cc: ~protesilaos/denote@lists.sr.ht Subject: Re: using Denote with org-roam Date: Tue, 01 Nov 2022 20:12:56 +1100 In-reply-to: <87tu3jw20x.fsf@atmarama.ddns.net> Message-ID: <87fsf33tq4.fsf@prevos.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5359.bluehost.com X-AntiAbuse: Original Domain - lists.sr.ht X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - prevos.net X-BWhitelist: no X-Source-IP: 182.239.219.25 X-Source-L: No X-Exim-ID: 1opndg-000Agg-1P X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 182-239-219-25.ip.adam.com.au (xps-9315) [182.239.219.25]:47672 X-Source-Auth: ykeqotmy X-Email-Count: 2 X-Source-Cap: eWtlcW90bXk7eWtlcW90bXk7Ym94NTM1OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes Hi Sa=C5=A1a, I just installed Org Roam and it seems that Denote links are also=20 stored in the database. It just hoovers up any Org Mode links. So=20 as long as your Denote files have a ID tag that Org Roam=20 recognises, you can graph them with one minor modification. The org-roam-ui--get-links function fetches the links from the=20 database. If you add (=3D links:type "denote"), then the graph will=20 also show Denote links. Seems to work pretty easily. Perhaps convince the Org Roam UI=20 designer to add a variable for link types that can be modified so=20 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 (=3D links:type "id")]) ;; Left outer join on refs means any id link (or cite link=20 without a ;; corresponding node) will have 'nil for the `refs:node-id'=20 value. Any ;; cite link where a node has that `:ROAM_REFS:' will have a=20 value. (org-roam-db-query `[:select [links:source links:dest links:type refs:node-id] :from links :left :outer :join refs :on (=3D links:dest refs:ref) :where (or (=3D links:type "id") (=3D links:type "denote") (like links:type "%cite%"))]))) Regards Peter --=20 Dr Peter Prevos --------------- peterprevos.com Sa=C5=A1a Jani=C5=A1ka writes: > Hello, > > in a recent thread > (https://org-roam.discourse.group/t/denotes-file-naming-scheme-and-org-ro= am/2769/22) > at org-roam group, Noboru Ota (nobiot) helped me to achieve > interoperability between Org-roam and Denote...iow. org-roam-ui=20 > can > handle Denote's notes if the links are created with with=20 > org-roam. > > Now I wonder if I'd continue using Denote (to take advantage of=20 > its > (re)naming scheme, tagging etc.) with the hyperlinks created=20 > with > org-roam - in order to make them work with org-roam-ui, what=20 > could I > possible lose from the sigght of Denote? > > > Sincerely, > Sa=C5=A1a