From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.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 ANENOhdgp2XqDgAAqHPOHw:P1 (envelope-from ) for ; Wed, 17 Jan 2024 06:05:28 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id ANENOhdgp2XqDgAAqHPOHw (envelope-from ) for ; Wed, 17 Jan 2024 06:05:28 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=CFwPua8O; 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=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1705467927; h=from:from:sender:sender:reply-to: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=ghlDM1IyKCNzoKIUTY2TnxahQ2tAf41rYG9uImWvkiY=; b=bq96riWTe6wArTYm2fg2QQK0aaq+RlVyf5M2Rc+IWMl28le0MRuTPn8lbSX+4avBOj+T+r xIiFsFF+38Zp1UqhKVwd1VgOUih0KdmSlUtghvRoa5Gv5BQa2tcgUw+U/vw0YRnZdXSAk+ f7/8Qza1M6ZzOql4ENT3OJi1nZ/3LmOtWOUprK62teinPu+CnbzZAmWMxQMAxHHVrKa+0v Ywqcv+8IMovKdBapOXOu2uWc1ExyMLJaKhdoZr4GspiZghWdV29vaHbWf7WBnIriQc1Xw1 HzpnGgcPDQM/5rrn2o0PhbpEU/ZouCspLmI3nkLl7dGK/hknIwC2PUW2TN/Feg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=CFwPua8O; 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=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1705467927; a=rsa-sha256; cv=none; b=QW5A9BkbG0C+TXWuk+Z5c8gtOg1jA4H6OEpi+PpoSzoaKW/WzmOKjIPYt+a8MBLghGULze kQP0xqZCHQsT5pUnpk3wAcqADM6wDyoDyh7W5lyJqXVcCen6r0wTVN431EE/QEZx22BBju zQ9efYYaHb3fF7m9Ns1uy2oOyh+DxKbq5cxMbNyrMAZRrWeBW4lTVzQnqXE1TXrZNqPJuN 3pcvgBMHzSVgqGeOno6DG7MaLNGxnOQOMaf840MLbrfsmKZ07Ba8Fcv34m9fMFFRHIu4Se 6iIOizhTTC1lyiGC7R+9tcUJWq1KFV6a+M1hpE5ByQ8FvWid1KZUlaePS/iRdA== 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 A9E20172C2 for ; Wed, 17 Jan 2024 06:05:27 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rPy6K-0005SM-5O; Wed, 17 Jan 2024 00:04:32 -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 1rPy6G-0005Qz-AF for emacs-orgmode@gnu.org; Wed, 17 Jan 2024 00:04:28 -0500 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rPy6C-0007D6-Tt for emacs-orgmode@gnu.org; Wed, 17 Jan 2024 00:04:27 -0500 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1d50d0c98c3so77475425ad.1 for ; Tue, 16 Jan 2024 21:04:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705467863; x=1706072663; darn=gnu.org; h=mime-version:in-reply-to:reply-to:date:subject:cc:to:from :user-agent:references:message-id:from:to:cc:subject:date:message-id :reply-to; bh=ghlDM1IyKCNzoKIUTY2TnxahQ2tAf41rYG9uImWvkiY=; b=CFwPua8OMZ1pc9CqNIEDcq+DxFhyr1dGZruXtRlEj6tbrQwlk9KguqOAgMqmuKwtj6 A+L1h4e8RQaWGkD1VI9Hp1DwJ7+0v73iyX9k5c1ulRPmoFWffqKuT1KAWq2Hs+HUGVB2 B8rZ/99h6r0NgyOgCvpOkzjUc2MJUWKugvHko/r+k9tzyGwp46FEfBJIbsSc2PwMxfQP tUy2iJRTD+WUSrH4zXLT4KZ5HHUNZUu1ebodbODlv3V2z8ipG4DURfrAyw5hKIXfMgPl gHs/VclAg9vQi+njiXoAUTuLwKCgVHZHr/W1DjovhrUsPhHXxMAZvT03DUPeS9PUaKz+ ac5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705467863; x=1706072663; h=mime-version:in-reply-to:reply-to:date:subject:cc:to:from :user-agent:references:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ghlDM1IyKCNzoKIUTY2TnxahQ2tAf41rYG9uImWvkiY=; b=pCPEDtrIx8kyrTVYhAy1/wYhpT4Jb4B0FNmwXiM0efygmT8AKrjploGGUQmzhM6iQz g2ZHPlqZSt2OsewDrowKm7rG3edwmGquVAZTRnfb1GzB/LvXX+/1fp6DBImuqQbLyeu0 Tr/CncNg/LdHoPI94GX8ov14stdQTBjmiqrkk4EgWl90a8qK5GMYF0ArOixNqXGgFKDs UimjAWpR2Vpzg5GJUDeBFODKtcWuCAjItka7TbJv2YyvfMZQ+IYbDQFwRgN/u+tUsaKL dZpTllOLEjdnX/MRpNE+5yEy5tDPH0An6DSPVyl0k61l1lgKmwDxb7t5Vg9EaV1iP4A8 xwJw== X-Gm-Message-State: AOJu0YycSnblS3zxPxf3pRHhBxR8G4ik0Ml5fiRLsglZpzY+KqkzWfMO RB6n5heGFEHzZibod9fMaRaSIFIZ3pGbf6o= X-Google-Smtp-Source: AGHT+IFEA3mJ0NCgqZHCjj7yR+GAyp/elSVyU7TYZ26xCLKUpoNokAWBARiqdnoinlZmDMC7tYQ6WQ== X-Received: by 2002:a17:902:dac7:b0:1d3:f344:6b01 with SMTP id q7-20020a170902dac700b001d3f3446b01mr504440plx.3.1705467862413; Tue, 16 Jan 2024 21:04:22 -0800 (PST) Received: from Mac-mini.local ([39.171.199.207]) by smtp.gmail.com with ESMTPSA id ix14-20020a170902f80e00b001d5f1005096sm1441005plb.55.2024.01.16.21.04.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Jan 2024 21:04:21 -0800 (PST) Message-ID: <65a75fd5.170a0220.b5db2.7472@mx.google.com> X-Google-Original-Message-ID: Received: by Mac-mini.local (Postfix, from userid 501) id 1C956BA708A7; Wed, 17 Jan 2024 13:04:12 +0800 (CST) References: <871qahl0un.fsf@localhost> User-agent: mu4e 1.11.6; emacs 30.0.50 From: "Christopher M. Miles" To: Ihor Radchenko Cc: =?utf-8?B?6KW/IOmhvg==?= , emacs-orgmode@gnu.org Subject: Re: [POLL] Change calling convention for when `org-link-file-path-type' is set to custom function (was: Enhancement Proposal for 'org-link-file-path-type' Behavior) Date: Wed, 17 Jan 2024 12:59:34 +0800 In-reply-to: <871qahl0un.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=numbchild@gmail.com; helo=mail-pl1-x635.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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: , Reply-To: numbchild@gmail.com 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: -10.55 X-Migadu-Scanner: mx13.migadu.com X-Spam-Score: -10.55 X-Migadu-Queue-Id: A9E20172C2 X-TUID: P8coxJHuhkUg --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable +1 for this propose. I have one situation need this feature. Assume a file structure like bellowing: #+begin_example `- folder-1 `- file-1.org `- folder-1.2 ` file-1.2.1.org #+end_example When I try to add link of "file-1.org" in "file-1.2.1.org", based on my custom option `org-link-file-path-type' value `adaptive'. The link will become a full-path link. But I want link to be relative to current Org file path. The file link path should be [[file:../file-1.org]] instead of [[file:folder-1/file-1.org]]. I hope I can use a custom function in conditions to decide the file path. Ihor Radchenko writes: > =E8=A5=BF =E9=A1=BE writes: > >> I'd like to suggest a small enhancement to the >> 'org-link-file-path-type' option. When set to 'function', it currently >> passes an absolute path to the user's custom function. This limits >> flexibility as the original path input is not available to the >> function. >> >> For better customization, I propose passing the raw path to the >> function. Users needing an absolute path could use 'expand-file-name' >> within their function. > > Thanks for the suggestion! > > This makes sense - the current approach with passing absolute path is > indeed limiting the information passed to the custom function. > > The docstring is also quite ambiguous about what is passed as an > argument: > > org-link-file-path-type is a customizable variable defined in ol.el. > <...> > Alternatively, users may supply a custom function that takes the > full filename as an argument and returns the path. > > "full filename" may or may not mean "absolute filename". > > However, changing the absolute path to "as is" path will technically be > breaking. > > I cannot find any actual uses of custom function value for > `org-link-file-path-type' in the wild, so I am leaning towards going > ahead with this (minor) breaking change. > > Yet, I am starting a poll to give users who may be affected a chance to > chime in. =2D-=20 [ stardiviner ] I try to make every word tell the meaning that I want to express without mi= sunderstanding. Blog: https://stardiviner.github.io/ IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAmWnX8kACgkQG13xyVro msPZHwf/VJjrByIpFSefFF/opWH5lrf17neTzDhCiox1Xtg7ZBpQp5H4uNaUJ/K5 adrsGiZiLssFg8sHh7F/BhL8DGg5cSe4TiI1iJSZBa8cX7EhmmrmBn/+wILLUDV8 PuUaBBda5JeQUbBpKk7QrVHxQZHGGtR99VLC1fWeFUelw0RwKB0p5juT5/pgffOE BIiklsnabJwnGxEfRTa2tmYZtQ44X7GDE2qJ79jw4KQht606GjGUOaAM7Nt9cbAl JSCOif656lof5kkzjB88xFqHu0jYPWnsWDfdar3G6hkXrQj/5JIyzmvKX3ZrE2oL 0OhBR4DVYErtkWM+mF/2rOuZtXAddg== =IRNB -----END PGP SIGNATURE----- --=-=-=--