From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#34794: 26.1; doc of `read-buffer' Date: Sun, 10 Mar 2019 20:21:14 +0200 Message-ID: <83o96i615x.fsf@gnu.org> References: <<>> <<<831s3g7zv1.fsf@gnu.org>>> <> <<83r2bf7w21.fsf@gnu.org>> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="268350"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 34794@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Mar 10 19:22:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h335Q-0017h6-E5 for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Mar 2019 19:22:12 +0100 Original-Received: from localhost ([127.0.0.1]:48161 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h335P-0003LP-DQ for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Mar 2019 14:22:11 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h335H-0003JK-12 for bug-gnu-emacs@gnu.org; Sun, 10 Mar 2019 14:22:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h335G-0004Qs-AA for bug-gnu-emacs@gnu.org; Sun, 10 Mar 2019 14:22:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53016) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h335G-0004Ql-5n for bug-gnu-emacs@gnu.org; Sun, 10 Mar 2019 14:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h335G-0006xA-0B for bug-gnu-emacs@gnu.org; Sun, 10 Mar 2019 14:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Mar 2019 18:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34794 X-GNU-PR-Package: emacs Original-Received: via spool by 34794-submit@debbugs.gnu.org id=B34794.155224209526676 (code B ref 34794); Sun, 10 Mar 2019 18:22:01 +0000 Original-Received: (at 34794) by debbugs.gnu.org; 10 Mar 2019 18:21:35 +0000 Original-Received: from localhost ([127.0.0.1]:38324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h334p-0006wC-3W for submit@debbugs.gnu.org; Sun, 10 Mar 2019 14:21:35 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55006) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h334m-0006vx-Of for 34794@debbugs.gnu.org; Sun, 10 Mar 2019 14:21:33 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:51576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h334h-00047Y-5f; Sun, 10 Mar 2019 14:21:27 -0400 Original-Received: from [176.228.60.248] (port=3433 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h334g-0001GM-BY; Sun, 10 Mar 2019 14:21:27 -0400 In-reply-to: (message from Drew Adams on Sat, 9 Mar 2019 14:32:22 -0800 (PST)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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: 209.51.188.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:156219 Archived-At: > Date: Sat, 9 Mar 2019 14:32:22 -0800 (PST) > From: Drew Adams > Cc: 34794@debbugs.gnu.org > > > Please suggest such a text, because I definitely don't see an easy way > > of saying that, without triggering more bug reports like this one. > > 1. OK. How about this? Thanks, I used some ideas from your suggestion. > 4. There appears to be a fairly large bug in the > behavior, BTW. The function is supposed to return a > buffer name, which is presumably a string. > > But try this, hitting `RET' with empty minibuffer input: > > (read-buffer "b: " (selected-window) t) > > That returns a window! And this returns a number, not > a numeric string: > > (read-buffer "b: " 42 t) > > It apparently can return anything at all. AFAICT, it just behaves according to documentation of DEF. > This is in spite of the fact that the REQUIRE-MATCH > arg is `t', and according to the doc that should > mean that you cannot exit the minibuffer unless the > input corresponds to an existing buffer. That's only valid for something the user types, AFAIU. > Do you prefer a separate bug report for this bug, or > can you fix it based on this report? I don't really see what is there to fix. > 5. Other doc-string bugs (fixed in my suggestion): > > * Doesn't say that it reads with completion. (You > can guess that, when you read some of the argument > descriptions - it mentions completion only in > passing.) > * Doesn't say in what way REQUIRE-MATCH "determines > whether non-existing buffer names are allowed". > It refers to `completing-read', but that says > nothing about existing buffers - that says only > that WHATEVER the set of candidates, you cannot > exit the minibuffer without matching one of them. > * Arguments are described out of order. > * Arg PREDICATE is described after the statement > about `read-buffer-function'. I believe I fixed all of these now. Thanks.