From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id kFGFG3mYM2cGaAAAe85BDQ:P1 (envelope-from ) for ; Tue, 12 Nov 2024 18:03:37 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id kFGFG3mYM2cGaAAAe85BDQ (envelope-from ) for ; Tue, 12 Nov 2024 19:03:37 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=lELZjspu; 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-Seal: i=1; s=key1; d=yhetil.org; t=1731434617; a=rsa-sha256; cv=none; b=e+6QEPv3DX8ZWWkoCjvQT6n/DyTEbJrEKybJe4tvl3SAuz/KkuLL8I9E6TdZlv96ynmmSV 3f/jG53DNq8MJ0ttQKVHh0upLUciuh30+pRKOs3h8LDwoBUfEJEfkx9HTroPQxbWIjllsP /XbVZzPv5nBhtZKtgwmOZIRi+uJ9iR7OC12P5HPn/+7+vZAEyBtwtEm/VdEEsumnhWW8/B 9klkPmN6RqERXoZQK2OX4kCVFdt5p2r1/7gYyLLMF3rtUrI7MILG66rd+JVfcHfjCaPQu+ AKo//2M69zfOOeX5/7TKChoRt9C6fYLy0zmDRINOrauvvgEA4a3BMZuGCAHINQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=lELZjspu; 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=1731434617; 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=nWiaqG4ngSaA5PtM/HlnBW0zzteYpMmaS7MAaiAlom0=; b=btSVPy2Kqo/iWE3RFsEb4cb0sQo3PBKKDcGR+6lhLhJyEWg25Dn8RI6JQuLDCjrdywSWMN L8V1Hbgi7XyyuU8UhMzomm0HIt+HYvLK0oyL7vltaSfILuJTAQkv463Y1855lhlna1N6wR 2bUxsjqXC58wqPc1QBxY0NOxdwSbgA0n1Uu8pouuCJ2qjt0IuFgA0vvyiYh+GM06qKoMHR +I1g612rW2glYsXxgpck+79Hz3Kxw4Nddi3yVq/jlk9ntbqUeSeZTnFbuNEDnaC2IJR1BN uOEejxJ4ymuyUcjd7Nxj3d6xLCNmGQXeg6jo5KI+dLY1E5qOdtA39CKINVo28A== 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 401E676EB7 for ; Tue, 12 Nov 2024 19:03:36 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tAvDg-0002PU-IB; Tue, 12 Nov 2024 13:02:28 -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 1tAvDf-0002PC-88 for emacs-orgmode@gnu.org; Tue, 12 Nov 2024 13:02:27 -0500 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 1tAvDd-0000gh-87 for emacs-orgmode@gnu.org; Tue, 12 Nov 2024 13:02:27 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id A9F68240028 for ; Tue, 12 Nov 2024 19:02:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1731434542; bh=csyDCBEsT2o+ZZ2xDVvyc5LJnLyRCYyrZhVu8czlFVU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=lELZjspukraeYL3d79o6EjDYctWSpjv4tTtki0IQhMyM6eN2gK9RVcu03+iD1WUYP ng/0gM069W069AW8Fc+L7+hiDsAzeqx0to3+RVdCpX4wOaV08CrSCtqvwF4725E9MI s3/5SXAoRDdf/EUUOYScRPj345myZTAPE+ORTajHEmTY0Mn7niyMmLPxJ6QHV4GpBx a7WATEqANfIdDlmRPPU2vJJHntwuhpMZmcxCgHaU2ODGbY1XkAyyzOznUwJ9taIT74 /EdsZrcIb0CtjOGghEdWaiJsKSGOZF8DGCBADiPxHoC/1GpmyEuj6N0siAlME9Xvbf VZoCqPiw4pfBA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4XnvQ46rcfz9rxF; Tue, 12 Nov 2024 19:02:20 +0100 (CET) From: Ihor Radchenko To: =?utf-8?Q?Tor-bj=C3=B6rn?= Claesson Cc: Jonas Bernoulli , emacs-orgmode@gnu.org Subject: Re: Org-cite: Replace basic follow-processor with transient menu? In-Reply-To: <87cyj0ajm9.fsf@gmail.com> References: <8734m28l9a.fsf@gmail.com> <874j4ueo1x.fsf@localhost> <87bjz2tam2.fsf@gmail.com> <87msil77oi.fsf@localhost> <87ed3wnlv4.fsf@gmail.com> <874j4sccuv.fsf@localhost> <87jzdo2e4m.fsf@gmail.com> <87a5eievav.fsf@localhost> <87wmhlmp83.fsf@gmail.com> <871pzte929.fsf@localhost> <87v7x548ri.fsf@gmail.com> <87y120daue.fsf@localhost> <874j4m9ep6.fsf@gmail.com> <87h68gfqj1.fsf@localhost> <87pln3f3cc.fsf@localhost> <87jzd9ojj0.fsf@localhost> <87cyj0ajm9.fsf@gmail.com> Date: Tue, 12 Nov 2024 18:03:58 +0000 Message-ID: <87zfm4s50x.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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.79 X-Spam-Score: -3.79 X-Migadu-Queue-Id: 401E676EB7 X-Migadu-Scanner: mx10.migadu.com X-TUID: gwLqchH1dq/z Tor-bj=C3=B6rn Claesson writes: >> Could we make !prefix, and !citation work in lambdas? We should be able >> to. > > Sure! It took me some trial and error to get the list splicing right but > now it works in lambdas to. I added another helper to do let binding. I think that a simple (let ((!prefix ...) ...) (lambda ...)) will work. But you should test without C-x C-e. Need to reload the whole library. >> We can even make the prefix work as a standalone command. Simply using >> interactive spec. >> >> (interactive >> (list (let ((obj (org-element-context))) >> (pcase (org-element-type obj) >> ((or citation citation-reference) obj) >> (_ (user-error "No citation at point")))))) > > I was not able to get this to work. Just replace the interactive spec with my version and then M-x org-cite-basic-follow with point on citation in Org document. >> `org-open-at-point' may be called with point at citation rather than >> citation reference. Citation object does not have :key property. >> >> I think that we should drop !citation-key spec and instead specify that >> the command may be called with citation or citation-reference object in = !citation. > > `org-cite-basic-goto' handles this by prompting the user for a key, if > it is called with a citation object. I adopted this approach. (I find the > !citation-key useful for a lot of things I like to do to citations, and > would like to keep it.) I am not sure if it is a good idea. Commands in org-cite-basic-follow-actions may or may not need it, while your code will _aways_ prompt user about citation key; even when the citation key is never used. If you realy, really want it, we can go into `cl-symbol-macrolet' and lazy evaluation, but will be tricky (especially arranging for (setq !citation-key ...) to work. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at