From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id UMCLHbCGpmVZQQAA62LTzQ:P1 (envelope-from ) for ; Tue, 16 Jan 2024 14:37:52 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id UMCLHbCGpmVZQQAA62LTzQ (envelope-from ) for ; Tue, 16 Jan 2024 14:37:52 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; none 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 6C02351ED7 for ; Tue, 16 Jan 2024 14:37:52 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rPjcq-00074S-1s; Tue, 16 Jan 2024 08:37:08 -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 1rPjcn-00074H-Dv for emacs-orgmode@gnu.org; Tue, 16 Jan 2024 08:37:06 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rPjcl-0006C1-2o for emacs-orgmode@gnu.org; Tue, 16 Jan 2024 08:37:05 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 241EF240105 for ; Tue, 16 Jan 2024 14:36:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1705412219; bh=gZDSfpf5zkaTXwpPF4cYptF2uhjQqlrRU1uOrBIA/YM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=IhEigmOwbu5BHoz4/nP56ACfI7VrPI6JnOrGoR1Wy4/kOoiwcaQlJWASVhywktlEZ kSTd90h5Vn53uSMnsLgZPYTBh9L5MHkHRs+PAjxelXuKDwrFtijvKmWBbfbGTxwMf5 EpnHd9A+phCpZViDUiLi7v4ZckcynKxvFrcvqwzSobspuvVX64KysHFZw2baGO2/lD lLNmyv+no643EkPir2fctetVa7homQyu7GGdBt1NSEwVqZkgX1FGeuP4Z3shG2a0C0 O7qAPnirOliFgsXqXfEunw+kqNOsz4MrSrizddORyXDm9i6Q4VpzvizuDuMqxY01xO dA2UAN2M50C+w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TDqmp0mz1z6tm8; Tue, 16 Jan 2024 14:36:57 +0100 (CET) From: Ihor Radchenko To: Joseph Turner Cc: emacs-orgmode@gnu.org, Adam Porter Subject: Re: Should org-link-parser add type "file" when link has no "file:" prefix? In-Reply-To: <87v87v0zno.fsf@ushin.org> References: <87o7e9ei3p.fsf@ushin.org> <87wmsx3vyc.fsf@localhost> <87a5pro14q.fsf@ushin.org> <87le9a76mk.fsf@localhost> <87wmss1r51.fsf@ushin.org> <87ttnvan3m.fsf@localhost> <87v87v0zno.fsf@ushin.org> Date: Tue, 16 Jan 2024 13:40:11 +0000 Message-ID: <87le8pl7lw.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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: -4.00 X-Migadu-Scanner: mx13.migadu.com X-Spam-Score: -4.00 X-Migadu-Queue-Id: 6C02351ED7 X-TUID: Bj0TPWSHuUrz Joseph Turner writes: >>> 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 "fil= e" >>> 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 > ... > This is similar to the way .git/objects/ directories are structured. > ... > Does that answer your question? Not really. May you please provide an example with an Org file containing file links and how you envision to transform them? Will they be transformed depending on the directory the Org file is located in? >>> (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) You are right. What we can do then is pass an extra argument to :follow function - the link object. That way, :follow function can get all the information it needs. > By the way, I think this minor improvement could be made at the bottom > of org-link-open: > > 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 functi= on Thanks! Applied, onto main; I added TINYCHANGE cookie to the commit message. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=3D0254854ee --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at