From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: Is there any local variable to avoid asking me to save buffer on kill-buffer? Date: Mon, 16 Dec 2024 13:04:06 +0100 Message-ID: <874j33bzrd.fsf@gnu.org> References: <7f8a548d35d21c6436045ce11af22088.support1@rcdrun.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28568"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.12.7; emacs 31.0.50 To: Help GNU Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 16 13:04:53 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tN9qG-0007EH-0c for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 16 Dec 2024 13:04:52 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tN9pn-0007aH-St; Mon, 16 Dec 2024 07:04:23 -0500 Original-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 1tN9pi-0007Zj-Np for help-gnu-emacs@gnu.org; Mon, 16 Dec 2024 07:04:19 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tN9pi-0006MY-Fa for help-gnu-emacs@gnu.org; Mon, 16 Dec 2024 07:04:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=gC/IyCEjWrbET96+20W8ufOZOvPHbiZGOXsZFNUitWc=; b=Xb4STRInOGw5pfhhNJVo fBpz1a5fkjClXWQTYQMFvh6+Q6Swgb9fJlu2MxE7LiT8kGHat9J3cygLOL/3LMwMMONNK/dh7IykW xtCbM1C89dsr6L3oGZxIzvAmRz2cwjJ0CNpbulUyeyCfcbv4IXZyrb2BzvvOAM142TVh84op77J8F Cq8TWjvhn3Rla6z0CSmpM4FCdECs1NwYh9hGg+WcH4ilh8Ja/I4Pz+LoxTXek3IPRRJdRUPMwdUVs IYd0bQZ1TDNw72tgJl9TEy/5wv7OzOoQg4sWpS2XwBeyhbMtevl5notcZ1Trp0KU3EDexqbnHLs3w S4WppkuG6iYWnA==; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrleefgdefhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefhvffujghffgffkfggtgesthdtredttdertdenucfh rhhomhepvfgrshhsihhlohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenucggtf frrghtthgvrhhnpeduhfettdduieehueduvdevudetiefgkedvkedutedtueffgeffteej teejfeeitdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehthhhorhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdekieejfeek jeekgedqieefhedvleekqdhtshguhheppehgnhhurdhorhhgsehfrghsthhmrghilhdrfh hmpdhnsggprhgtphhtthhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehh vghlphdqghhnuhdqvghmrggtshesghhnuhdrohhrgh X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail In-Reply-To: (Jean Louis's message of "Mon, 16 Dec 2024 10:14:58 +0300") X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148829 Archived-At: Jean Louis writes: > (defun rcd-temp-buffer-kill-current () > "Kill current buffer without asking." > (interactive) > (let ((buffer-name (buffer-name (current-buffer)))) > (kill-matching-buffers-no-ask (regexp-quote buffer-name)) > (message "Killed: " buffer-name))) > > I see that above attempt is again asking me, but function is called > "no-ask". Is that a bug? Not really, but a bit strange maybe. kill-matching-buffers-no-ask calls kill-matching-buffers with no-ask arg set to t. That results in buffers being killed with kill-buffer instead of kill-buffer-ask. The latter would require confirmation for any buffer to be killed. However, kill-buffer itself will query anyhow in certain cases, especially when you have unsaved changes in the buffer which you probably have. So it depends on how one interprets "no-ask". The current interpretation seems to be "don't ask unless you might lose data" in contrast to "never" which you seem to expect. HTH, Tassilo