From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 eHZeKzQgc2VNPAEAG6o9tA:P1 (envelope-from ) for ; Fri, 08 Dec 2023 14:55:00 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id eHZeKzQgc2VNPAEAG6o9tA (envelope-from ) for ; Fri, 08 Dec 2023 14:55:00 +0100 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 4AF0758CD3 for ; Fri, 8 Dec 2023 14:55:00 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="HOKLs9/M"; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1702043700; a=rsa-sha256; cv=none; b=RpbFAED0C9gIjnoAb3BPEqU1Jnp9PuOjv71Rpf0FqihnhpFjblnPoWRkgQq0GVTgqglq6Q pcyqPoy9EwOjC3nv+h2VrVlLuMyr6J3lXSEIGgCLFV4Za340nxNV7I3o0sKRunPtGb16Y4 eZQpgCVN5kytyjeL2Lw7LPYcvp46bdDjrCkC1QP+UBBqekt1fbKPGJnrG5hzDOA3ShNWhV 4+LOlmCw6UHr0e891tv0vC03Br1goSI3o8OROSnILlgh5q+OW5yw2ItoYDSe9SGLxFNYN3 Ua7mQ4OcxC/xFECJkzjpaFzdDIBRCT05K1vN5hSLXq39TiS3/lmic+ShgRxexw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="HOKLs9/M"; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1702043700; 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=rmrWQEABCsI7gsgVnriElI2oxHixDVBAmmKhHIbOQJ4=; b=b+JyUVv2TO3k6r3h/640wyHiAR0lsCsthV+8pixs+R+Hm933VlRnJvWfiInHc49YghHHqC bAUttKCkx9m2rtMcAJwFsQ4Q8ndvM76Fcx+BU9tHo40EtzU9XBxn8ThemCi/3lqrNHmMDH XW4sJtovnXrb1Dg7YBXhv/RnQjm59Y07oZ1HAFlHUWwfPt7gR6+oyapQWt6ClfTuK/ZFT6 OV8TenrOVqwomskra49oXRAEVini4MKjSWN4iqbL9AqPt5bwTR0yrQ10vyxmro1ky21+Jd fmdFZ4pv4xs5HRuCAeATbKNe92wZ6GQlEAajyLvl4pRRqp7pm3H/pFt3WbYmkw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rBbIW-00069v-6W; Fri, 08 Dec 2023 08:53:44 -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 1rBbIQ-00069h-Qn for emacs-orgmode@gnu.org; Fri, 08 Dec 2023 08:53:40 -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 1rBbIL-0001gD-TH for emacs-orgmode@gnu.org; Fri, 08 Dec 2023 08:53:35 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id AD7DE240101 for ; Fri, 8 Dec 2023 14:53:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1702043611; bh=iQqGoJETLTfxGp8meX3Fg9nVt+2X/ni+PKc1k1sShcg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=HOKLs9/MumJ19TawjxoxjC66Ugoh5YmvFZsicc1L9SJcTnGG4L06zIVZhqpW/Ro8Z ZDrhxNxM3sUmAHRIc/u6H/0I0uZjVXpftJ2WkuxfiieI3SU8oI/iae5qeW8Hp0247X e4ajKM5oyNumm3fxC/lSIDpU2LAcsTNKm7aH84hXrRTc+Uh/XVFc46P8qO8zipWu1H j+6/B10oDJYxqG1Uujl+8+mfV+CL8innZG6C4ZQToFixJUOaB3jdINFvL+mKTVQbaV laGEX+lWo24Heb8BmYmLzgzJPXCQQmHP3l3/CPEAo9Z5ktnzH5oG7em0x+hlVhOirJ 3aK+D4OKrJX2w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Smszv0QN3z9rxM; Fri, 8 Dec 2023 14:53:31 +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: <20231207185326.7937-1-kb@devnulllabs.io> References: <87y2byx8ml.fsf@localhost> <20231207185326.7937-1-kb@devnulllabs.io> Date: Fri, 08 Dec 2023 13:56:33 +0000 Message-ID: <87a5qkssq6.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: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.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=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: -7.21 X-Spam-Score: -7.21 X-Migadu-Queue-Id: 4AF0758CD3 X-TUID: fYWPAGG6rbl9 Kenny Ballou writes: > * org-capture.el (org-capture-fill-template): fill %K values using org > ID's if `org-id-link-to-org-use-id' is non-nil. > * doc/ORG-NEWS: (Template variable expansion %K) Document new behavior. Thanks for the patch! > + (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. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at