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 19:00:37 +0000 Message-ID: References: <537757403.6158992.1495470490914.ref@mail.yahoo.com> <537757403.6158992.1495470490914@mail.yahoo.com> <126b99e9-6af4-0ed7-2f8b-aee7e04c3022@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="f403045f84442cae810550217d84" X-Trace: blaine.gmane.org 1495479658 799 195.159.176.226 (22 May 2017 19:00:58 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 22 May 2017 19:00:58 +0000 (UTC) To: =?UTF-8?Q?Cl=C3=A9ment_Pit=2DClaudel?= , "R. Diez" , Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 22 21:00:53 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 1dCsZZ-00004s-AA for ged-emacs-devel@m.gmane.org; Mon, 22 May 2017 21:00:53 +0200 Original-Received: from localhost ([::1]:44440 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCsZd-0004OS-CV for ged-emacs-devel@m.gmane.org; Mon, 22 May 2017 15:00:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58617) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCsZW-0004ON-A4 for emacs-devel@gnu.org; Mon, 22 May 2017 15:00:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCsZV-00055r-ET for emacs-devel@gnu.org; Mon, 22 May 2017 15:00:50 -0400 Original-Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]:32806) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dCsZV-00055j-6y for emacs-devel@gnu.org; Mon, 22 May 2017 15:00:49 -0400 Original-Received: by mail-lf0-x242.google.com with SMTP id m18so6185931lfj.0 for ; Mon, 22 May 2017 12:00:48 -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=qvfafvFNLxHyccnFVyVSCsCBfSaXc6+CqENSOvg5jQw=; b=adPgM40jG1UNUC+8M1ZbSLbnh3a6cfD8yfJJJHtE8VBtMPg/WDj3R5YlXWRmstWWcm bGB+tpGBEFv5JLA/qjoF9j4psrBr4IJ9emWuIrZpZI1eL66Xb56c6p1A0SoKuAG+Goqf etXKNOkGJ8Nt7D6DSQr8h4K63mZfSwst0tPJc8+jXB42M8Q5BOkl6LoMujCUsJnhxkQh zFCuz56ZuhObAb88mEUTaqKXKnj9ut1B1Ozb6jbuEVs6LaPW0nIY8qk/diZhxDv/8oWW 3nArsFiVV2FkRkO+J1eUkrPlhMDbZDpnZCKlb7M+h9RVgqoZeolHQl9ljfijxK5ukoHt v8Fw== 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=qvfafvFNLxHyccnFVyVSCsCBfSaXc6+CqENSOvg5jQw=; b=mkTdB5jYF31yxegA6fxZ+eHUtpnBYZkaRHEvuFf2eYF+PPxyOvDCvk7aOjhJqLSub6 VyATuVxouwpnQZRPIQwHFoBdum5iqrA1sSXw9n2hYPUKl3PR7fsmWgKc/mDYPgJ9pLwK jDSfensOUoh2ZaIaT7RHxxevHVJ0sdI2KmTTVeTYWdLh2BYM6rmGYorLuZLImenQX3Nu zC14Sw4QP4EY1PK3rv8vH3bPs7Fdu8kT2zyegTZnkZ3YFnDPSpDb9TGWnq0bFLMS6jX3 sxYObKqKBeLNacll4b35twPMO6p3VYAODaMR9Z72DJDb5k3mbf7S3dFB5wlm06SX7tUG VDbw== X-Gm-Message-State: AODbwcBBH/KAYRTTkf04MqMhVtwsxbiPPLCweepfOU9IIEZmnsOglsvl 5sYYIXj7tv2klOz5DmzYrGAUv8yOBQ== X-Received: by 10.46.87.78 with SMTP id r14mr5131796ljd.114.1495479647773; Mon, 22 May 2017 12:00:47 -0700 (PDT) In-Reply-To: <126b99e9-6af4-0ed7-2f8b-aee7e04c3022@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::242 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:215100 Archived-At: --f403045f84442cae810550217d84 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, May 22, 2017 at 2:45 PM Cl=C3=A9ment Pit-Claudel wrote: > Or a defcustom, since it seems that the usual approach is to override the > behavior unconditionally. > A defcustom seems too risky for this. A user can unknowingly copy that var from somewhere and then end up killing modified buffers without confirmation. Add a new defun that just sets the new optional arg to non-nil value is less risky as the user would then be knowingly calling the risky variant. The default kill-matching-buffers will still remain safe. What do you think? --=20 Kaushal Modi --f403045f84442cae810550217d84 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, May 22= , 2017 at 2:45 PM Cl=C3=A9ment Pit-Claudel <cpitclaudel@gmail.com> wrote:
Or a defcustom, since it seems that the usual approach is to= override the behavior unconditionally.

A defcustom seems too risky for this. A user can unknowingly copy that var= from somewhere and then end up killing modified buffers without confirmati= on.

Add a new defun that just sets the new optiona= l arg to non-nil value is less risky as the user would then be knowingly ca= lling the risky variant. The default kill-matching-buffers will still remai= n safe.

What do you think?=C2=A0
=
--

Kaushal Modi

--f403045f84442cae810550217d84--