From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.devel Subject: Re: kill-matching-buffers without confirmation Date: Mon, 22 May 2017 18:21:46 +0000 Message-ID: References: <537757403.6158992.1495470490914.ref@mail.yahoo.com> <537757403.6158992.1495470490914@mail.yahoo.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a11401ae24cf814055020f22c" X-Trace: blaine.gmane.org 1495477341 400 195.159.176.226 (22 May 2017 18:22:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 22 May 2017 18:22:21 +0000 (UTC) To: "R. Diez" , Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 22 20:22:17 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCryD-0008Rf-Op for ged-emacs-devel@m.gmane.org; Mon, 22 May 2017 20:22:17 +0200 Original-Received: from localhost ([::1]:44301 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCryJ-0002hd-EJ for ged-emacs-devel@m.gmane.org; Mon, 22 May 2017 14:22:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46391) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCrxw-0002Sd-G8 for emacs-devel@gnu.org; Mon, 22 May 2017 14:22:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCrxv-0004b8-Nb for emacs-devel@gnu.org; Mon, 22 May 2017 14:22:00 -0400 Original-Received: from mail-lf0-x236.google.com ([2a00:1450:4010:c07::236]:35257) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dCrxv-0004aj-G2 for emacs-devel@gnu.org; Mon, 22 May 2017 14:21:59 -0400 Original-Received: by mail-lf0-x236.google.com with SMTP id a5so22370516lfh.2 for ; Mon, 22 May 2017 11:21:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=vmbwGlBWZ9tFrcrBwFLQ1dy5II3P3KZmEkjL2OyLj6g=; b=OGw1A66+itO4hte4ZWXfclyF7sj/PsVDAHcMYtHmuEy3Xwj48x6QU/E/cgcvHy94Oc JQu3VGgJ0ODygJ0PEbVd9dOklwx2wgXsvOG4qrXoKxkUT6XH/uFyaHjpPY7+z0JLzUQF evW/nGxwz0k79sC8OlpApy+RNo6grh8pMMjW7MJtRAzwOMbo3dF+tYQbUvUT9ZuTOrFb VomHiVg9n5O6NjGjnriZgNtfHgF4lNlVnpHYQEn19tmdhbPgTEx2N5mypNanb9QhpVhX V22jbf6X9WE3QmPvXGff/a86UETgn9r4zP88yv6BsY2QGSAX8Orto5BW82PHxFHG39uO CdBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=vmbwGlBWZ9tFrcrBwFLQ1dy5II3P3KZmEkjL2OyLj6g=; b=iSnCRVufhqrdoqdoVSI1aoE+TiYcQ4HtW0aaLIp+QUZ2A09PiyJ1mcsmlDCU0qxC9u vPbpXS0wWW8k9zmy5Wz7yjmMaPMFayrr6yUAJwzK0rmAFAs2YI7vKyqVGww8Jgvl3UFc P5qcip6Tb8Y80Q1Ad4waNK7hxoHufZ1D4UljoDsIDeT32mJf2mwDVh+2tagWsUySjn5r 3pCMiX7PSutYWHJ2LNf3QKN2Y2LubP7rrulYOSwK/SOpd7kjpAjncpU2SO1dtH+qfeRn Kin5n/D4RxJGYhH4qxNkYpw9S1lEakHJwgK6G1h7s0cMQfDhC3DvMXJqVjs6FTLW91nw fHwg== X-Gm-Message-State: AODbwcAiWJF1c6qbwrmACoC6doC9/LURuPlaoAltuAyOHfFshwjzzm1n mQAy9NyvIh1wqQqqg1Bi2rdYXLh7zA== X-Received: by 10.25.26.81 with SMTP id a78mr6383628lfa.5.1495477317840; Mon, 22 May 2017 11:21:57 -0700 (PDT) In-Reply-To: <537757403.6158992.1495470490914@mail.yahoo.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::236 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:215094 Archived-At: --001a11401ae24cf814055020f22c Content-Type: text/plain; charset="UTF-8" On Mon, May 22, 2017 at 2:11 PM R. Diez wrote: > > Please copy me on the answer, as I am not subscribed to the list. > For future, all help questions can go to help-gnu-emacs@gnu.org To answer your question, here is one way: (defun kill-matching-buffers-just-do-it () "Kill buffers whose names match REGEXP, without asking." (interactive) (cl-letf (((symbol-function 'kill-buffer-ask) #'kill-buffer)) (call-interactively #'kill-matching-buffers))) -- Kaushal Modi --001a11401ae24cf814055020f22c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, May 22= , 2017 at 2:11 PM R. Diez <r= diezmail-emacs@yahoo.de> wrote:

Please copy me on the answer, as I am not subscribed to the list.

For future, all help questions can go to help-gnu-emacs@gnu.org
To answer your question, here is one way:

<= div>
=C2=A0 =C2=A0 (defun kill-matching-buffers-just-do-it ()
=C2=A0 =C2=A0 =C2=A0 "Kill buffers whose names match REGEXP, without = asking."
=C2=A0 =C2=A0 =C2=A0 (interactive)
=C2=A0= =C2=A0 =C2=A0 (cl-letf (((symbol-function 'kill-buffer-ask) #'kill= -buffer))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (call-interactively #'k= ill-matching-buffers)))

--

Kau= shal Modi

--001a11401ae24cf814055020f22c--