From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id WKUeDLR9/GRIfAAAauVa8A:P1 (envelope-from ) for ; Sat, 09 Sep 2023 16:14:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id WKUeDLR9/GRIfAAAauVa8A (envelope-from ) for ; Sat, 09 Sep 2023 16:14:12 +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 4F1CC38974 for ; Sat, 9 Sep 2023 16:14:11 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=itccanarias.org header.s=default header.b=Umk5t8A6; 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"; dmarc=pass (policy=quarantine) header.from=itccanarias.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1694268851; 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=TTGnOYxNzXQFtB7ekTMiyxprXAMQse1D0GLCB3E4dnQ=; b=LgCWdmEjRiD+ocIEv9e/zEnoK2+Dhe0YuHI7lDR0l/ejoxqt0t0NMkuG4BmFOmXn3K79tF WPkHUvOLggiH78Zn3d4PvGGkfHH3R4ZCLXSO+ZU2kvHy4nxcSSKycm9Mmp4jxvZdmBkGoK myGMVfPHrJbB4qEHmyDmBnbU6Y2laFsgzffqcpTcIpu2jibpv9rXG78H8B+48iGns7xlGQ 7eOzXFU5qDSePEj4khV3ZwwLj1mQa05hpYnnAjzR+6moZy9jQu/E4z5ikJ0lItlh75IHsV UJURaRzMjRUY9st6FgFVDoaFgd0pTLVh+9fMPWdAIcjGH1fWHAGyFavsCelc8w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=itccanarias.org header.s=default header.b=Umk5t8A6; 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"; dmarc=pass (policy=quarantine) header.from=itccanarias.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1694268851; a=rsa-sha256; cv=none; b=i1tOeZm1DSqtHDce71XWmtJNYoTJkqBjDMnNphMyidw3NzIBrCagiHz0jWwN50mzYpx3Qz rpzj8Z/iTHTRcBopdxb2arWFh9SvevQJLhqtUc+rg47FjVAqdyC7fALTBme8sCZgIQHOs4 dO8djkhgDwY20TTeXOfyE3Yp36yb4gYD8LBjEGrcUZ9EX3/LBPu8SLkoaKOECcHKCRZQ8r EdXTYHlKh/z0MdFdlpqfuiCfdvTW1y9E/VWAG1A9fWrMHEanQ0n0arSeuXyJf09r5L0I0U YjkRQEGveuz9M6L1sZ7Qx7/O6Ee6YW6lK2k3GaCuy1YTLRl2asAI2jEw99tC2Q== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeyiB-0001eK-Bv; Sat, 09 Sep 2023 10:13:23 -0400 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 1qeyi9-0001cB-FJ for emacs-orgmode@gnu.org; Sat, 09 Sep 2023 10:13:21 -0400 Received: from relay.itccanarias.org ([62.174.94.155]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeyi6-0001Uo-6T for emacs-orgmode@gnu.org; Sat, 09 Sep 2023 10:13:21 -0400 Received: from localhost (localhost [127.0.0.1]) by relay.itccanarias.org (Postfix) with ESMTP id 9606543B36; Sat, 9 Sep 2023 15:11:57 +0100 (WEST) Received: from relay.itccanarias.org ([127.0.0.1]) by localhost (gwmail-lp.corp.itccanarias.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id T6PiMhFAFpWC; Sat, 9 Sep 2023 15:11:57 +0100 (WEST) Received: from Erasure.corp.itccanarias.org (erasure.corp.itccanarias.org [10.141.187.131]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay.itccanarias.org (Postfix) with ESMTPS id 0CF1543AC8; Sat, 9 Sep 2023 15:11:56 +0100 (WEST) Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline DKIM-Signature: v=1; a=rsa-sha256; d=itccanarias.org; s=default; c=relaxed/relaxed; t=1694268716; h=from:subject:to:date:message-id; bh=TTGnOYxNzXQFtB7ekTMiyxprXAMQse1D0GLCB3E4dnQ=; b=Umk5t8A6dryqP310LfWsEBDJsa0aktDYZ47avOlH5ipvfTp+dAJ41jYqya5arKsFyVPTypwSjm9 ehJJu+ES2FTkcyE5CDMneQSJCo/WAHI0ET60XstVdAJYaPv4sJV2YF1l0RSj5iBtpBnD0WV7Boca7 R6LO18AcC+BNRfD6mb/17GKMxh+oM03i1+HulDNm1M0ixjVd4xb0yVXBsAmC3Xbcr3/OMcQOXZD3A 9u4gGE3tc349NUskm4WAD9DwRPNq6WP0rNo1Y+ZbzBe2LjB8qlLya2MxCtpCioc7J8dB2z3Yrt8Kx VOpF7B+VyqYzjMZX0qtQQOVIIz6YmSTEUk7Q== Received: from itccanarias.org (10.141.153.141) by Erasure.corp.itccanarias.org (10.141.187.131) with Microsoft SMTP Server (TLS) id 14.3.498.0; Sat, 9 Sep 2023 15:11:56 +0100 Date: Sat, 9 Sep 2023 15:11:53 +0100 From: Eduardo Suarez To: Ihor Radchenko CC: Subject: Re: Feature request: kill-buffer for org-capture-finalize Message-ID: References: <87sf7o987k.fsf@localhost> <87pm2s96xc.fsf@localhost> <87r0n77li4.fsf@localhost> MIME-Version: 1.0 In-Reply-To: <87r0n77li4.fsf@localhost> Received-SPF: pass client-ip=62.174.94.155; envelope-from=eduardo@itccanarias.org; helo=relay.itccanarias.org 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, 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.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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 4F1CC38974 X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -4.43 X-Spam-Score: -4.43 X-TUID: kwv1r9joLaGj On Sat, Sep 09, 2023 at 09:18:27AM +0000, Ihor Radchenko wrote: > For personal use-case, you can utilize > `org-capture-after-finalize-hook', checking `current-prefix-arg' and > killing the target org buffer according to the prefix argument passed. > Then, for example, you can make C-u C-u C-c C-c unconditionally kill the > target org buffer. I have tried something simple like (defun my-org-capture-kill-buffer () (when (equal current-prefix-arg '(16)) (kill-buffer))) as an after-finalize hook. It seems to recognize the 'current-prefix-arg' variable. However, 1. it looks to me that org-capture-finalize jumps to the captured item if there are any number greater than zero of preffix arguments, 2. the code above tries to kill the buffer I was working before invoking the capture process. Any hint?