From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#28525: 26.0.60; dired-delete-file: Accept y/n if yes-or-no-p is aliased to y-or-n-p Date: Tue, 3 Oct 2017 17:00:57 +0900 (JST) Message-ID: References: <87mv5pn1dz.fsf@calancha-pc> <83zi9oeacc.fsf@gnu.org> <87tvzktk75.fsf@gmail.com> <87poa7tstz.fsf@gmail.com> <83wp4d1m84.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Trace: blaine.gmane.org 1507017753 10612 195.159.176.226 (3 Oct 2017 08:02:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 3 Oct 2017 08:02:33 +0000 (UTC) User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: 28525@debbugs.gnu.org, Tino Calancha , npostavs@users.sourceforge.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 03 10:02:15 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1dzI9d-0001fq-T2 for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Oct 2017 10:02:14 +0200 Original-Received: from localhost ([::1]:56516 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzI9l-0005au-2G for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Oct 2017 04:02:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzI9X-0005ZX-VP for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2017 04:02:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzI9S-0005M4-9J for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2017 04:02:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36402) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dzI9S-0005Ll-5L for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2017 04:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dzI9R-0006cK-Nh for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2017 04:02:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Oct 2017 08:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28525 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 28525-submit@debbugs.gnu.org id=B28525.150701767225362 (code B ref 28525); Tue, 03 Oct 2017 08:02:01 +0000 Original-Received: (at 28525) by debbugs.gnu.org; 3 Oct 2017 08:01:12 +0000 Original-Received: from localhost ([127.0.0.1]:45081 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzI8e-0006b0-39 for submit@debbugs.gnu.org; Tue, 03 Oct 2017 04:01:12 -0400 Original-Received: from mail-it0-f52.google.com ([209.85.214.52]:54961) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzI8Z-0006ai-HD for 28525@debbugs.gnu.org; Tue, 03 Oct 2017 04:01:07 -0400 Original-Received: by mail-it0-f52.google.com with SMTP id e134so10345065ite.3 for <28525@debbugs.gnu.org>; Tue, 03 Oct 2017 01:01:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=ExU5BTSJ7SA0ANx/YKm3A9Lj+JHPS13jhxX/H2WGsoA=; b=Ztzerm4vRMJjV8SCIDRfcsQHPHLYLm/qXSIxri/w/SaWXakuAdAbR+CxcMj030fU1s a6rhvR51nOt6xFhKH0Ncl2BNdXnta9SYoqQW+uZoHEoEE+3pBa9wkwQ6lfNYE9Zpxvhm 8lwB8ktrHXelgf5LUgix02V4/i9AAUX4niu2lQDaK2KvCZcfUxP5dWfRpoPg23e3YmFh vkRuZiOgvhXrgqxRBcgwii+wH7QXNdJB2YgQSEzVcV/THjVMTJayfEqUtjus2oi26dji CFASQK7zh6xYL/dncbaw5cJ7unOuwdeXIiuZ/C0H9u8UwtTkIclCCANbcR6oSyVN3qYo wMKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=ExU5BTSJ7SA0ANx/YKm3A9Lj+JHPS13jhxX/H2WGsoA=; b=q5ZAg6ziPlHlAWUjhgbXyaEP/Zyo5dyQ2bCXcR4G4qpB+vEluxL4cxYyhWS2DUXIvk LfnMdUDwReSa9yl5b53aEvvxmmah43/vJuDcTZAVbfzEjXkqJS+WAvzijCq47QH8E6nL tZDXBBr/sWbGVPqhAFky+zEkqlpB0lIbUvqDGqOdZ1YxM1cDyuYjS8BdUAtiTv5mQW6U EHQvJkP7nW2CCy2voe72ec9CUjPirrd2iCOqsJQEbbxpMdLvjcITNn7rTWjzqK7TaHp2 9yGHjpiifRQ3wT3+MxDp1gytPl+0ZDA1JKzTMt8w+5uchvrW3/ncrzZEoZMmLE85SncD V8qg== X-Gm-Message-State: AMCzsaXv+UmHS+3A1hbRU2JMf/TvG0pTN9LkHfK1IvJ4r3N4d9o/HGfN zszfGZ9FDY8Tkf/byz21BXY= X-Google-Smtp-Source: AOwi7QCCsX+LcP+LJvZlYBv/rkwyOd4OCh+azga3t0VB59FYRkVCmYcOfIEhnR1UBcxxQ6ec0oYYxQ== X-Received: by 10.36.253.9 with SMTP id m9mr11561373ith.105.1507017661857; Tue, 03 Oct 2017 01:01:01 -0700 (PDT) Original-Received: from MAR89-84.kek.jp (MAR89-84.kek.jp. [130.87.89.84]) by smtp.gmail.com with ESMTPSA id v65sm5402020itf.38.2017.10.03.01.00.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Oct 2017 01:01:01 -0700 (PDT) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc In-Reply-To: <83wp4d1m84.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:137811 Archived-At: On Mon, 2 Oct 2017, Eli Zaretskii wrote: >>> In my previous patch i checked if `yes-or-no-p' is aliased to >>> `y-or-n-p'. >>> A more general way is to add new functions `yes-or-no-or-else-p', >>> `y-or-n-or-else-p': they ask the question and >>> accept additional answers according with an optional argument. >> Indeed, we don't need new functions just add an optional argument makes >> the thing (see below patch). >> In some cases it might be useful to allow more answers than just 'yes' >> or 'no'. > > On second thought, maybe we should simply ignore this issue, and let > users who want to override these functions write their own variants > for them? Especially since packages do exist out there to do > something like that already. We don't need to solve every single > problem with exotic customizations in the core. Thank you for the comment. That's also a sensible suggestion. Even if we ignore this issue, the existance of a `questionp' which ask a question and allow more than 2 answers (and returns a symbol, easy to check in a `cond' block) might be a useful addition; this is quite general and avoid the need to use `read-string' in cases where the programmer prefers a symbol. If we provide the possible answers as an argument, like in my previous patch, it looks quite explicit. Following the analogy with `yes-or-no-p', `y-or-n-p' it might be a couple of functions so that fset lovers can do: (fset 'questionp 'question-mini-p) So that they can answer just with one key and without RET. Just an idea in mind. Sorry if it's a bad one.