From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id kN95IFGRTmVvsAAAauVa8A:P1 (envelope-from ) for ; Fri, 10 Nov 2023 21:23:45 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id kN95IFGRTmVvsAAAauVa8A (envelope-from ) for ; Fri, 10 Nov 2023 21:23:45 +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 71E7535019 for ; Fri, 10 Nov 2023 21:23:45 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=excalamus.com header.s=zmail header.b=cFAQlXLS; dmarc=none; arc=pass ("zohomail.com:s=zohoarc:i=1"); 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=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1699647825; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=To+YhvIxMJ6lqph+6Ob3zQkK5X3veM9jDfaHuiM/42k=; b=En+Hr7JutbWjg4fWC7gRVGFdSchCzqjXdQHzr+Hly+gGbljb/ftgEWthzTTRriqmTO3SiY rnv2t+ineWS6WEKw6ITxfj8RA4TJ7mgBY3H/xVOgW1HKYUN+/NH7W6dqoviV3bRtMrG/op QGbvQwIrg9LWgZ59Bs4BWxbU1WfYT++Ob7H3E/9u+R2NH0Ka+MYeKqgg64q6geuGvtvJal shzzge5E+to3eDQ3zyKjWcgKNxqEg/1y63M0NT7Tl8MjqEaZeM3lxzVwPO4WZum3X7XISb RJiGyQ6yqzf9ZkrV+R4tH8uyzWRRPwbj7NOtOxyxILT6dkFwGtQJdHzo0tvuYg== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=excalamus.com header.s=zmail header.b=cFAQlXLS; dmarc=none; arc=pass ("zohomail.com:s=zohoarc:i=1"); 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-Seal: i=2; s=key1; d=yhetil.org; t=1699647825; a=rsa-sha256; cv=pass; b=S5ZaTqCr+psjdLwSfg6Zm4nbD5O6Hj1IojmKwV189Ksi3bZbXBEJsSv/aWEgEHW9TtAH/d n7YmwDpUNxAyfETrBOXqGJPAxJjBP4xovPIW/jzTJQMUnEcnHM0hoqkemxlF5CaZg0oPxv R82qsuqnTlECCjAPoMBTa6DSzaxvWVWWZtB/1qdqSRREoY3jWB3QWFpD0io6b0KnhyMjEl e9WJv/HcOWm+Xp5IE7RpDB1cCwC3dgtAJLbtfNXdOz2FfPWd1Ma3hjDpsR9gR3X/2rMZ7A O68wRbTuCPBwnTs78Hg2/zoIJtZ+sQvvKMPsfoAXB4CYYjnUzSUb/VmH4FAPcw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r1Y29-0002Pv-J2; Fri, 10 Nov 2023 15:23:17 -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 1r1Y27-0002Pj-1t for emacs-orgmode@gnu.org; Fri, 10 Nov 2023 15:23:15 -0500 Received: from sender4-op-o14.zoho.com ([136.143.188.14]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r1Y25-0007zc-Ej for emacs-orgmode@gnu.org; Fri, 10 Nov 2023 15:23:14 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1699647788; cv=none; d=zohomail.com; s=zohoarc; b=b+jeCoEAslir8SDrtcmU1BPkPVdL7DrkfI79RggpDFBQAk3rDYuNDzxN284RWu8LVGv8jrKCpdBFo8wcNHltFCGoMweRaTbqoMUrgUNNcr2u5Lbkqj8ywsB9SbK+HETIrS0YH87y85hqVtdSjQApAG5ERn6T9dvLZt/10LMYxJA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699647788; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=To+YhvIxMJ6lqph+6Ob3zQkK5X3veM9jDfaHuiM/42k=; b=DpDQjjwg9PE8xrTPDFK+e6tnGALrlhFKINxCZYCdnN5VNJu36wHm0CTQaRIPkNRftRdy3bJRjO0VPCcwaQArsbEdNb4fNYGuDUuGx69vyGILZSyOIogJsAFxHosaerUPxh3E4/qkjVxE84Wap4nfBAORC4/bQdeIzG/B0RldbJY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=excalamus.com; spf=pass smtp.mailfrom=matt@excalamus.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1699647788; s=zmail; d=excalamus.com; i=matt@excalamus.com; h=Date:Date:From:From:To:To:Message-ID:In-Reply-To:Subject:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To:Cc; bh=To+YhvIxMJ6lqph+6Ob3zQkK5X3veM9jDfaHuiM/42k=; b=cFAQlXLShQYqJUPg+y48AUiwiHJRdBq5EZpSW83hdHyWeGPw1TbNEh5RL4V2/RPJ DQEzqWC5P8CxgA7Cp3l2Z+WMtSJyYDOa93P6gN2QU8R109hMIgABKjJyMUx4jkBUGW8 xA9g0DZsT5faTdwQG6eOySfVUit4L7PllgQ47gsY= Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1699647787038628.0992425346438; Fri, 10 Nov 2023 12:23:07 -0800 (PST) Date: Fri, 10 Nov 2023 21:23:06 +0100 From: Matt To: "emacs-orgmode" Message-ID: <18bbae70fce.bef9a7e11496525.6297275205814890900@excalamus.com> In-Reply-To: Subject: Replace org link with footnote MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail Received-SPF: pass client-ip=136.143.188.14; envelope-from=matt@excalamus.com; helo=sender4-op-o14.zoho.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, RCVD_IN_DNSWL_NONE=-0.0001, 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: -7.13 X-Spam-Score: -7.13 X-Migadu-Queue-Id: 71E7535019 X-Migadu-Scanner: mx10.migadu.com X-TUID: UnRfY/m3/yhL Here's a quick hack to replace an Org link with a footnote. Maybe a fun first commit for someone would be to update `org-footnote-new` to accept optional LABEL and DEFINITION arguments that allow a footnote to be created programmatically? (defun my-replace-link-with-footnote () "Replace an org link with a footnote. Place the link target in the footnote and the description in the location of the original Org link." (interactive) (if (org-in-regexp org-link-bracket-re 1) (save-excursion (let ((remove (list (match-beginning 0) (match-end 0))) (link (org-match-string-no-properties 1)) (description ; link is description (if (match-end 2) (org-match-string-no-properties 2) (org-match-string-no-properties 1)))) (apply 'delete-region remove) ;; replaces link with footnote and jumps to footnote (call-interactively 'org-footnote-new nil) (insert " " link) (beginning-of-line) ;; follow link back to original point (org-open-at-point) (insert description)))))