From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id +BLOCL+1T2NtDgEAbAwnHQ (envelope-from ) for ; Wed, 19 Oct 2022 10:30:55 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id INXyCL+1T2PPxgAA9RJhRA (envelope-from ) for ; Wed, 19 Oct 2022 10:30:55 +0200 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 D920F3C8C1 for ; Wed, 19 Oct 2022 10:30:54 +0200 (CEST) Received: from localhost ([::1]:59148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ol4TW-0006ue-2q for larch@yhetil.org; Wed, 19 Oct 2022 04:30:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ol4Rz-0006uS-KA for emacs-orgmode@gnu.org; Wed, 19 Oct 2022 04:29:19 -0400 Received: from mout01.posteo.de ([185.67.36.65]:32873) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ol4Rt-0001ct-0H for emacs-orgmode@gnu.org; Wed, 19 Oct 2022 04:29:19 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id B3B8F240028 for ; Wed, 19 Oct 2022 10:29:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1666168148; bh=iYhTwYUtHDDNkSCD89Hw3SBUfNLvlAt+Wrg49UgUKEA=; h=From:To:Cc:Subject:Date:From; b=GUGGTRCLNZWeOKBqwQtKWVRA9tmlSd4J/BYuJqWzWMS3XdbXHlWU4wDRBYwwiw6Xe N8rHJO86OVMLeY/hHprXT9iM81UgrgmT9ZYSd792GGywYKOeWfD/K96uyPr7NEcixK 0HhyauLicIq64XZ3W5u30CHphfYexu9pzrcEyJg0RLy4jPvnFVekELNlI1NpwCJyie R/c30ElgOa/sqgzQSsdkcmXA+JqHjdJevM2ewXmi5USosFOlMZmLmNRsVXv2+Fbo8e 0Wr9qJIraJxVLV1EZhdKEWDecYUqJ9zd+lEvZ/7RYdlWOWNy7mthAttKjjfBzcP67T HW/u2p6tvIqUw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MskR50znjz6tnN; Wed, 19 Oct 2022 10:29:04 +0200 (CEST) From: Ihor Radchenko To: Kevin Foley Cc: Org Mode List Subject: Re: [PATCH] Org Capture Add Tags with org-toggle-tag In-Reply-To: <87h79gydfh.fsf@kevinjfoley.me> References: <87h79gydfh.fsf@kevinjfoley.me> Date: Wed, 19 Oct 2022 08:29:50 +0000 Message-ID: <87v8ogb4ht.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.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, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=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" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666168254; 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=V9TDHra6b2TyWCmAYS1yLKYOHbZvjPqwuZ+9Woudc0I=; b=NMtB460hrkj9Onkg4oiUoFioJoEVaomCECHfte61s83uZziXodHslaEPSCKgGK8gGUtBNM aNVjvoSbjhU57jaIbGSXobOknp1dhpXWDgDE+ez8lOkdBWSn22JyCqGjmANhalL1oQKHqj BQBZLr2d7HQeCTVHzbfjcPfM47XVbmX2Yco6UmGYTs6YZJKi5vHsE+R+T2r1p6kKfrTTOP DCfw++uZ2Ph+hQpTVykUDA0nZwmkJJE9Cab+mriGUSssKXdZN5lqsMjMB4OlxIPeNk0G/y reVJYf3v1KVj6RtUtQMs1wN/7xB2pdIP/up5uAKcUNuaF0H3JolalcE9j0Sm9g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666168254; a=rsa-sha256; cv=none; b=Qxe9kULH7Y6yvK/gNyXVYIaubqSWkqmYrieQVdmemUXqjjKHQQIzMrk53aeHApK4xMzEPZ QOzhlOP3NZa/kerTv2s2r2Dfw7rcDKW/sYMI9Z7Ts0hnm8PWN/c43xBxzzAzJjtQ+RSlsy U4iRUcfjuF26N6Q8Wf8oCotfvJtnCC0fZQ+83FkN2l8+QaP3DT+g7e010L0BACHxH71+TR 5Ru2rWguh3N3VqQ/pim+o3TDvLdbFwxM1xevJOQRbAu/yddDodKuuefVznv8ZA22fwtzSG IsY99yxebl+nxAYgKMakGMBLjS//1WxJyh80VNsuwlfoEa3guFczl9ccjdLTTQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=GUGGTRCL; 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" X-Migadu-Spam-Score: -4.23 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=GUGGTRCL; 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" X-Migadu-Queue-Id: D920F3C8C1 X-Spam-Score: -4.23 X-Migadu-Scanner: scn0.migadu.com X-TUID: l3K+EkQJF8qQ Kevin Foley writes: > I have a capture template which utilizes %^g to prompt me for a tag to > add to a headline which already has a tag. An example to demonstrate > is: > > * TODO %? %^g :foo: > > If I call this template and give it "bar" when prompted for a tag, it > results in (where | is the cursor position): > > * TODO | :bar: :foo: > > And bar is recognized as a tag. > > I've been able to resolve this with the attached patch. However, > looking at the git history of that code it seems the intent might have > been to prevent some recursive resolution so I'm not sure if this breaks > that. > > I've realized I could also attach the %^g to :foo: tag in the template > and things work as expected but if that's the expectation then I think > it's worth mentioning in the docstring for org-capture-templates. It sounds logical to me that every %-escape will be replaced with corresponding text. So, your toggle behaviour would actually be surprising for me. If you think that the existing docstring is confusing, could you provide a patch explaining what is not clear? -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at