From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id cD6tK/5GGWH+gQAAgWs5BA (envelope-from ) for ; Sun, 15 Aug 2021 18:55:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 2CIuJ/5GGWG5XwAAbx9fmQ (envelope-from ) for ; Sun, 15 Aug 2021 16:55:26 +0000 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 0B56C48FD for ; Sun, 15 Aug 2021 18:55:26 +0200 (CEST) Received: from localhost ([::1]:52692 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mFJPv-000758-TH for larch@yhetil.org; Sun, 15 Aug 2021 12:55:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mFJPT-00074z-Cf for emacs-orgmode@gnu.org; Sun, 15 Aug 2021 12:54:55 -0400 Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]:37796) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mFJPR-0004SF-Ow for emacs-orgmode@gnu.org; Sun, 15 Aug 2021 12:54:55 -0400 Received: by mail-qt1-x82d.google.com with SMTP id l24so12505947qtj.4 for ; Sun, 15 Aug 2021 09:54:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version; bh=wYgZSt+1lHABVCIJc5gScyeGbFA8KENn6ZXsjvoFwZM=; b=uN5a/pGEdlnjX7A8jPLz8pJQTxnIyhRZKgXsSY0qbUCwRtK5TlkTgHsptRjG1uud+w EdUFhtvTZiI4qY6yktseuRYXgPm4vqDd9KkfDsmULkaDLcWivQrN+w1qfuf+Jkju+V8K iQ6di9wHBf0RFNb99NAVsKn4tdLrKjP6FOWYVE5CLHq4X0/EAp8bwwcODQqHLhIh5Fug c/pzppwjeRvB/l0VQqqXHfm8U/UCNaJL9leGYzCal/lfO8w+tOgWL5pFrcVsRLyX5wru 1LI7RteMDzdEDfj5ANMSL+4bay4LtNTKW/y53PTmH3NK+dPNP9zLICUcp1HAlL4LxB6n +iUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version; bh=wYgZSt+1lHABVCIJc5gScyeGbFA8KENn6ZXsjvoFwZM=; b=pw4EuKO2wnz7hSWHuwE0Qyvuo7nzMQTtlXBdZksfdSYFRU8W4rfO73heBkobNFI8Zn p7xBT0+Umce3qeU1wOKFd/qDS0GpwwKCPyQEY2lM+r5YWKgYoqy8Kljp9kUoO1SkMwp6 nlYC+gAYsCoIO63xsEpZ3UuUUzwrS4xOUBOwouelBsNugODbMoUZRurZrhtitvBNf01R mfuFxN2Sz+AivkEmleo+bht2aiSkE8gubDfX76JRFf34PWBLOKBnX3TVZNjMyCG0iczu 0TP+DUva9aaN2YAvVeeA+fLXyOJbbsm9B8SuyeetxkntUdwzw80/mGoGKIHGWHq8Wg5C vmrA== X-Gm-Message-State: AOAM530KXI6PKC6sxw/zBkm3rtj2KIcYQWTyOGJUg9Fs1Td/U8xDMK7Z IuHAAPi9l4yQjjjf5eVrm8RnXGzBjj5Aqw== X-Google-Smtp-Source: ABdhPJxs9M6FlcZMoaLRseLbkAxcdJFYthu1quRim/y5VzypERMSzYX+u8X9p5mqfU66lvxogWc7eQ== X-Received: by 2002:ac8:110b:: with SMTP id c11mr10449501qtj.388.1629046492502; Sun, 15 Aug 2021 09:54:52 -0700 (PDT) Received: from nbook ([2601:82:c004:3b0::612b]) by smtp.gmail.com with ESMTPSA id h2sm4746625qko.127.2021.08.15.09.54.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Aug 2021 09:54:51 -0700 (PDT) References: <87v947wr7s.fsf@gmail.com> <87v94665h9.fsf@gmail.com> User-agent: mu4e 1.6.1; emacs 28.0.50 From: No Wayman To: theophilusx@gmail.com Subject: Re: [PATCH] Rename headline to heading Date: Sun, 15 Aug 2021 12:50:44 -0400 In-reply-to: <87v94665h9.fsf@gmail.com> Message-ID: <87sfza642q.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::82d; envelope-from=iarchivedmywholelife@gmail.com; helo=mail-qt1-x82d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1629046526; 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=wYgZSt+1lHABVCIJc5gScyeGbFA8KENn6ZXsjvoFwZM=; b=FXUZiA11kbdNTpc+iuhihA8VRJKWGHpeRgP4vgxZTaLRedd5wpV1I1um85UeOJcSqafAZU 6GZVToUzZ21rjlfa+C8lIJBzaS/xOmj3Jkixet+RhAIhzCfPtdrhEbexS90QB/ar8qhLbx KwB2iuu9A5k7xWIeme6ft/L5af8IwXvf+HhPupuWPxV4qqU0VJbBCQm920SeE+wkF7O7O1 iC01xIAiDr6ODX1piOWoJ07gt0CbDVcz6CpBVPcaqE7tzcdJTkqOYIm3UfeahjS/U7slZQ wmHgzYyg3jxS0auqhdUW+KkEESzgJakxjvzP3JNUNc3chvjJnN6A+Brijsd/4Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1629046526; a=rsa-sha256; cv=none; b=PWJHjKzSl/H5gpPHyGbhZJDGCPSGNIAsgGUM5FZcXwS/v35t/wYpj8KfViI3Bn9OgOJwgE YsE1pdMIXkNSy+0/JbO6D2PYmYaYd0rHxx5bPI5BCtdVk/1Oz7dHN+BsTPk1R9Hb/qWOeW UIVnm1FSqNb1b+/6vna+p87a5bd9+dVZ5AAQs9Xasuaf1bjZftalk0n437XmIknr51Ie9e DANpy+Nqd5zPYjH4jesBaq18i6I8T6Xog+EcF2xjeRIvWzsQi6nL+i/u2GqlgRh+M4MYSq 6YEoME6jOZDWMe/5wAgzrf9GiKZadLU+LU29bm1SFtqWJUI/mzZ35CvRXa/kcA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b="uN5a/pGE"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.11 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b="uN5a/pGE"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 0B56C48FD X-Spam-Score: -3.11 X-Migadu-Scanner: scn0.migadu.com X-TUID: BpQJ5yMgZSQP --=-=-= Content-Type: text/plain; format=flowed No Wayman writes: > As far as org-capture is concerned, support for transparently > upgrading the > user's templates could easily be added to the > `org-capture-upgrade-templates` > function. > > It would just be one more case added to the existing pcase > statement and would > prevent breakage for users. See the attached patch which adds the mentioned case. The docstring for `org-capture-upgrade-templates` could be worded better/more generally. I believe we could also do a better job notifying the user when they have outdated capture syntax. Really we should be recording *which* templates use outdated syntax and pointing them to a solution. These are separate issues, though. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-org-capture.el-Upgrade-file-headline-template-target.patch Content-Description: org-capture-upgrade-templates-headline-to-heading-proposal >From 4a133f0c5a7fef18ea1dfb38e2e1539da1db834e Mon Sep 17 00:00:00 2001 From: Nicholas Vollmer Date: Sun, 15 Aug 2021 12:48:00 -0400 Subject: [PATCH] org-capture.el: Upgrade file+headline template target syntax * lisp/org-capture.el (org-capture-upgrade-templates): Upgrade templates which utilize file+headline target syntax to file+heading --- lisp/org-capture.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/org-capture.el b/lisp/org-capture.el index 831c3e1f4..28b3e33f4 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -109,7 +109,8 @@ "Update the template list to the new format. TEMPLATES is a template list, as in `org-capture-templates'. The new format unifies all the date/week tree targets into one that -also allows for an optional outline path to specify a target." +also allows for an optional outline path to specify a target. +It also accounts for renaming `headline` to `heading`." (let ((modified-templates (mapcar (lambda (entry) @@ -128,6 +129,9 @@ also allows for an optional outline path to specify a target." (`(,key ,desc ,type (file+weektree+prompt . ,path) ,tpl . ,props) `(,key ,desc ,type (file+olp+datetree ,@path) ,tpl :tree-type week :time-prompt t ,@props)) + ;; Rename "headline" to "heading" + (`(,key ,desc ,type (file+headline . ,file+heading) ,tpl . ,props) + `(,key ,desc ,type (file+heading ,@file+heading) ,tpl ,@props)) ;; Other templates are left unchanged. (_ entry))) templates))) -- 2.32.0 --=-=-=--