From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#30064: 27.0.50; Improve grammar of map-y-or-n-p help text Date: Wed, 10 Jan 2018 15:25:39 +0000 Message-ID: <87shbdenws.fsf@gmail.com> References: <871sixg59b.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1515597881 25696 195.159.176.226 (10 Jan 2018 15:24:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 10 Jan 2018 15:24:41 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: <30064@debbugs.gnu.org> Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 10 16:24:37 2018 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 1eZIEl-0005Nu-Iw for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 Jan 2018 16:24:19 +0100 Original-Received: from localhost ([::1]:48360 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZIGl-0002Bk-97 for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 Jan 2018 10:26:23 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51833) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZIGV-00022D-EM for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2018 10:26:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eZIGQ-0002G6-8y for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2018 10:26:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43267) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eZIGP-0002F7-SE for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2018 10:26:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eZIGP-0002yB-NF for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2018 10:26:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Jan 2018 15:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30064 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30064-submit@debbugs.gnu.org id=B30064.151559795111386 (code B ref 30064); Wed, 10 Jan 2018 15:26:01 +0000 Original-Received: (at 30064) by debbugs.gnu.org; 10 Jan 2018 15:25:51 +0000 Original-Received: from localhost ([127.0.0.1]:51164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eZIGD-0002xV-Ql for submit@debbugs.gnu.org; Wed, 10 Jan 2018 10:25:51 -0500 Original-Received: from mail-wm0-f48.google.com ([74.125.82.48]:37735) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eZIGB-0002xB-S4 for 30064@debbugs.gnu.org; Wed, 10 Jan 2018 10:25:48 -0500 Original-Received: by mail-wm0-f48.google.com with SMTP id f140so27708373wmd.2 for <30064@debbugs.gnu.org>; Wed, 10 Jan 2018 07:25:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=x/XfvNONBW+KfkEZVaddP27z79C1vsWvXEQ9WAko0zc=; b=iSnabAvWm0cve8aHMKhnq7n8rbbYxXXMEu9YDr5xDqEO9c+DZdvDLtZ6HIVCU4i7EC RD/IivYjM4qiinHHkVhrKgLhUkmPZlv5Nl5/Z3h6J77qn/d6796m9yWB25owWRTRNJoc MjmoeQEdTkXbEAEEyQWfPrSQVVnv2XJSjvbeUQXkoaFCHZXkppkmHuMYnSDhFSEFD6b8 T17Pbl2BbcqFlI35e2Jhr1LpqcBaf9u1pzZsyZr5bMPUd2mVvWxnHEg2Cilnhe0GniPF 5B/4c9G5n/A4ZEbFh2Ao1MNJOxdR22tmeApwjAnxGHjbAyVadLRAkz8G8koP7pXzvheD pS0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=x/XfvNONBW+KfkEZVaddP27z79C1vsWvXEQ9WAko0zc=; b=eM5dKudO/QPAfV2WLsh1dmS9nlwsy9pfaj4W8VDTM8W0ftrkysY8xM/K6Ior7LSVH0 GaVXacVhNks/upljdJhym6yhn0vBhqAsYay66H2ZjubTMgX1jbArTrv1UBKuRWlAnltS cVkIR4+g6knxAW1R4+qV07hMmEF5CrUfKtEQHCTNOfErBEg8pz1NwtzTua7Uzq3eUM7b C7fYxtdAwCOwPp/1Lv69DkEWiZHS8HTjLHSLxPjiiI0itl8UGNvwhG7y5htbKreGktdd 17VeQqxm1vAZ/nl7hXweMSkj/tWL/MEJOgu0wryVWsJIMOP6goULjZI6u53yUxZpoGks ak/w== X-Gm-Message-State: AKGB3mKlfEX+j+2DiWhAdBTBJXxGJG9UbDKHqh06mboyR4401DLPPg3W kRdBv2DHY0T75XDF9nLTT5eRpO9P X-Google-Smtp-Source: ACJfBosW6QYMsGFixiO+/XEOtBl3+dAiyujsUOeuIgQ7f+LRiy2nY9HNvT15xGFahp9Jstv8dOKfDQ== X-Received: by 10.80.172.197 with SMTP id x63mr27132487edc.207.1515597941722; Wed, 10 Jan 2018 07:25:41 -0800 (PST) Original-Received: from localhost ([213.233.148.28]) by smtp.gmail.com with ESMTPSA id z102sm9724228ede.29.2018.01.10.07.25.40 for <30064@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Jan 2018 07:25:40 -0800 (PST) In-Reply-To: <871sixg59b.fsf@gmail.com> (Basil L. Contovounesios's message of "Wed, 10 Jan 2018 14:25:36 +0000") 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:141981 Archived-At: --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Improve-grammar-of-map-y-or-n-p-help-text-bug-30064.patch >From eddabf4a3cba46000ba04356b38e86b3616aff82 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Wed, 10 Jan 2018 13:55:29 +0000 Subject: [PATCH 1/2] Improve grammar of map-y-or-n-p help text (bug#30064) * lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Do not follow a definite article with an action verb in C-h help text. --- lisp/emacs-lisp/map-ynp.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/emacs-lisp/map-ynp.el b/lisp/emacs-lisp/map-ynp.el index 2a7eddedad..5aa2a6fad1 100644 --- a/lisp/emacs-lisp/map-ynp.el +++ b/lisp/emacs-lisp/map-ynp.el @@ -197,14 +197,14 @@ map-y-or-n-p (objects (if help (nth 1 help) "objects")) (action (if help (nth 2 help) "act on"))) (concat - (format-message "\ + (format-message + "\ Type SPC or `y' to %s the current %s; DEL or `n' to skip the current %s; -RET or `q' to give up on the %s (skip all remaining %s); +RET or `q' to skip the current and all remaining %s; C-g to quit (cancel the whole command); ! to %s all remaining %s;\n" - action object object action objects action - objects) + action object object objects action objects) (mapconcat (function (lambda (elt) (format "%s to %s" -- 2.15.1 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0002-Simplify-map-y-or-n-p-help-text-logic-bug-30064.patch >From 8d84b1bdfb2c974720cb3bff43a5114150422eca Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Wed, 10 Jan 2018 15:07:37 +0000 Subject: [PATCH 2/2] Simplify map-y-or-n-p help text logic (bug#30064) * lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Use with-help-window instead of with-output-to-temp-buffer. Simplify string concatenation. --- lisp/emacs-lisp/map-ynp.el | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/lisp/emacs-lisp/map-ynp.el b/lisp/emacs-lisp/map-ynp.el index 5aa2a6fad1..dd80524a15 100644 --- a/lisp/emacs-lisp/map-ynp.el +++ b/lisp/emacs-lisp/map-ynp.el @@ -191,11 +191,11 @@ map-y-or-n-p (funcall actor elt) (setq actions (1+ actions)))))) ((eq def 'help) - (with-output-to-temp-buffer "*Help*" + (with-help-window (help-buffer) (princ - (let ((object (if help (nth 0 help) "object")) - (objects (if help (nth 1 help) "objects")) - (action (if help (nth 2 help) "act on"))) + (let ((object (or (nth 0 help) "object")) + (objects (or (nth 1 help) "objects")) + (action (or (nth 2 help) "act on"))) (concat (format-message "\ @@ -205,20 +205,16 @@ map-y-or-n-p C-g to quit (cancel the whole command); ! to %s all remaining %s;\n" action object object objects action objects) - (mapconcat (function - (lambda (elt) - (format "%s to %s" - (single-key-description - (nth 0 elt)) - (nth 2 elt)))) + (mapconcat (lambda (elt) + (format "%s to %s;\n" + (single-key-description + (nth 0 elt)) + (nth 2 elt))) action-alist - ";\n") - (if action-alist ";\n") - (format "or . (period) to %s \ -the current %s and exit." - action object)))) - (with-current-buffer standard-output - (help-mode))) + "") + (format + "or . (period) to %s the current %s and exit." + action object))))) (funcall try-again)) ((and (symbolp def) (commandp def)) -- 2.15.1 --=-=-= Content-Type: text/plain I was able to make some minor improvements/simplifications to the logic surrounding my last patch. I attach a patch to this effect, along with a reworded version of the original patch to include the assigned bug ticket number. Thanks, -- Basil --=-=-=--