From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id KHgYCwJodGQQUgAASxT56A (envelope-from ) for ; Mon, 29 May 2023 10:53:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 2Hr3CgJodGTVMwEA9RJhRA (envelope-from ) for ; Mon, 29 May 2023 10:53:22 +0200 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 C7860C9CD for ; Mon, 29 May 2023 10:53:21 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q3Ybv-0000EW-K3; Mon, 29 May 2023 04:52:15 -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 1q3Ybp-0000Ax-Pn for emacs-orgmode@gnu.org; Mon, 29 May 2023 04:52:11 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q3Ybn-00052y-0e for emacs-orgmode@gnu.org; Mon, 29 May 2023 04:52:09 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 155AC240027 for ; Mon, 29 May 2023 10:52:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1685350325; bh=uPNVtZxlK9aVSIbHAhYJlmZKfN6kkmfH4H8giXFi+tc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=SFAxbJ/oDVmr4E6JjLfCD2bgXdS2DcIRaQO+ceevHjksyLVariJf0K3b9unBgabdy 8dGoevnvBDsqmFnmmkDcfox9zf+6MsObQVPyM7dAEdlU1sJGIATJ/X9ErIWVyvU9vv l6H6dCY/MqzPEidRF5ICE1+uGusHpDJunNw0qFMFPaczcEsoul9G2Vxbrg2Zuj7yn3 xM3HxRywascBHF9YJRWYsrlfOPj2VvU1TY/FkCz2VJNdopMoBU854HCX8PYvnYGfzW xIaaCgwVMaBCNeJUYCKLfypUP2PfY645OTMUZfeqH7jDLVRZuQWDNgXbK5Km2pppwG iF96kGolONjew== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QV8R84vMhz6tx8; Mon, 29 May 2023 10:52:04 +0200 (CEST) From: Ihor Radchenko To: Sergei Kosyrev Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] org-id: implement arbitrary cross-file references In-Reply-To: References: Date: Mon, 29 May 2023 08:52:03 +0000 Message-ID: <87353fwmdo.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.65; envelope-from=yantar92@posteo.net; helo=mout01.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, 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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1685350402; a=rsa-sha256; cv=none; b=WrVvLk5D/N8uAdIeBDqOa5ZI3pTCLUwVJjXwsAxuSCgY8Kp0wRoephmGbzY8LOVQPxv7Fc nt1/O6tHdeYZhDqqzfX+JErNz/Uh6MvXyL/ubAPiLB7kQktCtvoKSpcDU6KDKEoRoxAa+h pjqgsdBCmAQvojXHIV0b2hZpkm/2cOr3vnFeECVgrgzgNuKCHe7pn9HtcW83Ks1Ywdkavv V5WFmBWKAiHjgxjPXnmUlMjM0UN1BrGv2f3B0p5ZT98QgE/lAyUBKGXCO9ddAPLOp9jfqa Bk+RMcqcyYgDGFwbMxFDdljpdtw2GT8smdb+rPasdmkvv90gZf39PGwdk7DCJQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="SFAxbJ/o"; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1685350402; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=IBYtiTXlwHsNS+8NVY7GOh2pc/UuXQ+YTNYhQfGkN4k=; b=SCyeZnc+3CX2hPSEPTOFq2qthdy23JiuYrI+b4oAE6SERSgh9WRwoye8svLV/3MeczZhCZ VVOCiqZ5kismt6cc1gBekCHv2+96r4IqBweLGn325GvxMhGkrc/MgF3VTZZO4oUo6xJI4f nqHv0Ta4y4xdyzz2TVWthNuWpVkY5GLmO5KbuN8I/RQosASCZVS35zzL8hQ66VE72KKoeh yTEHop4wBfIywXlFZpR0an5U4YBNrGRL76nfqi4y90tm/PB5barRb9gnV7ckxWdPUGu8Bc k4KNvJWfNIcpFT5V9/aaGGWPDsnDi3QKj4hiW3nUTARyPKOwhWQmhU0Gduf2vw== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="SFAxbJ/o"; dmarc=pass (policy=none) header.from=posteo.net; 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: -6.11 X-Spam-Score: -6.11 X-Migadu-Queue-Id: C7860C9CD X-TUID: qHHyK0F/18BI Sergei Kosyrev writes: > Fair enough -- I'm open to sign the FSF copyright assignment. Thanks for your interest to contribute to Org mode! See https://orgmode.org/worg/org-contribute.html#copyright for the details how to get started with FSF copyright assignment. FSF generally replies within 5 working days. If not, let us know. > +#+BEGIN_src org > +#+TBLFM: $2=3D'(identity remote(file:./org-wile-with-tables.org,@@#$Valu= e)) > +#+END_src Would it not be more reasonable to allow generic file links here? Like in 4.4 External Links section of the manual: =E2=80=98file:projects.org=E2=80=99 =E2=80=98file:projects.org::some words=E2=80=99 (text search)(= 1) =E2=80=98file:projects.org::*task title=E2=80=99 (headline sea= rch) =E2=80=98file:projects.org::#custom-id=E2=80=99 (headline sear= ch) > +(defun org-id-parse-remote-table-ref (refstr) > + (save-match-data > + (when-let* ((match (string-match "^file:\\([^:]+\\)\\(\\|:.+\\)$" re= fstr)) > + (m1 (match-string 1 refstr)) > + (m2 (match-string 2 refstr)) > + (filename (cl-remove-if (lambda (c) (member c '(40 41))) > + (org-table-formula-substitute-na= mes m1))) > + (table-name (org-table-formula-substitute-names m2))) > + (list filename table-name)))) The format of file:... has nothing at all to do with org-id.el library. You should instead modify how org-table.el parses remote references instead of abusing ID resolution mechanisms. > + (let* ((ident (cl-subseq table-id 1)) > + (id-match (search-forward (concat "#= +NAME: " ident) nil t))) > + (unless id-match > + (error "org-id-find-remote: file \"%s\"= has no table with NAME \"%s\"." file ident)) Be aware that not all the things with #+NAME in Org files are tables. You can use `org-element-at-point' to check element type you are looking at. > - org-table-column-names org-table-column-name-regexp > + org-table-column-names (org-table-column-name-regexp org-table= -column-name-regexp) I fail to see the reason behind this change. May you explain why you had to protect the global value here? --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at