From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id WLATEWqJ3l7wbAAA0tVLHw (envelope-from ) for ; Mon, 08 Jun 2020 18:54:34 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id iI3xDGqJ3l5INAAAB5/wlQ (envelope-from ) for ; Mon, 08 Jun 2020 18:54:34 +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 8D6959404C5 for ; Mon, 8 Jun 2020 18:54:33 +0000 (UTC) Received: from localhost ([::1]:49470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jiMum-0004ap-CT for larch@yhetil.org; Mon, 08 Jun 2020 14:54:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jiMqS-0001x0-2h for emacs-orgmode@gnu.org; Mon, 08 Jun 2020 14:50:05 -0400 Received: from mail-qv1-xf44.google.com ([2607:f8b0:4864:20::f44]:36898) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jiMqP-0003ex-MZ for emacs-orgmode@gnu.org; Mon, 08 Jun 2020 14:50:03 -0400 Received: by mail-qv1-xf44.google.com with SMTP id y9so8861391qvs.4 for ; Mon, 08 Jun 2020 11:50:00 -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:in-reply-to:message-id :date:mime-version; bh=aJ2/63h3CLLkxwoTxOOGR1AliWZB2EsufL3FEegy/U0=; b=KHDavL1LNvjlnTQXen+qAdUqzqqhRIbUjz8EEQrAxyF2oHPIxTo4HmrHal12v9RTOr aS3Wqmk+XY+dk/hGLVvFfBJNl4wtySwWINQmJxcMFaw3nJ15Lyybi7HGNpIQjFLg2q28 NTV282uXfQoD0vcCvgVFmwFlcvQr7t+3iM6DE/Lu/PaHOasT3UJhlD7uFBHZbVyjd85A Z3jBhU5iPmtW1pmHQpb+zj6vzLZwN48gWobgD4W+HO5twnl6zVvnZ0Xo4NUvMl/uZXmk b6udNwnuyc0iF/0fubspWZBMbVIAY1mU+Y5sY2mHXiq7kQjYkTP31DHl1EWWsvA7xt+8 k7BQ== 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 :in-reply-to:message-id:date:mime-version; bh=aJ2/63h3CLLkxwoTxOOGR1AliWZB2EsufL3FEegy/U0=; b=jTgns6OqMg9zS+PZYpvjp3K6vAVpvzHxqUxHyL/h1K6lvFVHRHN5GFrGkMLaGwxLSs Luety8OcVJQ/aESRc39v3Qx+lc/B5844Rsh61+h3CfSMtqr04vbdCwHG6uhG4SaYuXWo 2TzAZr6XEyhVntt5kJ0rKohuv41oHBwGvrd43avwJ1CpfNVV+7MVDN2JCo7B01+ng+px I6d+z8uN2VGNx3/e3aIGG3RXAKmW89EkZmgooC8EWOjZvfO6cK0rOYgzvsT7rz73WVpw kOI/15I59qS02j+TJNYDrEeTWXgBUX5J9NmLUztrGt6p8cGLsIPqY6g402ZPpwx0CBqA 6gXA== X-Gm-Message-State: AOAM532R6t1qK0S1OVvkmVVSsWUMM95I2+PYPmiPtkIPEHXN7FaJ5BJ6 VfPfa4ExI47gKwuB0U/Ht2U= X-Google-Smtp-Source: ABdhPJxk/shXN9kvqa8IBIFIXPnmChZ1YtKt5NPPLUL61B/14R6GtyXawnCUPMaUcHN8t7cu1TJJ4A== X-Received: by 2002:a05:6214:1432:: with SMTP id o18mr120126qvx.57.1591642200265; Mon, 08 Jun 2020 11:50:00 -0700 (PDT) Received: from laptop ([2601:8b:c300:1024:86c6:b3c8:8509:5fff]) by smtp.gmail.com with ESMTPSA id l8sm8386889qtb.57.2020.06.08.11.49.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jun 2020 11:49:58 -0700 (PDT) References: <87r1w07w86.fsf@gmail.com> <87sggb5xpf.fsf@nicolasgoaziou.fr> User-agent: mu4e 1.3.9; emacs 28.0.50 From: No Wayman To: Nicolas Goaziou Subject: Re: [PATCH] Allow org-capture-mode-hook to access org-capture-current-plist [9.3.6 (release_9.3.6-443-g0e8aff @ /home/n/.emacs.d/straight/build/org/)] In-reply-to: <87sggb5xpf.fsf@nicolasgoaziou.fr> Message-ID: <875zc1bdey.fsf@gmail.com> Date: Mon, 08 Jun 2020 14:49:57 -0400 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::f44; envelope-from=iarchivedmywholelife@gmail.com; helo=mail-qv1-xf44.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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, N V Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=KHDavL1L; 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-Spam-Score: -1.71 X-TUID: vs9KZz7m7dDa --=-=-= Content-Type: text/plain; format=flowed Nicolas Goaziou writes: > Could you add the modified function in the commit message, add > TINYCHANGE cookie if you haven't signed FSF papers yet, and add > an entry > in ORG-NEWS about it? I've modified the commit message and added an ORG-NEWS entry in the attached patch. My FSF papers have recently cleared, so we should be good in that regard. Thanks, Nicholas Vollmer --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-lisp-org-capture.el-Set-org-capture-current-plist-be.patch Content-Description: set-org-capture-current-plist-before-org-capture-mode-hook >From 0590973aa7d487ed014ed6bcb5db6459b07218ab Mon Sep 17 00:00:00 2001 From: Nicholas Vollmer Date: Mon, 8 Jun 2020 14:19:35 -0400 Subject: [PATCH] lisp/org-capture.el: Set `org-capture-current-plist' before `org-capture-mode-hook' * org-capture.el (org-capture-place-template): Allow `org-capture-current-plist' access during `org-capture-mode-hook' Ensure consistency between org-capture's hooks. `org-capture-after-finalize-hook' is now the only hook that cannot access `org-capture-current-plst' because the capture buffer is killed when it is run. --- etc/ORG-NEWS | 1 + lisp/org-capture.el | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index f7c898f84..8db9db645 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -478,6 +478,7 @@ function, ~org-edit-latex-fragment~. This functions in a comparable manner to editing inline source blocks, bringing up a minibuffer set to LaTeX mode. The math-mode deliminators are read only. +*** org-capture: ~org-capture-current-plist~ accessible during ~org-capture-mode-hook~ * Version 9.3 ** Incompatible changes diff --git a/lisp/org-capture.el b/lisp/org-capture.el index 9136d331b..7dde7e194 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -1128,8 +1128,8 @@ may have been stored before." (`plain (org-capture-place-plain-text)) (`item (org-capture-place-item)) (`checkitem (org-capture-place-item))) - (org-capture-mode 1) - (setq-local org-capture-current-plist org-capture-plist)) + (setq-local org-capture-current-plist org-capture-plist) + (org-capture-mode 1)) (defun org-capture-place-entry () "Place the template as a new Org entry." -- 2.26.2 --=-=-=--