From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:5f26::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id CMbqN3Eud2WOZwEAkFu2QA (envelope-from ) for ; Mon, 11 Dec 2023 16:44:49 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id yI4GNHEud2XJDgEAqHPOHw (envelope-from ) for ; Mon, 11 Dec 2023 16:44:49 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=devnulllabs-io.20230601.gappssmtp.com header.s=20230601 header.b=nRDIXobs; 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=1702309489; 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:dkim-signature; bh=e05l0Ki4uC+M8WPvq/PgfYvTORcFCwOg+Otu46Q5O4Q=; b=QGjLf6nsi2+85DwnXfTnn0o1zyT7JuAPaKU7MzCOUAscgDUeBjuOvZysl43qhDUHvoWE2U ETJ0Lelf4U2szdWrd8TROrgACGXsxHlACC+A+2r6ByIevgyNdmNucjenyDj+w8gizOEIl2 bR2FIqBMfmt0oqMh23Kvt5P+/9qOskkeo+m8qwV7ttkA+NOYOHjIESWq8E3mJeP1CBspl4 kYOHn1shma2FYytSZrn/u8TMvfo0xnpe/LBbKGFxYxHGIZhpqU9Awa6Z/nDNKKemk1RpBd /bjxMR5Ec4NIaSvPCBW4nIhYh4xS8YIa2OuP5NokXU3RidPQj42OmhOllDsHFA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=devnulllabs-io.20230601.gappssmtp.com header.s=20230601 header.b=nRDIXobs; 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=1702309489; a=rsa-sha256; cv=none; b=rDTPtrTVR5d0irOm7O5Xxj8zlN9gLkTNXAVxZw8P2TOsVEnDB5Sos2k6DlupYmATmzGO08 UuOVClQuqVAPIyaP82rIQMVj3qUhRACs3zt0rOyz9MCfk9KHv/phSIWrATWb0WC2YskXpD PbyxKyhDn1yGuczxqUGlQE0nhKAA49e4730w7rFHLS+ZrghxQbW3LrNxH3V3suw78WF/Tt J2RiPmbpoCTWm6eR7bgDx24d0CZAn3mBa4OEzLFjQJikloUz8nNtHAGtJqm1Cf27MAobs3 7jIkQHfuao1tNrJ2C28nZt1Kvb+TE8FsDjEwTlUs13L7v+CREu5b2QMbxG5BNQ== 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 0BBB8645EB for ; Mon, 11 Dec 2023 16:44:49 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCiRz-0006or-1l; Mon, 11 Dec 2023 10:44:07 -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 1rCiRp-0006gI-J5 for emacs-orgmode@gnu.org; Mon, 11 Dec 2023 10:44:00 -0500 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rCiRn-0008Tq-K4 for emacs-orgmode@gnu.org; Mon, 11 Dec 2023 10:43:57 -0500 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1d05199f34dso26797235ad.3 for ; Mon, 11 Dec 2023 07:43:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devnulllabs-io.20230601.gappssmtp.com; s=20230601; t=1702309433; x=1702914233; darn=gnu.org; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=e05l0Ki4uC+M8WPvq/PgfYvTORcFCwOg+Otu46Q5O4Q=; b=nRDIXobsbgMKbG8n/iCmOULp1vKQOxy+5ZtALVBKsHVNiv66Rqvslwlg3+Lj77MyZa c9f23nZXNpWw7ebwrHPOyGSZ2sCzxLy/K2SmYw8fcO7TzJF9RrTQinuY642VpUjXxl1N Vibf89jwcOXNKyvZgsuvZ7lpncVmHrszEZ66vswVbKRJJPtkmKbIwF/blj2kzwLarQtL LULs8z8ocPYHyifh/1bRhoKLPXFy3dfEv1v4ddIxuy2UFvcNXXkSfiWeURjYFKDGR+xO znysstM8l6gwjdsXpRjgG8OKzuPoqOzU5WGS8eExSZ8VzUZdGHZdvdpqDqYxXPYlmWBy GjKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702309433; x=1702914233; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=e05l0Ki4uC+M8WPvq/PgfYvTORcFCwOg+Otu46Q5O4Q=; b=JvYDJphYr9q4cZPZcwMh2HtiwJlhX2OyFihcNuRaeCv1SsZE1Sr60Kgu7mS3lZ8Pos ltE29O5fTOt/chgPHK3F5MOBhyNtr3DP+dnrzm1sccNGaiF+w3dy5S6Nd0/9SeCZhvES kfqTF4VU//S+8VOsmAcQdEon5ehbxahpAg1+b/7dy8mW06OOg0dWMzA9gI6/5ticP1pF LCaOn0adE8K+VNYMvJ5NBzKoJf/+AM4CYaC3+G24vw2IGPEfcAxRS91qVlf9qYN6tR/H UHN29xr/UY7YRZ0hxtUCMQFwNAuxHdTJ0LSSOVadj3m71hVjl47jr1VMZBlyWj06N/4Q uPsg== X-Gm-Message-State: AOJu0YzHPicVF0r/FDWmfzvv7a7d/AlmzQCAzw1upb61dSVoUNZe70kg BsgrF0J1uALQO3sFQ514dDDbiryAOiNsexW5Q7FgmP1+ X-Google-Smtp-Source: AGHT+IEXrcSK8YlCi2yVd+jN9MrLVn9iKyNOoaGeAiKyIB58Rn74lINCm2R9WxBF6MKlcQ4D9dan/Q== X-Received: by 2002:a17:903:41cf:b0:1d0:9873:1b48 with SMTP id u15-20020a17090341cf00b001d098731b48mr2091310ple.80.1702309433607; Mon, 11 Dec 2023 07:43:53 -0800 (PST) Received: from localhost ([132.178.207.20]) by smtp.gmail.com with ESMTPSA id jh14-20020a170903328e00b001d09c539c96sm6817341plb.229.2023.12.11.07.43.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 07:43:53 -0800 (PST) References: <87y2byx8ml.fsf@localhost> <20231207185326.7937-1-kb@devnulllabs.io> <87a5qkssq6.fsf@localhost> <874jgsa5nh.fsf@devnulllabs.io> <875y18cycg.fsf@localhost> <87zfyj7zko.fsf@devnulllabs.io> <87plzeqmgm.fsf@localhost> User-agent: mu4e 1.10.8; emacs 30.0.50 From: Kenny Ballou To: Ihor Radchenko Cc: yantar92@gmail.com, emacs-orgmode@gnu.org Subject: Re: [PATCH] lisp/org-capture.el: use link ID's for %K Date: Mon, 11 Dec 2023 08:33:26 -0700 In-reply-to: <87plzeqmgm.fsf@localhost> X-PGP-Key: https://kennyballou.com/932F3E8E1C0F4A9895D7B8B8B0CAA28A02958308.txt Message-ID: <87sf48922v.fsf@devnulllabs.io> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=kb@devnulllabs.io; helo=mail-pl1-x62c.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_XBL=0.375, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -2.11 X-Spam-Score: -2.11 X-Migadu-Queue-Id: 0BBB8645EB X-TUID: y1miFS/INu9j On 2023-12-10 12:19 GMT, Ihor Radchenko wrote: > Kenny Ballou writes: > >> >> I ended up using `org-store-link-plist'. For some reason that I don't >> understand, the `save-excursion' -> `org-store-link' was not updating >> `org-stored-links'. > > I can see it from the code now. Basically, instead of updating > `org-stored-links', `org-store-link' returns the link when called > non-interactively (with nil INTERACTIVE? argument). > Now documented on main. > https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=5e809903d Thank you for this! > >> ... Similarly, I had to use `save-window-excursion' or >> the `org-clock-goto' would really break things. > > You should not use `org-clock-goto' - it is intended for interactive use > and does a lot of unnecessary work. > You may instead do (org-with-point-at org-clock-marker ...) Yes, it felt heavy handed, and I haven't quite figured out how to query the current set of functions for desired functionality. Thank you for your patience in this process, I believe it has really simplified the change and the resulting patch (to follow). Using your suggestions, I believe we can simply grab the link from `org-store-link' and use it (almost) directly as the value of %K. Furthermore, we do not need to branch off `org-id-link-to-use-id' because the correct behavior is captured by `org-store-link'. My remaining question is whether I should use `current-prefix-arg' or not? I'm not sure if that would be surprising or not, or if it would even get to `org-store-link' when doing a capture. -- -Kenny