From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 qEksI6PS1GIEEQAAbAwnHQ (envelope-from ) for ; Mon, 18 Jul 2022 05:25:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 6JzWIaPS1GLONwAAG6o9tA (envelope-from ) for ; Mon, 18 Jul 2022 05:25:23 +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 2E417FC11 for ; Mon, 18 Jul 2022 05:25:22 +0200 (CEST) Received: from localhost ([::1]:42792 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oDHNo-00062P-8O for larch@yhetil.org; Sun, 17 Jul 2022 23:25:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43076) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDHMi-0005kn-8V for emacs-orgmode@gnu.org; Sun, 17 Jul 2022 23:24:14 -0400 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]:33677) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oDHMg-0006PO-Oa for emacs-orgmode@gnu.org; Sun, 17 Jul 2022 23:24:12 -0400 Received: by mail-pj1-x1029.google.com with SMTP id j1-20020a17090aeb0100b001ef777a7befso11860599pjz.0 for ; Sun, 17 Jul 2022 20:24:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=OOWpCsorYoVG5tMmKtCjT5OMBlSupnQKAZqNg9G/nMU=; b=ltCdHRjoPYeZDhLOHJ1AQTn3GO7CrrouN7ficUL9ogREbC0883G5rQbGexnp9HIVsM i2HpgbqYTCoxzfRqC9DPBMjDvV9rPF3YvUcabSva8h9d76NwX1an/c/f/ePD1If8/9zs jrsCYuQjWVuYcq+/7uzKcsAMLBuwfpNWajE9YgWr25th1ZZCEsqS06PbNmHfFRW6Y1Yb ljUFgPvgSC3HviFUBlBcmYwRSLlqI1MoWn3Bg/JNrQT9dbTBUXpKAk9SCvZKubq4ide9 JaHQvVx3oea2k8NNTg3H1KEgsA2/UhNAi6+AAfJmBsuQvJaAbjJ+O0eifTnmyEVKbSPC P+5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=OOWpCsorYoVG5tMmKtCjT5OMBlSupnQKAZqNg9G/nMU=; b=CkKOfjXSO+FMQ5mMebH8VqvWXiIGxCh3mMZPAcU3SfZAGu7d3tu1HoPm2QBtc47WU3 A8yS0Je/vSBvNu8KqAF27y52l1KtV8lIs8UeiFC/S10zTIPJFuojr5QQCYNQaqEDjsYQ ++V4FY/BD7M8ILlMmdp1oCv5HWeTznKCINB2Jul2ZrAKF1P5IMlMrOOaN7xDGH/boyar bm8S1AcxDgH0qvAoq9ZW6EVdZySQOP9l49raGvYPfifdo7Nre8puzL3J8mAFkSp6ztGX 23sguy1Rc9qMlUNx2cyFYH3rf/+Nn7hBtoL6EZCY7sC6mB55H6zqneUoMJ1ISvYz84U2 wMMw== X-Gm-Message-State: AJIora+WIZF9fcSXv3Bbz83QJ+W1fEMgEQRc5p9fFjbZkeAdruKYmzKL oVFCovq9NsaFXgX6agP4m7M= X-Google-Smtp-Source: AGRyM1vxSXt0g5emrSYm9MNzE4t9F4VoYnsjALbzFCrZAz3mBblrlrlUQ3wIL/gsuphlxvle916LWQ== X-Received: by 2002:a17:90b:1a8c:b0:1ef:c1b2:b2cd with SMTP id ng12-20020a17090b1a8c00b001efc1b2b2cdmr30563288pjb.190.1658114649190; Sun, 17 Jul 2022 20:24:09 -0700 (PDT) Received: from localhost ([115.154.175.57]) by smtp.gmail.com with ESMTPSA id r5-20020a17090aad0500b001ec84049064sm7928325pjq.41.2022.07.17.20.24.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Jul 2022 20:24:08 -0700 (PDT) From: Ihor Radchenko To: errelinaaron@gmail.com Cc: emacs-orgmode@gnu.org Subject: Re: `org-capture' loads all the files in `org-directory' In-Reply-To: References: Date: Mon, 18 Jul 2022 11:25:12 +0800 Message-ID: <87mtd7hzl3.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::1029; envelope-from=yantar92@gmail.com; helo=mail-pj1-x1029.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, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1658114722; 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=OOWpCsorYoVG5tMmKtCjT5OMBlSupnQKAZqNg9G/nMU=; b=NzzlYlf/UwiugDN+Zwrm5obmT+AUsjfsNKtrWytA0lHAoFekZATQylFt3mlSaeQm/TK9/C K78R+A66ubumMucOQKfIe/6fp55lFpcPJ74apRznM5H09Dud3CucF12AEVHMYQrL+Wxr+N y+26s6GwGG7eQOuIcoE6YAeC1YVH7uqPYPcj666BZ9oRagKW0+tspnWclGXDMHFX8Kw/85 GbPqipp4QLb/1blm3q9IlQysXJIqy9RYHEJL9Ue+NFC/6XRBEtnJKwgmbO5gZfFS//UA0w EWkeWC6684HhwfK4w+bsWsF/FmCrJeQGqhFuQuTewgmdxm7DZex7w7ctI3+70Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658114722; a=rsa-sha256; cv=none; b=W1/cfeU53RaRAmg/MLWLuPWng886hCYWz2zBTiUBSnidjnCoq0TnRa00g0IO9MP5K7yq+V /luSIJYdcEgjghF/JEIB1wakRIJX1NcJBOuyLKpg4ppuL9jg+R6+RyA+25kw/SHOa79nhF 13yk6oXFzOU0WFSGx3PglM6/4W1lvfhQlRuC2QcJnIaVI/InqpnB61jvnHNpBz5iiFB0KB XYSAcIQ0NTLuiwYGfctwJVzYeczAKdic5j1G2YVOAIpO6Bss6aY1QrNXm5OhGuB68wXxCz MQgJRJEV3ZE+gxMFAqFYlm8ohCvN5WXYMBp2x29+aLurPrk4oWKhVZjpn67aPg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=ltCdHRjo; dmarc=pass (policy=none) header.from=gmail.com; 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: -1.93 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=ltCdHRjo; dmarc=pass (policy=none) header.from=gmail.com; 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: 2E417FC11 X-Spam-Score: -1.93 X-Migadu-Scanner: scn1.migadu.com X-TUID: dMxxZtmDv9pH Noel Errenil writes: > ... > Then, I fire `org-capture', captur a note and `C-c C-c' to save the captured > content. > > Suddenly all the files under ~/projects/org will be loaded into the buffer > list, which confuses me so much. Those that have nothing to do with > capturing or capture-templates are loaded into Emacs, which makes > little sense to me. > ... > Currently I have `org-directory' set to `~/projects/org'. My > `org-capture' config is as follows: > ... > org-default-notes-file (concat org-directory "/notes.org"))) > ... > ("td" "With Dealines" entry ; todos->deadline > (file+headline "tasks.org" "Deadlines") > "* TODO %? %^G\nDEADLINE: %T" :kill-buffer t :prepend t) Note that you are using %^G, while implies (see org-capture-templates docstring): %^G Prompt for tags, with completion on all tags in all agenda files. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > I just expect that only the capture template will be loaded during capturing > and the template buffer should be killed (as config-ed) after capturing. Only the capture template is actually loaded. However, providing tag completion for %^G requires Org to scan all the agenda files for possible tags. Hence, agenda files must be opened and examined. The reason why the capture target buffer and the agenda file buffers are not closed is efficiency. Opening all the agenda files may take considerable amount of time and hence it is generally better to keep them open for future use. We might change it in future or provide an option to close the opened files if there is enough interest. Feel free to write a feature request - we will judge the number of user responses to the request. > What am I doing wrong? Any advice? Thank you so much in advance. You may either not use global tag completion (use %^g instead %^G in your templates) or advice org-capture to close the opened files. Best, Ihor