From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.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 2PtbFkJbkWYrfAEA62LTzQ:P1 (envelope-from ) for ; Fri, 12 Jul 2024 16:35:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 2PtbFkJbkWYrfAEA62LTzQ (envelope-from ) for ; Fri, 12 Jul 2024 18:35:14 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; 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=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1720802113; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=MSfThS2rcuOipNlb+r09RN4C1rfiwuFyrpkses3bV6A=; b=OYwFLvWeA4I0XcgTP3NT6cXMFbp/q8dUHYTQNtTGj1/BIo3GXxcRINaTAgKQWGhQORcCQ/ RUnWwQwZvDXxPrLUb9lm9C41QMTcy+b7OcGgQuVOsU1E1uYG19RQjgsJ6NaEakapimuDCB C8Ob6ekMrz+sPFwbpXkereW82vGRT1o7bFsf9ofD3++gOQZfbLSp//iE3gl6FbDVvG8xOV l61UzLHAFJQ9TYUUmqpIll8DRFqvg89t/nlfTqINtY40AmyNL45PKrTM8PPHgo/HFeAnlp jyq1MpmeYpJFLcQfYpnaQBawEw/2Z8TJL/fKM2Rl3rUsiRGgSFBZG8fiWDG3UA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1720802113; a=rsa-sha256; cv=none; b=pSa8Ul3VkuPa6aFVb3mGhTv1cDyQbbKRxK94OmBB5u5KjglmOknhLonmyFt/WnA9ESCabf NbcyLcpzUoT2XLRwv2K785LmEU4jYZnJQnynWO6m994isX1VTXKBHVA5MpzouYGHW1/j1E DfTwr+fq2epxN85Abqn2kU6fMJGfUImJFhWvcxotFCxuMdEK0/1aShan8M3rM//rhyIS76 //uPsuBteUwTGDnnHFbI53mFidVY4K4PXcWBdFh0N58iD431FCUHdBOVYKLuQRZeA4JHZQ fnnHYHxq9ZbDx8DZ+NPDIBTFpShrxizSR1h+HnQkPOWqtdzd7UGWhRfqJ7LWPQ== 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 594CCCC92 for ; Fri, 12 Jul 2024 18:35:13 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sSJE1-00088N-A8; Fri, 12 Jul 2024 12:34:25 -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 1sSJDt-0007ie-W1 for emacs-orgmode@gnu.org; Fri, 12 Jul 2024 12:34:18 -0400 Received: from 96-100-31-185.ftth.cust.kwaoo.net ([185.31.100.96] helo=k-7.ch) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sSJDq-0003Lp-Jm for emacs-orgmode@gnu.org; Fri, 12 Jul 2024 12:34:17 -0400 Received: from van (_gateway [192.168.1.1]) (Authenticated sender: seb) by k-7.ch (Postfix) with ESMTPSA id 817E7E8109; Fri, 12 Jul 2024 18:34:07 +0200 (CEST) From: =?utf-8?Q?S=C3=A9bastien_Gendre?= To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: Capture, template expansion and keyword for link type In-Reply-To: (Max Nikulin's message of "Fri, 12 Jul 2024 19:00:45 +0700") References: <87sewga4ni.fsf@k-7.ch> <87r0c08ldo.fsf@k-7.ch> <87ikxbwtru.fsf@k-7.ch> User-Agent: mu4e 1.12.1; emacs 29.4 Date: Fri, 12 Jul 2024 18:34:06 +0200 Message-ID: <87v81atvr5.fsf@k-7.ch> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=185.31.100.96; envelope-from=seb@k-7.ch; helo=k-7.ch X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, RDNS_DYNAMIC=0.982, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, TVD_RCVD_IP=0.001 autolearn=no 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-Spam-Score: -8.50 X-Migadu-Queue-Id: 594CCCC92 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -8.50 X-TUID: AjFVVkV7FFpc --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thank you for your reply. I wrote more after the quotes below. Max Nikulin writes: > Have a look into `org-capture' code. It calls `org-store-link'. Thank you for this information. Max Nikulin writes: >> Is there a way to discover the keywords that a major mode provide to a >> capture template=C2=A0? > > See specific store link functions, e.g. `org-gnus-store-link'. Reading the `org-gnus-store-link' function, I see that is set: type, file, node, link and description. I have seen that the variable `org-link-parameters' list all the defined org links. With its different functions, including the store function (associated with :store parameter). I wonder if I can write an Elisp function that retrieve all the properties set for each org link types and tell we at which mode they are used. After all, with Elisp code could be data too. But not now. Anyway, thank you very much. I will explore starting from `org-link-parameters', as it seems to have a lot of org links.=20 Max Nikulin writes: >> A new parameter added to the org-protocol url is only accessible >> through >> the ":query" key=C2=A0? It will not create a new "%:keywoard" automatica= lly=C2=A0? > > With "capture" subprotocol it does not mapped to keywords. This morning, I have explored how org-capture work. Especially the capture subprotocol. I think I will need to make another subprotocol. Maybe a "capture-plus" that will accept any keys and make all of them accessible as a '%:keymord'. Max Nikulin writes: > Not all books have authors in metadata. Some have editors since every > chapter has its own author. To avoid handling such logic in capture > templates I decided to resort to formatting inside an extension (or > formatting performed by a dedicated tool if site has API, e.g. > GitHub). Can you tell me more about this=C2=A0? Max Nikulin writes: >> And then, I could simply create a capture template that would use the >> keywords "%:author", "%:title", etc. > > If you are using Emacs-30 I would suggest to keep away from > org-protocol hacks and to rely on `server-eval-args-left' handled by a > dedicated function > > emacsclient --eval '(my-capture)' 'my-proto://something?param=3Dvalue' > > For older versions you may either use backslash hell like in > emacsclient-mail.desktop or to define custom subprotocol for > org-protocol. Is there any change planned for org-protocole in Emacs 30=C2=A0? The big advantage for org-protocole, is that it's based on an URL that any external software can recognize and pass to Emacs and it's easy to write a custom sub-protocole. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQI/BAEBCAApFiEEaA9vw9ypVj1kP0tAtYb3x3I54p4FAmaRWv4LHHNlYkBrLTcu Y2gACgkQtYb3x3I54p4u8g//ZUI9hvw8fAYagcepdGaPyX30nol/+XBhxjk/8PTV n7yDLkbvQLeMuJsWF4f57iIrhpukrnVeR9HfyVr6EWg/cFJJlpoVXqeVH28xAToK 5Y8XMq4JZaiudCsihM0zaAclC+vMT3Kvo+M7HNe1merDE1XoznylG08S+kVIHtdK wGre8HE9Yo5u7/VfkqMzfF9UF3mnFAOnBAKN6SvBzN9yFjEQ8qX+F7IXIyIiQrtA oX/Wezxo8gwCP2+HXk7mWflmeNl16DejSo0VCHSHNTw0T2gDCchPeYM9jIQJ0AoF seh97GD9BHNAh7mVgw8xN42Rw3pYl4CMcLNpU/HITuwnrYntkdCDLmHnE6xxYrQF n05q3zhQoY5CVYER/E0+Uxg05P+2ByAigxvuQmMxRqyti1Q+Tq7teYI9LT82n5Cu kFtedxZZ6fskfoRfxfO2UoRKVpCoCS8egAxBxVIH+mIWk1LRb7EQ2Ij5TPXc8Whx d3Rtg3CC398YJyZA7l9QgDbIcUvtPASAtgzVVy0u/dlvaSWcNYVfqbKbdmrR5fOj zPiQSttSBKHiTUmVgk19PidwBTo56XnTWOH6T4S520gPrnkLC7XRA507bvdFroJx gCvQhxTaJ4O93cyyXi83XahDkF3bMte+p5HFkV7Mv73FtychIbr12WdlnHaIEXr3 bmQ= =lqDQ -----END PGP SIGNATURE----- --=-=-=--