Authentication-Results: mail-b.sr.ht; dkim=pass header.d=prevos.net header.i=@prevos.net Received: from alt-proxy28.mail.unifiedlayer.com (alt-proxy28.mail.unifiedlayer.com [74.220.216.123]) by mail-b.sr.ht (Postfix) with ESMTPS id 90BEB11F01F for <~protesilaos/denote@lists.sr.ht>; Tue, 1 Nov 2022 09:54:21 +0000 (UTC) Received: from cmgw10.mail.unifiedlayer.com (unknown [10.0.90.125]) by progateway1.mail.pro1.eigbox.com (Postfix) with ESMTP id 153B8100400CB for <~protesilaos/denote@lists.sr.ht>; Tue, 1 Nov 2022 09:54:10 +0000 (UTC) Received: from box5359.bluehost.com ([162.241.216.29]) by cmsmtp with ESMTP id pnyCoyUj30TQ2pnyDo7UI7; Tue, 01 Nov 2022 09:54:10 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=VYkygHl9 c=1 sm=1 tr=0 ts=6360ecc2 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=NEAV23lmAAAA:8 a=XsNbsPK-AAAA:8 a=FyCsj8VSAAAA:8 a=sXQJh9K60FMxfsS-32UA:9 a=QEXdDO2ut3YA:10:nop_charset_2 a=u9bfRNN_Jd4ltmYglkEr:22 a=jt-XRDgE8ogUvRm92E93: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=yoRoNjddcj+4+/drOfYHgWTD87kagNCH2YC9FAhZph8=; b=i3lWgmaIcEhBtgMmB1s67OrbsV a6VSBcWw3b2ClygJFpTDJkRisvDRGUHTTxlW0ypEsrt7pJUuqgbhWdgrJqZHb6ze3/1oz0IrrdyJ7 CgZZ+3FObFtN9ZsKu4iHFguraL6t9kw8LtTxiszZWVWaAap0s0sLTzFq8Uj2Vduw5R4ngHXAq+8hH uInHHkQpPgOsI8NRL9pU5f+wJ2sO398ZV2l/3JT+41O8jtKo0mF3xV2j9J4jGpI6nejo1+p0WdPmx pwwhfIKdEvFSwWOiiGLYE3INFVE+YXHfaa3QGM98Vw6z3fOquDSGqAdeg1+FAMF3OGpMEbHmC/v7a E3jE7Rng==; Received: from 182-239-219-25.ip.adam.com.au ([182.239.219.25]:52848 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 1opnyA-000OeZ-U1; Tue, 01 Nov 2022 03:54:07 -0600 References: <87tu3jw20x.fsf@atmarama.ddns.net> <87fsf33tq4.fsf@prevos.net> User-agent: mu4e 1.6.10; emacs 28.1 From: Peter Prevos To: Peter Prevos Cc: =?utf-8?B?U2HFoWEgSmFuacWha2E=?= , ~protesilaos/denote@lists.sr.ht Subject: Re: using Denote with org-roam Date: Tue, 01 Nov 2022 20:52:04 +1100 In-reply-to: <87fsf33tq4.fsf@prevos.net> Message-ID: <87bkpr3sqt.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: 1opnyA-000OeZ-U1 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]:52848 X-Source-Auth: ykeqotmy X-Email-Count: 4 X-Source-Cap: eWtlcW90bXk7eWtlcW90bXk7Ym94NTM1OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes Hi Sa=C5=A1a and Prot, I just added a feature request to the Org Roam UI list to include=20 the ability to add Denote links to the graph. https://github.com/org-roam/org-roam-ui/issues/272 regards P:) Peter Prevos writes: > Hi Sa=C5=A1a, > > I just installed Org Roam and it seems that Denote links are=20 > also > stored in the database. It just hoovers up any Org Mode=20 > links. So 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 > database. If you add (=3D links:type "denote"), then the graph=20 > will 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 it is=20 > 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' > 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