From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 2JsoNkNWYWPBZgEAbAwnHQ (envelope-from ) for ; Tue, 01 Nov 2022 18:24:19 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id MM8kNkNWYWM0mgAA9RJhRA (envelope-from ) for ; Tue, 01 Nov 2022 18:24:19 +0100 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 A67E41464D for ; Tue, 1 Nov 2022 18:24:19 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opt2H-00021A-K7; Tue, 01 Nov 2022 11:18:41 -0400 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 1opt2F-00020J-On for emacs-orgmode@gnu.org; Tue, 01 Nov 2022 11:18:39 -0400 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opt2B-0004HK-PL for emacs-orgmode@gnu.org; Tue, 01 Nov 2022 11:18:39 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1opt29-0003if-I5 for emacs-orgmode@gnu.org; Tue, 01 Nov 2022 16:18:33 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: org-export: How to handle links to the exported file? Date: Tue, 1 Nov 2022 22:18:25 +0700 Message-ID: References: <877d0xfu9m.fsf@localhost> <877d0wayn8.fsf@localhost> <87lep97tnn.fsf@localhost> <87ilkc30wd.fsf@localhost> <87ilk0jzab.fsf@localhost> <87fsf3jke2.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Content-Language: en-US In-Reply-To: <87fsf3jke2.fsf@localhost> Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 26 X-Spam_score: 2.6 X-Spam_bar: ++ X-Spam_report: (2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1667323459; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=2dAiF1FjJWMxCBIdix29oeABjEIHaI0/3eaS9VNtMPs=; b=A8rIWgNkDQaOneTGjz0OSGsBbd+CI9+I/3n4nyQgqNjkAygwxj5RMDGVv4lhjcAWWBCqKP KJjDqPwt7t7AFraocaxvhL8pIuUGLEJbWEOdNjG3lSi+SBXyLK9fYPjqL66XUlRcGx2FsY n+wjHq+D8db43ldjGH4oLjzgG2mUuBUkP2itefBwaUh2zK6YkMfWmOpjTomcwolBqQp7UW tLXdRlq8AgC7dMSs1ghPtHXLMAT7NsDnLFkrx16je6IK/p6mLH7Gl+Y2GrvTSaCTP0RkY3 8eXtM/7KwdL0E8/Nh20iMNDPXKyE9CQiB388MaTvCuDXhYaE8vLM1RP0K3IUqQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667323459; a=rsa-sha256; cv=none; b=L5c7AzTmj6wZkRS+QnmDntZX5bwf0oAgxIgl+/NE5Twj+lA1tOJNpk+kaqHp8XNYHwUXjj wK7NLp1x7kJkw8Hjyezjfbm/E0lZ/aUDIM2Pg5XVO4nfaIcLlWM3y1WcrHEDIJXL5R6cnH LlqTVayCxuaY8uvXSNelCuYAsWxCJ9vIP5bQG4UikfD9ikhRVHnAIqOLFion2xkY4yMjzq jLiRkYiEdEapIyhvNdQfreAVU/Cx5o1BoRbA77aLvjstjeRLkKxr8LqNimGKptwy1Kp5mu Nd0zD9V+x/nZLeA2zlldEIUzl4yKxVB/ZtZwqKppq5eAEsN/26+avJhqwcbaHQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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" X-Migadu-Spam-Score: 3.72 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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" X-Migadu-Queue-Id: A67E41464D X-Spam-Score: 3.72 X-Migadu-Scanner: scn1.migadu.com X-TUID: SL16er/wl/2C On 01/11/2022 12:47, Ihor Radchenko wrote: > Max Nikulin writes: >> >> In HTML top or #top works as a link to the beginning of >> the document. I am curious if ODF has a similar feature. I mean ID at >> the top of the same file that generates file.org link instead of >> internal one for both HTML and ODF formats. > > Currently, we have no convention. > > In Org mode: > - [[file:/path/to/self]] links will do nothing, or follow org-file-apps. > - [[if:document-property-drawer-id]] links will move point to the top > > What about export? > - Should we treat links as file links to the original Org file? > (One can argue that it is a good default is one wants to write > something like: "This document has been generated from > file:/link/to/source.org" > - Should we treat them as "jump to top", similar to our id: link > behaviour in Org? > > I'd say that retaining the current behaviour will be the most reasonable. From my point of view "id:" link to the top of the same file should be exported as a link to the beginning of the exported document. - ox-odt creates a link to file.org - ox-html to file.html#ID-... I believe in both cases it should be just "#ID-..." or "#top" in the case of HTML. > I do not see much utility to linking to exported document itself, while > I do see a utility to link to the original file. I forgot about "link to source" use case. I have no idea how to distinguish cases when a user links .org source files or exported files (currently works for HTML only). It is applicable to both same and other files. Ideally user should have choice for each link.