all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Drew Adams <drew.adams@oracle.com>
Cc: 34794@debbugs.gnu.org
Subject: bug#34794: 26.1; doc of `read-buffer'
Date: Sun, 10 Mar 2019 20:21:14 +0200	[thread overview]
Message-ID: <83o96i615x.fsf@gnu.org> (raw)
In-Reply-To: <d87f0188-3a25-4a7e-a4f3-71e434b21ab2@default> (message from Drew Adams on Sat, 9 Mar 2019 14:32:22 -0800 (PST))

> Date: Sat, 9 Mar 2019 14:32:22 -0800 (PST)
> From: Drew Adams <drew.adams@oracle.com>
> 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.





  reply	other threads:[~2019-03-10 18:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <<<b9668c05-e18f-4a3b-9c95-128b7f81fcda@default>
     [not found] ` <<<831s3g7zv1.fsf@gnu.org>
     [not found]   ` <<f996f3c7-0c92-4075-8888-ed0aab13eb33@default>
     [not found]     ` <<83r2bf7w21.fsf@gnu.org>
2019-03-09 22:32       ` bug#34794: 26.1; doc of `read-buffer' Drew Adams
2019-03-10 18:21         ` Eli Zaretskii [this message]
     [not found]       ` <<83o96j7vl4.fsf@gnu.org>
2019-03-09 22:34         ` Drew Adams
     [not found] <<<<b9668c05-e18f-4a3b-9c95-128b7f81fcda@default>
     [not found] ` <<<<831s3g7zv1.fsf@gnu.org>
     [not found]   ` <<<f996f3c7-0c92-4075-8888-ed0aab13eb33@default>
     [not found]     ` <<<83r2bf7w21.fsf@gnu.org>
     [not found]       ` <<d87f0188-3a25-4a7e-a4f3-71e434b21ab2@default>
     [not found]         ` <<83o96i615x.fsf@gnu.org>
2019-03-10 22:23           ` Drew Adams
2019-03-11 14:26             ` Eli Zaretskii
2019-03-11 15:06               ` Drew Adams
2019-03-11 15:13                 ` Eli Zaretskii
2019-03-11 15:21                   ` Drew Adams
2019-03-11 16:09           ` Drew Adams
     [not found] <<b9668c05-e18f-4a3b-9c95-128b7f81fcda@default>
     [not found] ` <<831s3g7zv1.fsf@gnu.org>
2019-03-09 17:43   ` Drew Adams
2019-03-09 18:16     ` Eli Zaretskii
2019-03-09 18:26       ` Eli Zaretskii
2019-03-09 16:31 Drew Adams
2019-03-09 16:54 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83o96i615x.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=34794@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.