From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id uPz4C7bspGWzfwEAe85BDQ:P1 (envelope-from ) for ; Mon, 15 Jan 2024 09:28:38 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id uPz4C7bspGWzfwEAe85BDQ (envelope-from ) for ; Mon, 15 Jan 2024 09:28:38 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=ushin.org header.s=key1 header.b="sNOdqK/V"; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=quarantine) header.from=ushin.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1705307318; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=HC88zspOmxtV25agV9SmMNEnlGpLcVzTjdVQWS+gMhA=; b=AwY+iYOWLYHzFn7IOTPtqC/8b6saG3TMEaSW14tktOnenfWPhbCm7kzlkqCGRrCxZxHVjW ky0Zc+P54BdXB/pXOe+CgjebrLUi8XoOT4o0Hi7eQW11b0Bp5LNNfwNS/c7AfW/3yvuidR dFR77kF/T/v64kxZkNGhKnUO59xQ+e6Vp/eBeGG+8QyRZzGCuzYGbNEuq5NdujZTqcg9Pg 4tX94jK9OCKuIIcfQWbCPc3VRg0qeGYt37ow7J8HPZtrj410A9jbT2bh7i9wQLhYizShf9 xbqdnif74rpYR22+A/7iCIMcpnSbqd+WP9MbnOgLTXWxr4huEj8CqkQavWDvEw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=ushin.org header.s=key1 header.b="sNOdqK/V"; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=quarantine) header.from=ushin.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1705307318; a=rsa-sha256; cv=none; b=CJmAJ/X/+3oOqbVhP4HfWeCQcsw/J5W+KqzP/uHkXTajP47md5E/kGH9GkSe9ETkTNU+Bx D+pYIFO6zW+lc5ZlURiGcegzMmoPoIwrqk3V+pSUyW0thoCGf9I7EW+1aCKVtsNC32vBLK z0/QeFfASPqmBHKxrOtxTMZi8vNekjaJAoa3ShtmXIiA3VlLQj9d9ziNRv6Dgc144wSCOt szKTMtOmmPLJVeSEZrIWSb/Wc3tpGqamrGeSxFYy7Iqdp6Xnv8lB9LHA65Hvi16kkiZVma zc2/OIyjwEA3w0POdGJgCh7LTN37RGoET24YsjMLep36o2HEwLivuJSw6loghA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 997C4716CE for ; Mon, 15 Jan 2024 09:28:37 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rPIK1-0002hL-31; Mon, 15 Jan 2024 03:27:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rPIJy-0002gu-Dw for emacs-orgmode@gnu.org; Mon, 15 Jan 2024 03:27:50 -0500 Received: from out-186.mta1.migadu.com ([95.215.58.186]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rPIJv-00034K-JP for emacs-orgmode@gnu.org; Mon, 15 Jan 2024 03:27:50 -0500 References: <87o7e9ei3p.fsf@ushin.org> <87wmsx3vyc.fsf@localhost> <87a5pro14q.fsf@ushin.org> <87le9a76mk.fsf@localhost> <87wmss1r51.fsf@ushin.org> <87ttnvan3m.fsf@localhost> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ushin.org; s=key1; t=1705307264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HC88zspOmxtV25agV9SmMNEnlGpLcVzTjdVQWS+gMhA=; b=sNOdqK/VMNzoM1CkFo65IS3G66xcKw3CROLTBqBtGrYx1lWPSaaEUge0qMC9NRsjHZhjm9 lH4DCdBFtqIKJF56QCRrJKMK9wy8eqG8drAVrozJwucQcJ2YS4TsI7griYhuGDM35h8Fan uiSInB982umyYg8fED7Hf4wKN55zJJfRQHfQ7Kac2ZpV0ppUaAIeb3rhBuUhlE67LB2ZRS ui4psi7VAqnBxlLpPWMcjLW2/0/QXn1up0dICcG8M6/jWjCGceh5MAe4yvL5RrHR38ofM7 9VSQq4F784UqYw0VoJd0WtI0ksBmG2fJTJ+WT5rgmEJpv0Vi6++8RkjRGfNIVg== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Joseph Turner To: Ihor Radchenko Cc: emacs-orgmode@gnu.org, Adam Porter Subject: Re: Should org-link-parser add type "file" when link has no "file:" prefix? Date: Sat, 13 Jan 2024 23:10:09 -0800 In-reply-to: <87ttnvan3m.fsf@localhost> Message-ID: <87v87v0zno.fsf@ushin.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=95.215.58.186; envelope-from=joseph@ushin.org; helo=out-186.mta1.migadu.com X-Spam_score_int: -7 X-Spam_score: -0.8 X-Spam_bar: / X-Spam_report: (-0.8 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_24_48=1.34, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -5.88 X-Migadu-Queue-Id: 997C4716CE X-Spam-Score: -5.88 X-Migadu-Scanner: mx11.migadu.com X-TUID: bQI0W6gssdQ/ --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ihor Radchenko writes: > Joseph Turner writes: > >>> See `org-open-file' IN-EMACS argument - we may use different handlers >>> to open file links. Currently, IN-EMACS can be 'system or 'emacs. But >>> nothing stops us from adding more options. >> >> Thanks! Are you suggesting something like [[file+hyper:/README.org]] ? > > Yes. Thanks - that could be useful. >>> This will cause major issues when trying to export such links. >>> Except for HTML export that utilizes `org-html-link-use-abs-url', but >>> only for relative links. >> >> Yes, there are many users who rely on [[file:/index.html]] exporting to >> instead of . > > This is not what Org HTML export does. Only relative links are affected > by `org-html-link-use-abs-url': > > Documentation > Should we prepend relative links with HTML_LINK_HOME? > > Absolute links always remain absolute. You're right. I just meant that ox-html should keep the existing behavior when exporting implicit file: links. Many websites would break if implicit file: links started exporting as . >>> Why not make [[hyper:/README.org]] use the "default" hyperdrive the >>> Org file belongs to. >> >> I'd like for users to be able to take an existing directory of Org mode >> documents and copy them all into a hyperdrive. I think the least >> surprising behavior is for the links between those files to continue >> working. Perhaps the best option is for hyperdrive.el to make all "file" >> type links, explicit or not, point to other files inside the hyperdrive? >> >> In that case, there would be no way for Org mode files in a hyperdrive >> to point to the local filesystem. Similarly, when Org documents are >> exported to HTML, there's no way to export . > > May you please elaborate? How is hyperdrive directory different from > local directory? On disk, hyperdrive data is stored by hash prefixes like so: /home/joseph/.local/share/hyper-gateway-nodejs/cores/ =E2=94=94=E2=94=80=E2=94=80 00 =E2=94=9C=E2=94=80=E2=94=80 6a =E2=94=82=C2=A0=C2=A0 =E2=94=94=E2=94=80=E2=94=80 006ae0628e1fad7c357fd= 4a1c6103d37bcb70797c6f0dba77c261871306b16b3 =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 bitfield =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 data =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 oplog =E2=94=82=C2=A0=C2=A0 =E2=94=94=E2=94=80=E2=94=80 tree =E2=94=94=E2=94=80=E2=94=80 de =E2=94=94=E2=94=80=E2=94=80 00de65a26162bbaad8f97bb89e81856ac1dd6a1= bc10a46f06086b4a25b244ad5 =E2=94=9C=E2=94=80=E2=94=80 data =E2=94=9C=E2=94=80=E2=94=80 oplog =E2=94=94=E2=94=80=E2=94=80 tree This is similar to the way .git/objects/ directories are structured. Of course, inspecting the storage directories of this kind with Dired does not provide a meaningful UI. Special software is required for users to explore and open the hyperdrive "directories" and "files". To push the git analogy further, the way hyperdrive-find-file is like magit-find-file. Both use an external program, git or hyper-gateway, to pick out the correct data and present it to Emacs as if it were a file. Does that answer your question? >>> For example, see WIP patch where we expose setting id: link properties: >>> https://list.orgmode.org/orgmode/c98a38b0-6dea-4b5c-b00f-a39ea922537f@a= pp.fastmail.com/ >> >> How would the :follow function for "file:" links get access to the link >> search option? IIUC, `org-link-open' handles "file:" links specially be= cause >> they require >> >> (org-element-property :search-option link) > > :follow functions are passed both path and search option. How is the search option passed in? IIUC in org-link-open, the path argument passed in has no search option: (funcall (org-link-get-parameter type :follow) path arg) By the way, I think this minor improvement could be made at the bottom of org-link-open: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-lisp-ol.el-org-link-open-Use-let-bound-follow-functi.patch >From 0c83446f16441df39618e43f964e18f672205d55 Mon Sep 17 00:00:00 2001 From: Joseph Turner Date: Mon, 15 Jan 2024 00:24:30 -0800 Subject: [PATCH] lisp/ol.el (org-link-open): Use let-bound :follow function --- lisp/ol.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/ol.el b/lisp/ol.el index 779175403..9bc2f5fb0 100644 --- a/lisp/ol.el +++ b/lisp/ol.el @@ -1125,9 +1125,9 @@ (defun org-link-open (link &optional arg) ;; argument, as it was mandatory before Org 9.4. This is ;; deprecated, but support it for now. (condition-case nil - (funcall (org-link-get-parameter type :follow) path arg) + (funcall f path arg) (wrong-number-of-arguments - (funcall (org-link-get-parameter type :follow) path))))))))) + (funcall f path))))))))) (defun org-link-open-from-string (s &optional arg) "Open a link in the string S, as if it was in Org mode. -- 2.41.0 --=-=-= Content-Type: text/plain Thank you! Joseph --=-=-=--