From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id GJqXGruJbGSK3wAASxT56A (envelope-from ) for ; Tue, 23 May 2023 11:39:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id OCqTGbuJbGTrTQEAG6o9tA (envelope-from ) for ; Tue, 23 May 2023 11:39:07 +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 E9C2E9C11 for ; Tue, 23 May 2023 11:39:06 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1OT4-0002iy-Sg; Tue, 23 May 2023 05:38:10 -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 1q1OT1-0002Mk-2a for emacs-orgmode@gnu.org; Tue, 23 May 2023 05:38:07 -0400 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1OSz-0007mz-0h for emacs-orgmode@gnu.org; Tue, 23 May 2023 05:38:06 -0400 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-96aae59bbd6so1328969266b.3 for ; Tue, 23 May 2023 02:38:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684834683; x=1687426683; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=PyXeyQYgKTaNQagaOu8/2AElJSid3coFnh2zMFjaJFc=; b=WZqMw8tHe5GBCTar2PMalAzRMbCgjdyb9sctP4+AwQ+owDM6TxVS5f+T5Kgqb35qbf pdBbKhoubSKpyNsTzfR3hjL1Yyyzx6PBvBMwcAHLOKw1Tl+VHLzI49gfK4ywrAjKoZlp 1xVhpo03W7staWgtAi7q71JIftrCKEOFb8XUkGzFWg51k5Xppuw5O6KqX2y5bOaC+LrF jXavAknmQz5DnDsyLOVpokHMy+EFeLE/ztf/UQa2zVCIzZjbUhAAYKhsPyRJvQ1pRznP 9berYb4+mz1cZ6r7gXGIEyw0WQmZ7bKarBIydBN3+kxFk3ZEfv9BCe0pGQJXbvNMJukS Gc5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684834683; x=1687426683; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PyXeyQYgKTaNQagaOu8/2AElJSid3coFnh2zMFjaJFc=; b=JQyHXEElxIlol9HT9AU/47EAdcAQaB1ylrbNCPuPrZPQSYmNBPct6I3h8sLVdDd1QR wdo+vPsvKdL2WUExGa9zedR1MykAPlQbL9JgslY+LE8LnDjYICrs/nJzrlVOb9KVuylO 2NB3+whFtVy/7Oe3rhW34XxV8lWcAuLK0Y3T2aMUR1Bm2XKwZfe8qc2aBDylqVfTtz0U 3tTLtpdHKc5i6+k1VJF+ApxuYeK/CbbsO7yVBFSnqNvl94EC9mVLOPpLX+zbDXo2osNf M+3t/995+2Pl69+3Dhev22DuMX7oiUb2w1n92iJW6V6+dUYAF6Dxiqc5ylNRLtUvQAQV Nxbw== X-Gm-Message-State: AC+VfDwFPz5MsV78joqyrL5sImrl/BXq+8gG1wfaDNb+MHf6/88EMZe5 SF+Vgj+rOcSogYOP1OnbE+VtEqmic3o= X-Google-Smtp-Source: ACHHUZ7CQ5SuciYv5Ov7zWi3ETDSHoYoa73DYncMtvB0D9t9e09MN10LG0Fh7M30zGH0ku9m17j+IQ== X-Received: by 2002:a17:907:6e19:b0:966:5a6c:752d with SMTP id sd25-20020a1709076e1900b009665a6c752dmr13987635ejc.20.1684834682495; Tue, 23 May 2023 02:38:02 -0700 (PDT) Received: from smtpclient.apple (host-79-3-211-141.business.telecomitalia.it. [79.3.211.141]) by smtp.gmail.com with ESMTPSA id p25-20020a1709060dd900b0096f67b55b0csm4225695eji.115.2023.05.23.02.38.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 May 2023 02:38:01 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.100.31\)) Subject: Re: [FR] Enhancing footnote managment (via indirect buffer)? From: Andrea Lazzarini In-Reply-To: <87fs7oo031.fsf@localhost> Date: Tue, 23 May 2023 11:38:00 +0200 Cc: emacs-orgmode@gnu.org Content-Transfer-Encoding: quoted-printable Message-Id: <84F2917E-1E26-41C3-BDC4-A130A78F650A@gmail.com> References: <914084EE-E301-483F-AE2A-960B3CB75497@gmail.com> <87o7mcoaht.fsf@localhost> <9C915190-B2C6-4F32-8A2F-A7E7DAAD1AFA@gmail.com> <87fs7oo031.fsf@localhost> To: Ihor Radchenko X-Mailer: Apple Mail (2.3696.100.31) Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=andrea.lazzarini1@gmail.com; helo=mail-ej1-x62f.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=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: , 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=1684834747; a=rsa-sha256; cv=none; b=ZfOH7Ga9U9DkkvUasJTvSX8P+NdJMZ/4RY8lqEa2+xjm9KQ73mUree9zCkhbpOQCEdqSY4 k2qeunigdi1ujj26wZ+7CN+ErsawYhaiELrvt8Tr01vTdo8rJ8467Y+3hZ2pk8RBE0rxBW ckc+ZrpCs/7CQg2GgT6T34LxIRBY/bmbndxc50hI/Ynnzw+Q9DG0s3TJZ70YA6x4CpNQke Dz+XEfuqJw2T/tucttkH+WT19Vno9Ckb08DAHVQHGtWdzSV6ZOA+ODu5tO2PwVxdBzKsqY gWvTJ5+icgkBfz+Ln9BtJEUR569FmFk/E9pX9czseJ+oBvKcilv5+Mo/hLQn/A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=WZqMw8tH; dmarc=pass (policy=none) header.from=gmail.com; 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=1684834747; 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=PyXeyQYgKTaNQagaOu8/2AElJSid3coFnh2zMFjaJFc=; b=c1SqYFXR7wo3cUpA7d80lKsarRnW1nsmy1Ph6eSrKpV0pD8AqDpgB3mN5/nmTuUj9GbgoP YPjeLV5UYsFYVDKmX676Zehe7l8iATyTA9YXHAsfwlylx89lRalDM5H/lGc+/ci+UvKx/i mjkwp/8nLUW01lsP9L7J1K+yL1n5skdgFQakwGn2O2fA7cZLzrtVoPQoRz5r4VM19YFlWn d6kUFUDIcHODr+JrYwWtgNTjOZyCDZ6xiUK4LP4P8zvWpFFxAyzcfKRI30TSCb0b0ZG6BU 0qPCaip09qtnRUAaV4gTEwj2gu8FT+okhnGeFuoZLT10h1n3LnfJvSgx4i0Geg== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=WZqMw8tH; dmarc=pass (policy=none) header.from=gmail.com; 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: -4.83 X-Spam-Score: -4.83 X-Migadu-Queue-Id: E9C2E9C11 X-TUID: w/R8TSqsZhmT > Il giorno 22 mag 2023, alle ore 17:30, Ihor Radchenko = ha scritto: >=20 > Andrea Lazzarini writes: >=20 >> Eldoc (or tooltips) could be great for previewing: I'm going to give = them a try >> and to see how they might be integrated in an academic writing = workflow. >> I wander if they would maintain buffer-specific highlighting = though... >=20 > AFAIK, Eldoc expects a function that will return the string to be > displayed. You can use `font-lock-ensure' to fontify the footnote > definition you need to display. Then, the copied string will hold the > fontification as it would be in Org mode buffer. >=20 Ok, very good. This is my first attempt at it and, apparently, it works. (setq eldoc-echo-area-use-multiline-p nil) (defun org-footnote-eldoc-function (callback &rest _ignored) "Return the definition of the footnote at point for Eldoc." (when (org-footnote-at-reference-p) (let* ((footnote-label (car (org-footnote-at-reference-p))) (footnote-definition (org-footnote-get-definition = footnote-label)) (start-def (nth 1 footnote-definition)) (end-def (nth 2 footnote-definition))) (when footnote-definition (font-lock-ensure start-def end-def) (format "%s" (buffer-substring start-def end-def)))))) (defun org-footnote-enable-eldoc () "Enable Eldoc support for Org Mode footnotes." (add-hook 'eldoc-documentation-functions #'org-footnote-eldoc-function = nil t)) (add-hook 'org-mode-hook #'org-footnote-enable-eldoc) I now wonder if there is a way to prevent changing = eldoc-echo-area-use-multiline-p to nil globally to prevent footnotes from appearing there and not only = in the eldoc-doc-buffer. Provided this might be considered useful, where could such a feature be implemented? I checked org-eldoc.el, but it looks like it aims at providing programming documentation inside org-mode rather than implementing specific org-oriented features. >>> "Eeasier Footnote Deletion": How is it different from = `org-footnote-delete'? >>>=20 >> That was nothing more than a simple wrapper for org-footnote-delete, = which >> is not an interactive function: btw, I am curious to know if there is = a reason for >> that. Why should users re-implement org-footnote-delete with wrappers = if=20 >> they want to use it interactively? >=20 > I see nothing in git history and mailing list. > I think that it makes sense to convert org-footnote-delete into > interactive function. That would be great. I've fiddled with org-edit-special and I see it has a major flaw, at = least in my opinion. It inserts all changes without keeping track of the undos, as opposed to = the indirect buffer solution, which also had the advantage of doing everything from a = single buffer: it operates as some sort of 'window' on a part of the file, rather than = feeling as some sort of out-of-the-normal operation. Aren't there other possibile use = cases for indirect buffers in org mode? Why are they considered inferior to other = solutions? I ask just for my understanding. (A combination of eldoc + org-edit-special might be rather affecting on = the seamlessness of the workflow, but this is of course my simple personal = opinion). > Il giorno 22 mag 2023, alle ore 13:45, Ihor Radchenko = ha scritto: >=20 > This sounds like something we can extend `org-forward-element' and > `org-backward-element' with - it may not only jump to the next = element, > but also jump to the next element of the same type. Jumping to = next/previous > footnote might will useful as a separate command as well though, as a > complement to the existing `org-next-item', `org-next-link', > `org-next-block', etc. Functions that make navigation between similar elements easier would = simply be great.