From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:1008:1e59::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id wKbSFgB/d2VGCwAAkFu2QA (envelope-from ) for ; Mon, 11 Dec 2023 22:28:32 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id sF+WEwB/d2WJDwAA62LTzQ (envelope-from ) for ; Mon, 11 Dec 2023 22:28:32 +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=vim3iyU6; 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=1702330111; 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=Bht2IJhU9RRLD5mF3MbPKYbT4KHlvBs5CMArcBOLHUs=; b=JCTvOUmproSD4YNmVGvFFAU5Y5aLu8l/10/tQX/3W4seegEelBGzuZPcR6MtGblBtBKZsG DlDhDdG8pRA9Q6ZpRVGRBkqV/CzO2UZDS2IEwWKJec3UuF8rGZUjCgle533A9566oyCw7u +t5NApSdrUwd4pQIVZrt6sRNynVo2I8lKnIXQeInMbyd25QR6f51asM0XLDkri28KhrsZ4 67weB01zeHq5bPg0aXWUwk1M6BadgDEXpFu6yFS3p/LizCeAmk50LFMlzEce8HLTLwx/7G TMtBm96ZKhmGtzTsxvd4EIoeDd778Rl+j0CnmYRmMSve1Hxmk5Qf3oe25Ep0zw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=devnulllabs-io.20230601.gappssmtp.com header.s=20230601 header.b=vim3iyU6; 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=1702330111; a=rsa-sha256; cv=none; b=ACA6EjwW4HWIth3Yxcbp+Blmc2UdP7dQrarfsX1USNQQsZ2I9EYJeWDv8E4NyqbA05zpYp eeKQzQd6yVBgC3l9W5GUyehMAa7smQlWkPfohIdlu+6++k8kb0ULOC6A6Q+n25NECQnKn+ LdYbxI5xW3dgHpK6ahrYEmxgcQKxMPONNnKQF/UjBbO8ANIdGdWutI0PFL7+EaWhGsoTji h2R9qm9Wro/9uiAQXh8/fdHrBR+Nzkvm0SNeT92GyUUD9diavKohPN5beqGpMJ3bnTcdZ/ ujwSNumUIn9SfSQF3jrpPIc9hBE0TG6wEySwfRVXqQCeSZlqDxtpKNtGib6CIA== 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 92FAC4316D for ; Mon, 11 Dec 2023 22:28:31 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCnoU-0005w3-OX; Mon, 11 Dec 2023 16:27:42 -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 1rCnoD-0005Ay-P0 for emacs-orgmode@gnu.org; Mon, 11 Dec 2023 16:27:26 -0500 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rCnoB-0006vd-B7 for emacs-orgmode@gnu.org; Mon, 11 Dec 2023 16:27:25 -0500 Received: by mail-pj1-x1033.google.com with SMTP id 98e67ed59e1d1-286f22c52c7so3565806a91.2 for ; Mon, 11 Dec 2023 13:27:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devnulllabs-io.20230601.gappssmtp.com; s=20230601; t=1702330041; x=1702934841; 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=Bht2IJhU9RRLD5mF3MbPKYbT4KHlvBs5CMArcBOLHUs=; b=vim3iyU67GLgP69bEKNVWjp8Gs8A3xZwTnv38VrIqHN2Kjl+2bzfzJ0smt6RrJ864Z TccTsLxjTsrUozx94YxtbmQOHa9SVZCooWOuJ8y2ih4UEI5rlqPf1kntOgEVCrLGHKaN DGUxnJJcVo2waMziNtxTyZmFx4N4RZVVDDcK6l8JJvqVceq8yOfZyu5YC9a64OcrzzVl ud9aCA7WK7yBGnafeLxznG6ln4/SyveUph1HeOYCKAZS9DTt986NKb3O2k/1n9LLYmku Yf5xdr7jgkRD02QY3CI+zp6y0Ta5BZN6/SyEcdEEWdf/w36r3Xj13TZ7T2h7jV0j9zaE d26A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702330041; x=1702934841; 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=Bht2IJhU9RRLD5mF3MbPKYbT4KHlvBs5CMArcBOLHUs=; b=WDA2EGRGRE+KgckNl3In/U1VCKbkv+nhykv0cIMdTsorkF1FRSIkWurMJhsf3OP1Cg zxjoTKwX8X+PDJFReWxj10Yt7YfcWmrcNeHwOEu4Qm+ybGTEOHOIFa2VzP64j/IesQLA 7iAbh6kSAgKWMBm65s3ORe3RPefi19DNSirvk/Z31VmEnh+kG1P5jmScajmJYgWvIi/N 0Y18Ru33cg/vADlmh7OA/nH+24ew4Tc+bYV1smvW5Xy1sU2ULzHuUpxE7nu3Fk3iOz1n fbLhbnsFovSDynlH1IcYX9i9SoM7LJ9LZaI1/PgyaJCDtLajSV03PwCPdDIGYoW/x9E1 0+4Q== X-Gm-Message-State: AOJu0YzHg3D71PZsL3CnBYTDpQFQes4bvZYFQhRuTdt+ZVq9EjIGDiGy xpnFnvBMX45aeSZnABPG3eGSmA== X-Google-Smtp-Source: AGHT+IHbKkFX3WewmBMN9vzqGx07wtGBzEn4I5IIIWfsNwXdnVDbAif9jWMf6ag/LRhgP9KGWxl32A== X-Received: by 2002:a17:90a:c205:b0:286:6cc1:8674 with SMTP id e5-20020a17090ac20500b002866cc18674mr2318547pjt.89.1702330041365; Mon, 11 Dec 2023 13:27:21 -0800 (PST) Received: from localhost ([132.178.207.4]) by smtp.gmail.com with ESMTPSA id u9-20020a170902e80900b001cf8546335fsm7140580plg.5.2023.12.11.13.27.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 13:27:20 -0800 (PST) References: <87plzeqmgm.fsf@localhost> <20231211154357.23020-1-kb@devnulllabs.io> <87ttoo7dna.fsf@localhost> User-agent: mu4e 1.10.8; emacs 30.0.50 From: Kenny Ballou To: Ihor Radchenko Cc: emacs-orgmode@gnu.org, yantar92@gmail.com Subject: Re: [PATCH] lisp/org-capture.el: use link ID's for %K Date: Mon, 11 Dec 2023 14:21:41 -0700 In-reply-to: <87ttoo7dna.fsf@localhost> X-PGP-Key: https://kennyballou.com/932F3E8E1C0F4A9895D7B8B8B0CAA28A02958308.txt Message-ID: <87o7ew8m6f.fsf@devnulllabs.io> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::1033; envelope-from=kb@devnulllabs.io; helo=mail-pj1-x1033.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-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: 92FAC4316D X-TUID: r/WJJturw5cu On 2023-12-11 19:16 GMT, Ihor Radchenko wrote: > >> +*** Capture template expansion now supports ID links >> + >> +The capture template expansion element `%K' creates links using >> +`org-store-link', which respects the values of >> +`org-id-link-to-use-id'. > > Here, we simply use Org markup. So, =%K=, ~org-store-link~, and ~org-id-link-to-use-id~. > See doc/Documentation_Standards.org for details. I'll update for the new patch version. > >> + (save-excursion > > `save-excursion' should be unnecessary here. `org-with-point-at' already > takes care about restoring window configuration and point. > Correct, I'll remove it. The patch is now much simpler :) >> + (org-with-point-at org-clock-marker >> + (substring-no-properties (org-store-link current-prefix-arg nil)))) >> "")) > > Using `current-prefix-arg' is incorrect here. > `org-capture-fill-template' is called from `org-capture' that assigns a > completely different meaning to the prefix argument (see the > docstring). > Okay, I'll pass `nil' instead. I'm not sure any other value makes sense. > Also, why `substring-no-properties'? I figured the link should not come with the face properties inherited from `org-store-link'. If that's incorrect, I'll drop it. It seems to work either way. -- -Kenny