From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 6MrnD33XdWXsTgAAauVa8A:P1 (envelope-from ) for ; Sun, 10 Dec 2023 16:21:33 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 6MrnD33XdWXsTgAAauVa8A (envelope-from ) for ; Sun, 10 Dec 2023 16:21:33 +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=BGcQcKnW; 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=1702221692; 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=+V7mAo5NTl9ItqG1ozPO/v72wJ07ZUqe+6dG7u7GbYs=; b=mmbnmsdgWFRle7Nw5MYWkzyV/kJm43XTCbXFCrQj5kxXqrvetzszI5kybFs6AMcclqsK4d WYnCkAMgU3mkSQd2vx2B117mPAk/fygCZdlGiI7FHOnWBcRicqVS9hOOQwM5YQVOt5sb19 OSeg3fiJ87N1HYnm5+/3PHudCTGPrQL5mo+sHUuIrAF/vaoQ5/GVDaqOIy3CUlrvpOJMv/ vvU7AzIsPIjDIXLcmE6HUPf1QF/fhF+Hc/B3pKf43IZYyv1UJ62BeB61C9LsF5LmkHn1zP zu0kqUeN9vjwsT9FVNvr/YyaU6MrxNTbOp3wdbo5AFa67MxGWfl+r79q/qjo8A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1702221692; a=rsa-sha256; cv=none; b=l3f4bqddd6vPgu9w1GBgZuXoN81/GW+24WKe0GX9EeXAJXppFcJG9GDAuXaVFCROvM6x+7 yNDkcBLp4x+O7SNLjdQlZSxTOGfC9Hr4ObVX2K1gBc2kEJpeXF8+u0TS5xgN0dTVgSEsTU B7gKLn32rcW4nsiLRIJlWU2h7Rt9RPmX6Z3eYk9EtxMGUUA5nTs/t+avZqXHZZTrZq26H9 4BJO+ER7wpI/m43uJEFqCD65JBVqejeFNr2Omi2sfYGQ58r7GuBX4x9WekU7ohK42UQivh Ai6MUyVK4yxW+TSa2KKfBsIgc/KtYB/AEWCk0W03qDTWlP1DYFIcJHqCgCNZ6w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=devnulllabs-io.20230601.gappssmtp.com header.s=20230601 header.b=BGcQcKnW; 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 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 442565563B for ; Sun, 10 Dec 2023 16:21:31 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCLbt-0005lc-Ju; Sun, 10 Dec 2023 10:20:49 -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 1rBfxY-0004ZG-QX for emacs-orgmode@gnu.org; Fri, 08 Dec 2023 13:52:25 -0500 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rBfxW-0007lp-AB for emacs-orgmode@gnu.org; Fri, 08 Dec 2023 13:52:24 -0500 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1d06d4d685aso18595075ad.3 for ; Fri, 08 Dec 2023 10:52:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devnulllabs-io.20230601.gappssmtp.com; s=20230601; t=1702061541; x=1702666341; 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=+V7mAo5NTl9ItqG1ozPO/v72wJ07ZUqe+6dG7u7GbYs=; b=BGcQcKnWM+cdTUEpmPbjTMv+FGnlwSJrddSU21D4pJd/EYua8R9CFyKXpzNW3FDWwx 4SMIFdmJwSfQJs7kSSxojfk/qYqPUHNfiMkdKiJ9GtyhK31MD+JuuPOYD4rN02DFHc4K qWb1z4cYtewkIhTRspwg5gbrjIJn3caSVuYvF1W6T+aWoNCysOreCZUjCaWkAAEhcKou msrfNjQ5Mxj77pwbPCs6hQLornNlkS3rItbRhjZ/773naz0zy3b7Obgeq4112VrDSDUm ptUYLj0UT9vu/jfTy5OuFdoUS5wCWc8V7jNGQJs5L9SWJlcGf5iPCIFMpY0+fNfnbhk1 8kAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702061541; x=1702666341; 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=+V7mAo5NTl9ItqG1ozPO/v72wJ07ZUqe+6dG7u7GbYs=; b=pM40D3FHqzvimPNt0XCvqgLDWZ5BgJkKQX7nxt+cwrmPoMkc4K3C5aSMs8F1XmDzzE pg40sMe4LakwDe8GOyndQCS27o1c8nY9ZmeVZpM/irS/UzyUg/DRtyXjka+dqf0DU3IR ZzIyA35F+1QRvsoFF2SxhbyL1/seWokJJM2x3LPKXDkLMOS6F6E7OgzSL0ublVTNzARJ dXvZF/b738xX3BoQhx03yrULwdX3G1w4AE06tfenoY2MtQCizlQJxHorHSfIaHoN+zBb +OzIoVF/tLkNyUdWMoj89RQyVkKAU1em4snujTjmWOXTyeeA2d72vYWlmn3qOMegjctM YJKA== X-Gm-Message-State: AOJu0YzLmCzNyblvU39O/u7KfW4isNMfQ19nyYZIvYn2oVnfdWZyZqV1 jE0IpylWd2gFOL60ZOmkdLyhmQ== X-Google-Smtp-Source: AGHT+IF9DTQMh1F/hEVhrGymylDxPlAOVIw29rTc3c8T6LJPcNCiUGmEGxOr0yVj8DhRJhnKZ/XTAw== X-Received: by 2002:a17:902:bd0c:b0:1d0:a9fa:5939 with SMTP id p12-20020a170902bd0c00b001d0a9fa5939mr382404pls.111.1702061540683; Fri, 08 Dec 2023 10:52:20 -0800 (PST) Received: from localhost (67-60-133-188.cpe.sparklight.net. [67.60.133.188]) by smtp.gmail.com with ESMTPSA id i8-20020a17090332c800b001cfb41589ddsm2019488plr.293.2023.12.08.10.52.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 10:52:19 -0800 (PST) References: <87y2byx8ml.fsf@localhost> <20231207185326.7937-1-kb@devnulllabs.io> <87a5qkssq6.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: Fri, 08 Dec 2023 11:47:29 -0700 In-reply-to: <87a5qkssq6.fsf@localhost> X-PGP-Key: https://kennyballou.com/932F3E8E1C0F4A9895D7B8B8B0CAA28A02958308.txt Message-ID: <874jgsa5nh.fsf@devnulllabs.io> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=kb@devnulllabs.io; helo=mail-pl1-x62a.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, 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-Mailman-Approved-At: Sun, 10 Dec 2023 10:20:46 -0500 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 X-Migadu-Spam-Score: -1.11 X-Spam-Score: -1.11 X-Migadu-Queue-Id: 442565563B X-Migadu-Scanner: mx11.migadu.com X-TUID: Yfbgx5vTsTQq On 2023-12-08 13:56 GMT, Ihor Radchenko wrote: > Kenny Ballou writes: >> + (if org-id-link-to-org-use-id >> + (org-link-make-string >> + (format "id:%s" (org-id-get org-clock-marker)) >> + v-k) > > `org-id-link-to-org-use-id' may have a number of non-nil values with > slightly different behaviour: t, create-if-interactive, > create-if-interactive-and-no-custom-id, use-existing, nil. > > Your patch will only work as expected for t and nil values, but not for > others. You may consider leveraging `org-store-link' to account for all > the possibilities. This worked for the value of `use-existing', which is how I tested it. But I see your point, the behavior should be more flexible to the other values of `org-id-link-to-org-use-id'. I'm currently struggling through modifying it to work with `org-store-link'. Something, save-excursion -> org-clock-goto -> org-store-link -> org-insert-link is what I'm trying for now, but that's not quite working. I'll come back to this in a few hours. If you have any other specific suggestions I'm missing, please let me know. Otherwise, look for a new patch, hopefully soon! -- -Kenny