From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 2OLAMzasdWXT6wAAauVa8A:P1 (envelope-from ) for ; Sun, 10 Dec 2023 13:16:55 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 2OLAMzasdWXT6wAAauVa8A (envelope-from ) for ; Sun, 10 Dec 2023 13:16:54 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=gxsjDYre; 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=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1702210614; 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=tcpn7a3+MOSN7ZXAzHg49Fx85CBN7qMK42b37RoBQOY=; b=SCn8Ffp6V8+P9pZ0Ym14n79nO8v2xNjasSRmk5Vo9PNqn8dhhsYgPtQSdj3SJ5bf7zwSMh c/DKFitocYPP7a9wZYaqD/0S8M19Z5oZIertit9qZcFssIpf79OamT+kryo5TZ8zHXKQlT jDfb2c/y0ZKImkA2rXij45g5sUr3fB7/2+2ZrGMQst0zVUckz005DU0Zq2nyWjy7Fw4aZH CWonyCxWs+eB0qETVANtJVjMThGJVBfcvoHD7NRZ7pOjbyrAfEnRGDuzIW+rwt+2JXqGyf JtQIn7DuVxGQa9O2ZQm5AqKhYeP27qTYY2uQStlqNFlnkOLXtXg1U8aYDrp/pg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=gxsjDYre; 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=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1702210614; a=rsa-sha256; cv=none; b=Q0GocLRBpiPf07mryX+PGOSyATEjYFxL/EpgmkXqjsb8o5/APl/DAzrldpK0HNfQQkvEQh hbfjaW9zaoA26aC7VJardzdueqxBS1yXPeeFJ0zAuyX2AHMmLxmQnYwMbyBg/iF18u+A5f dmDg+/julGey4BzOp2ln/HBcJmgGP+5nveAq6nWLtgVRnmqo0hMC3KckVWdyLQwJkOVwpM UfJcRrcGxIg4TAUkwT0ibxLjh/JAiVhOVgN0EW4I4HvMzdkFzgnL1PtR0ejtY9dMlVhgVN refVBObWeUGe2O5GsYi0xDXrewqqM9dN1iLoP+CgCLScMHBLGQpMIwNjPui3gA== 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 97C8D58A21 for ; Sun, 10 Dec 2023 13:16:54 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCIjQ-0008I4-3X; Sun, 10 Dec 2023 07:16:24 -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 1rCIjO-0008Hc-2Z for emacs-orgmode@gnu.org; Sun, 10 Dec 2023 07:16:22 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rCIjK-0005sO-PM for emacs-orgmode@gnu.org; Sun, 10 Dec 2023 07:16:21 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 32DE5240103 for ; Sun, 10 Dec 2023 13:16:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1702210575; bh=GmJQEUeNbEVnXFC6Wwp/9iDvGXQuCI7y2JvWYVotuZs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=gxsjDYreugm9oH5ZOwl1v1pExQMkWp1XmUtzVyo1pwX0tWRiW/p0YKYDp5NGvbdvv mJ9mguliX0NBEznKlZpTA0ZZO9Molw6lJ+tgxByPCr5EjLDKArPbFzz19r9kkzgp1H xBdvjxzGiburEhnxqLaIrALJkHmt1IcHNE+lS5D2x2vgPzCZl9QfADXvxWAfRPpTKe drTL9RZ8LtW2eTYKQj70LIIwPdPM219XPMZ5lUJUjarIjVKAgxIMSLEqEmVC8qWtAl xrJCpwqbRFtgYmDG2kI9qaYfhZWskQD6DTJ3M/8fR25HQNOnruZWAWxKrsK5R32zDc NIqb0WupjbOSg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Sp3kk44Zpz9rxN; Sun, 10 Dec 2023 13:16:14 +0100 (CET) From: Ihor Radchenko To: Kenny Ballou Cc: yantar92@gmail.com, emacs-orgmode@gnu.org Subject: Re: [PATCH] lisp/org-capture.el: use link ID's for %K In-Reply-To: <87zfyj7zko.fsf@devnulllabs.io> References: <87y2byx8ml.fsf@localhost> <20231207185326.7937-1-kb@devnulllabs.io> <87a5qkssq6.fsf@localhost> <874jgsa5nh.fsf@devnulllabs.io> <875y18cycg.fsf@localhost> <87zfyj7zko.fsf@devnulllabs.io> Date: Sun, 10 Dec 2023 12:19:21 +0000 Message-ID: <87plzeqmgm.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -53 X-Spam_score: -5.4 X-Spam_bar: ----- X-Spam_report: (-5.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_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -2.31 X-Spam-Score: -2.31 X-Migadu-Queue-Id: 97C8D58A21 X-TUID: blioRSMeZZpI Kenny Ballou writes: >> The last step is unnecessary. You may just examine `org-stored-links' >> (documented in the docstring of `org-store-link') or >> `org-store-link-plist' (undocumented, but containing more info and also >> used by `org-capture-fill-template'). > > 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 > ... 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 ...) -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at