From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 4NXIHAJ8/WRPKQAA9RJhRA:P1 (envelope-from ) for ; Sun, 10 Sep 2023 10:19:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 4NXIHAJ8/WRPKQAA9RJhRA (envelope-from ) for ; Sun, 10 Sep 2023 10:19:14 +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 D221B554FC for ; Sun, 10 Sep 2023 10:19:13 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=mzH0JkLA; 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=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1694333954; 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=+z8M8WU6rIsWdq6gjG0A5Mx1Ho+h4rGPcCAsChZg4Ag=; b=VvnFZkdt9mTjCciYwYksdvc/Uk9NfJWv201uq0E9nunZyDBJ5ErnksdoDnVVI9OWhonR1u OcTq+DhmNmaq+Y7Ik1vd95qzTFw15lNgvKEXStUuMmzx9f0WGqMAU8/9r5rgZfmjgHfiM3 yTi006eyLxrCiAW6uQ+LcVgiq3hEuw64zDPUm3RADq8x53umoCYhVAhAVTJGztjKGu8Qhe z5ignHbqh+EncC00VWIynmAvwldZxtDv3TmVMSUs39ccJsdbF3YK30nl7SDIeqPydJo5Wy uKz+Mqmml30xrGmLizQjjCCCqJSo0ZDmjrrNeWWTmsYbVaOtv01n28oRgs6vvA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1694333954; a=rsa-sha256; cv=none; b=q7QWhsmFZtq9FR7lI9vTZzDQGyKRtoIOvtJK4FnewrnIY4mM2brEzgIHOiV7E0KnroqCAZ YOordNKoXUWEhfqR9JTz8dfyYvGmXXZJ20v7NaUu/TnCsyNEtoPmc0RDZnVUowF3LTD+xV trYH0G+yjDrPG9VEdZUS7j9Hsd8iGb10GqIZtlBEVn0dL1M0Ss/izH1jAg+8xJv6mft1pV w9dCINpyEdCi5TW2rm9r0GDrhFhy1gPD/ztl5RhjPDoq0oHeamv0ucLGPCo7p+LCNJeHXe Q1TzvbxIjW9eB5jQj6MzWPrgE+q9qnft5/KMvxMPesz777SRZetIcxhr7veTCw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=mzH0JkLA; 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=none) header.from=posteo.net Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qfFeK-0006Dm-1S; Sun, 10 Sep 2023 04:18:32 -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 1qfFeI-0006Da-Rx for emacs-orgmode@gnu.org; Sun, 10 Sep 2023 04:18:30 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qfFeF-0003BJ-SS for emacs-orgmode@gnu.org; Sun, 10 Sep 2023 04:18:30 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id DBAFC240027 for ; Sun, 10 Sep 2023 10:18:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1694333905; bh=TT/tKrX/6W1e6kn/xfAww27S3Vut56pkakrH9COzL0A=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=mzH0JkLALsAIjB+TzQoHJzhIheI4/nWw2DVxCEUfpwT9YDmpw3aRY8Nt1AaFbru8j r+TSUmFZarhbOOPTAukQ37oJHIvdnIHFwR4lBApefdiJJYbp/+3DfYndxdnnNLpIbF bcatCamg90dfaW/WLBjfiBkS9M07Zq9TiimGKxMviM7lqUQurO9eztE+XQXwNYODY5 nKSHuJA6s3YXOO4SsapafUw5uG9RC2/5IN8a0YS6w1awC1uX1Rp3HuUUJLTdyD0h4/ jZD06Yr23WQEOOFxyji+MiIHvlsJDkOErOrdOADCku2FOlu44l3esyqRHqIBjwf58T IWNeY9Zh8ahhA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Rk2mK0nqzz9rxK; Sun, 10 Sep 2023 10:18:24 +0200 (CEST) From: Ihor Radchenko To: Eduardo Suarez Cc: emacs-orgmode@gnu.org Subject: Re: Feature request: kill-buffer for org-capture-finalize In-Reply-To: References: <87sf7o987k.fsf@localhost> <87pm2s96xc.fsf@localhost> <87r0n77li4.fsf@localhost> Date: Sun, 10 Sep 2023 08:19:25 +0000 Message-ID: <87h6o2jv8y.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, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -2.31 X-Spam-Score: -2.31 X-Migadu-Queue-Id: D221B554FC X-TUID: oVOu9TTfZhe4 Eduardo Suarez writes: > 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? (defun my-org-capture-kill-buffer () (when (equal current-prefix-arg '(16)) (save-excursion (org-capture-goto-last-stored) (kill-buffer)))) -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at