From unknown Fri Sep 05 18:47:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34794: 26.1; doc of `read-buffer' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Mar 2019 16:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34794 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 34794@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155214911227971 (code B ref -1); Sat, 09 Mar 2019 16:32:02 +0000 Received: (at submit) by debbugs.gnu.org; 9 Mar 2019 16:31:52 +0000 Received: from localhost ([127.0.0.1]:37300 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h2et6-0007H4-5n for submit@debbugs.gnu.org; Sat, 09 Mar 2019 11:31:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h2et3-0007Gr-N5 for submit@debbugs.gnu.org; Sat, 09 Mar 2019 11:31:50 -0500 Received: from lists.gnu.org ([209.51.188.17]:46977) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h2esy-0002EG-G4 for submit@debbugs.gnu.org; Sat, 09 Mar 2019 11:31:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h2esx-0004ss-QX for bug-gnu-emacs@gnu.org; Sat, 09 Mar 2019 11:31:44 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_MED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h2esx-0002Cm-5m for bug-gnu-emacs@gnu.org; Sat, 09 Mar 2019 11:31:43 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:34140) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h2esw-0002Br-SJ for bug-gnu-emacs@gnu.org; Sat, 09 Mar 2019 11:31:43 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x29GTZtQ155601 for ; Sat, 9 Mar 2019 16:31:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=NKbG88U6NNwHB2tv0nb2XGbt4UJyL4sczu0POo10zdM=; b=NP95sWezIuwVZAGqgOQZUOP6CB3A0HoWm+0NVCEGpD2mSLsfCqQx0N9Px7RvfdUwJ9Uc onbJvXNFk1MLanz0CB0W73fmqvpK7veOuyixgkxhnF+ofCMv1RIlrdsDQH632HpTsN6d lawMS+1I5QCvR/0or+Xl1TtXn+mQWvEIDMBCvqxVswM3TEHprmg9FUmElzqCispSTVny RAJaDkW1WO6vDCB13gQMHHb3m+/9yDTToMUIM6tyNPKdZvDXTMHu0aA8/vmenio1UBQc D5gKNi2zIA8O6NzLZiyKsDsL3lOaZQMJlSbOM338Mjc4vvI+/PE12lQrSQSMByMXRDFu pA== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2r430e9q99-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sat, 09 Mar 2019 16:31:41 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x29GVdIh014205 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sat, 9 Mar 2019 16:31:40 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x29GVdj5024243 for ; Sat, 9 Mar 2019 16:31:39 GMT MIME-Version: 1.0 Message-ID: Date: Sat, 9 Mar 2019 08:31:38 -0800 (PST) From: Drew Adams X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4810.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9190 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=596 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903090125 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 141.146.126.79 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) AFAICT neither the doc string nor the Elisp manual states what the default value is if argument DEF is nil. IOW, what is the default buffer name if no explicit default is provided? It seems (without thorough testing) to be the value of `(buffer-name (current-buffer))'. In GNU Emacs 26.1 (build 1, x86_64-w64-mingw32) of 2018-05-30 built on CIRROCUMULUS Repository revision: 07f8f9bc5a51f5aa94eb099f3e15fbe0c20ea1ea Windowing system distributor 'Microsoft Corp.', version 10.0.17134 From unknown Fri Sep 05 18:47:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34794: 26.1; doc of `read-buffer' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Mar 2019 16:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34794 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams Cc: 34794@debbugs.gnu.org Received: via spool by 34794-submit@debbugs.gnu.org id=B34794.155215047430015 (code B ref 34794); Sat, 09 Mar 2019 16:55:02 +0000 Received: (at 34794) by debbugs.gnu.org; 9 Mar 2019 16:54:34 +0000 Received: from localhost ([127.0.0.1]:37320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h2fF4-0007o3-7X for submit@debbugs.gnu.org; Sat, 09 Mar 2019 11:54:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55018) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h2fF2-0007nq-Jn for 34794@debbugs.gnu.org; Sat, 09 Mar 2019 11:54:32 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60611) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h2fEx-00027v-2P; Sat, 09 Mar 2019 11:54:27 -0500 Received: from [176.228.60.248] (port=4072 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h2fEv-0003lq-OH; Sat, 09 Mar 2019 11:54:26 -0500 Date: Sat, 09 Mar 2019 18:54:10 +0200 Message-Id: <831s3g7zv1.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Drew Adams on Sat, 9 Mar 2019 08:31:38 -0800 (PST)) References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Date: Sat, 9 Mar 2019 08:31:38 -0800 (PST) > From: Drew Adams > > AFAICT neither the doc string nor the Elisp manual states what the > default value is if argument DEF is nil. IOW, what is the default > buffer name if no explicit default is provided? It seems (without > thorough testing) to be the value of `(buffer-name (current-buffer))'. No, it's an empty string, and I think the doc string already conveys that. (Note that if read-buffer-function is non-nil, what happens then is entirely up to that function, which doesn't make it easy to say exactly how DEF is handled.) From unknown Fri Sep 05 18:47:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34794: 26.1; doc of `read-buffer' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Mar 2019 17:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34794 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii , Drew Adams Cc: 34794@debbugs.gnu.org Received: via spool by 34794-submit@debbugs.gnu.org id=B34794.155215343110077 (code B ref 34794); Sat, 09 Mar 2019 17:44:02 +0000 Received: (at 34794) by debbugs.gnu.org; 9 Mar 2019 17:43:51 +0000 Received: from localhost ([127.0.0.1]:37363 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h2g0l-0002cS-3H for submit@debbugs.gnu.org; Sat, 09 Mar 2019 12:43:51 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:48922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h2g0j-0002cF-I1 for 34794@debbugs.gnu.org; Sat, 09 Mar 2019 12:43:49 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x29HZ7ph163245; Sat, 9 Mar 2019 17:43:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=awNWewR75pnkxS3bpcqbkmrLbW6V/6Dwmro1/FWg/Jk=; b=HRqmxGDuhhs0iCZz/LXFfn0cxs/lpyzh7kao5fltKe5YamMFzY8ghKsNWQGfKMspPppd ghwESBR/gtDC5IpvnU6SybKoCEaFmmuTWFkJnB3GST37s460zD1LQSM4em3vLJ3bAQ5K dWJbZPxnEA2z3hvvjAFkUEP8atGMy0bx1MxZ1sqEy5GCw5iSHD/YfGQGZuEmebr8+2WG /LJXkfAG6r9t0i6pZYI7Tnc4dzVNn9z0veJ71OhNARYbKJAhn8KPcyE80p+nzfnYufEF wKDAn+YpBUNQHTFlgxpN8vjZyQk/6B2Plsrx1BKCT7RzsPgMN0CEkRfy1SBqKlS0DRV9 xw== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2130.oracle.com with ESMTP id 2r44wtsd0x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 09 Mar 2019 17:43:43 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x29Hhggu012307 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 9 Mar 2019 17:43:42 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x29HhfJa026554; Sat, 9 Mar 2019 17:43:41 GMT MIME-Version: 1.0 Message-ID: Date: Sat, 9 Mar 2019 09:43:40 -0800 (PST) From: Drew Adams References: <> <<831s3g7zv1.fsf@gnu.org>> In-Reply-To: <<831s3g7zv1.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4810.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9190 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=702 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903090134 X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > > AFAICT neither the doc string nor the Elisp manual states what the > > default value is if argument DEF is nil. IOW, what is the default > > buffer name if no explicit default is provided? It seems (without > > thorough testing) to be the value of `(buffer-name (current-buffer))'. >=20 > No, it's an empty string, and I think the doc string already conveys > that. I cannot tell from the doc string that the default value, i.e., the value returned when DEF is nil, is the empty string. I don't see how/where the doc string conveys that at all. AFAICT, one would need to consult the C source code to find that info. Where in the doc string do find the info that a nil value of DEF returns "" if the user enters an empty line? Where do you see that stated or even implied? > (Note that if read-buffer-function is non-nil, what happens > then is entirely up to that function, which doesn't make it easy to > say exactly how DEF is handled.) It's not hard to state what the default DEF behavior is, and then later say that if `read-buffer-function' is non-nil then the use of the other args is up to it, i.e., not necessarily as described above. This is not unusual for a function that optionally accepts a function arg as one possibility. From unknown Fri Sep 05 18:47:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34794: 26.1; doc of `read-buffer' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Mar 2019 18:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34794 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams Cc: 34794@debbugs.gnu.org Received: via spool by 34794-submit@debbugs.gnu.org id=B34794.155215541913175 (code B ref 34794); Sat, 09 Mar 2019 18:17:01 +0000 Received: (at 34794) by debbugs.gnu.org; 9 Mar 2019 18:16:59 +0000 Received: from localhost ([127.0.0.1]:37377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h2gWp-0003QQ-Ih for submit@debbugs.gnu.org; Sat, 09 Mar 2019 13:16:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38376) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h2gWn-0003QD-NO for 34794@debbugs.gnu.org; Sat, 09 Mar 2019 13:16:58 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33844) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h2gWi-0001SQ-IY; Sat, 09 Mar 2019 13:16:52 -0500 Received: from [176.228.60.248] (port=1257 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h2gWd-0007WK-At; Sat, 09 Mar 2019 13:16:50 -0500 Date: Sat, 09 Mar 2019 20:16:22 +0200 Message-Id: <83r2bf7w21.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Drew Adams on Sat, 9 Mar 2019 09:43:40 -0800 (PST)) References: <> <<831s3g7zv1.fsf@gnu.org>> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Date: Sat, 9 Mar 2019 09:43:40 -0800 (PST) > From: Drew Adams > Cc: 34794@debbugs.gnu.org > > > > AFAICT neither the doc string nor the Elisp manual states what the > > > default value is if argument DEF is nil. IOW, what is the default > > > buffer name if no explicit default is provided? It seems (without > > > thorough testing) to be the value of `(buffer-name (current-buffer))'. > > > > No, it's an empty string, and I think the doc string already conveys > > that. > > I cannot tell from the doc string that the default value, > i.e., the value returned when DEF is nil, is the empty > string. Optional second arg DEF is value to return if user enters an empty line. Doesn't this say that when DEF is omitted the function will return that empty line? > > (Note that if read-buffer-function is non-nil, what happens > > then is entirely up to that function, which doesn't make it easy to > > say exactly how DEF is handled.) > > It's not hard to state what the default DEF behavior > is, and then later say that if `read-buffer-function' > is non-nil then the use of the other args is up to it, > i.e., not necessarily as described above. This is > not unusual for a function that optionally accepts a > function arg as one possibility. 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. From unknown Fri Sep 05 18:47:56 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Drew Adams Subject: bug#34794: closed (Re: bug#34794: 26.1; doc of `read-buffer') Message-ID: References: <83o96j7vl4.fsf@gnu.org> X-Gnu-PR-Message: they-closed 34794 X-Gnu-PR-Package: emacs Reply-To: 34794@debbugs.gnu.org Date: Sat, 09 Mar 2019 18:28:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1552156082-14166-1" This is a multi-part message in MIME format... ------------=_1552156082-14166-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #34794: 26.1; doc of `read-buffer' which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 34794@debbugs.gnu.org. --=20 34794: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D34794 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1552156082-14166-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 34794-done) by debbugs.gnu.org; 9 Mar 2019 18:27:06 +0000 Received: from localhost ([127.0.0.1]:37381 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h2ggc-0003fL-Jd for submit@debbugs.gnu.org; Sat, 09 Mar 2019 13:27:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h2gga-0003er-ON for 34794-done@debbugs.gnu.org; Sat, 09 Mar 2019 13:27:05 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34037) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h2ggV-00026w-Da; Sat, 09 Mar 2019 13:26:59 -0500 Received: from [176.228.60.248] (port=1896 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h2ggS-0004zG-NW; Sat, 09 Mar 2019 13:26:59 -0500 Date: Sat, 09 Mar 2019 20:26:31 +0200 Message-Id: <83o96j7vl4.fsf@gnu.org> From: Eli Zaretskii To: drew.adams@oracle.com In-reply-to: <83r2bf7w21.fsf@gnu.org> (message from Eli Zaretskii on Sat, 09 Mar 2019 20:16:22 +0200) Subject: Re: bug#34794: 26.1; doc of `read-buffer' References: <> <<831s3g7zv1.fsf@gnu.org>> <83r2bf7w21.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 34794-done Cc: 34794-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Date: Sat, 09 Mar 2019 20:16:22 +0200 > From: Eli Zaretskii > Cc: 34794@debbugs.gnu.org > > > I cannot tell from the doc string that the default value, > > i.e., the value returned when DEF is nil, is the empty > > string. > > Optional second arg DEF is value to return if user enters an empty line. > > Doesn't this say that when DEF is omitted the function will return > that empty line? I made a small change to make it even more clear. > > It's not hard to state what the default DEF behavior > > is, and then later say that if `read-buffer-function' > > is non-nil then the use of the other args is up to it, > > i.e., not necessarily as described above. This is > > not unusual for a function that optionally accepts a > > function arg as one possibility. > > 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. Didn't do anything about this. Feel free to reopen if you think the bug is not done without that. ------------=_1552156082-14166-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 9 Mar 2019 16:31:52 +0000 Received: from localhost ([127.0.0.1]:37300 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h2et6-0007H4-5n for submit@debbugs.gnu.org; Sat, 09 Mar 2019 11:31:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h2et3-0007Gr-N5 for submit@debbugs.gnu.org; Sat, 09 Mar 2019 11:31:50 -0500 Received: from lists.gnu.org ([209.51.188.17]:46977) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h2esy-0002EG-G4 for submit@debbugs.gnu.org; Sat, 09 Mar 2019 11:31:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h2esx-0004ss-QX for bug-gnu-emacs@gnu.org; Sat, 09 Mar 2019 11:31:44 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_MED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h2esx-0002Cm-5m for bug-gnu-emacs@gnu.org; Sat, 09 Mar 2019 11:31:43 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:34140) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h2esw-0002Br-SJ for bug-gnu-emacs@gnu.org; Sat, 09 Mar 2019 11:31:43 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x29GTZtQ155601 for ; Sat, 9 Mar 2019 16:31:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=NKbG88U6NNwHB2tv0nb2XGbt4UJyL4sczu0POo10zdM=; b=NP95sWezIuwVZAGqgOQZUOP6CB3A0HoWm+0NVCEGpD2mSLsfCqQx0N9Px7RvfdUwJ9Uc onbJvXNFk1MLanz0CB0W73fmqvpK7veOuyixgkxhnF+ofCMv1RIlrdsDQH632HpTsN6d lawMS+1I5QCvR/0or+Xl1TtXn+mQWvEIDMBCvqxVswM3TEHprmg9FUmElzqCispSTVny RAJaDkW1WO6vDCB13gQMHHb3m+/9yDTToMUIM6tyNPKdZvDXTMHu0aA8/vmenio1UBQc D5gKNi2zIA8O6NzLZiyKsDsL3lOaZQMJlSbOM338Mjc4vvI+/PE12lQrSQSMByMXRDFu pA== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2r430e9q99-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sat, 09 Mar 2019 16:31:41 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x29GVdIh014205 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sat, 9 Mar 2019 16:31:40 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x29GVdj5024243 for ; Sat, 9 Mar 2019 16:31:39 GMT MIME-Version: 1.0 Message-ID: Date: Sat, 9 Mar 2019 08:31:38 -0800 (PST) From: Drew Adams To: bug-gnu-emacs@gnu.org Subject: 26.1; doc of `read-buffer' X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4810.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9190 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=596 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903090125 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 141.146.126.79 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) AFAICT neither the doc string nor the Elisp manual states what the default value is if argument DEF is nil. IOW, what is the default buffer name if no explicit default is provided? It seems (without thorough testing) to be the value of `(buffer-name (current-buffer))'. In GNU Emacs 26.1 (build 1, x86_64-w64-mingw32) of 2018-05-30 built on CIRROCUMULUS Repository revision: 07f8f9bc5a51f5aa94eb099f3e15fbe0c20ea1ea Windowing system distributor 'Microsoft Corp.', version 10.0.17134 ------------=_1552156082-14166-1-- From unknown Fri Sep 05 18:47:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34794: 26.1; doc of `read-buffer' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Mar 2019 22:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34794 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii , Drew Adams Cc: 34794@debbugs.gnu.org Received: via spool by 34794-submit@debbugs.gnu.org id=B34794.155217075419703 (code B ref 34794); Sat, 09 Mar 2019 22:33:01 +0000 Received: (at 34794) by debbugs.gnu.org; 9 Mar 2019 22:32:34 +0000 Received: from localhost ([127.0.0.1]:37489 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h2kWA-00057j-6r for submit@debbugs.gnu.org; Sat, 09 Mar 2019 17:32:34 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:39738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h2kW7-00057V-RL for 34794@debbugs.gnu.org; Sat, 09 Mar 2019 17:32:33 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x29MTvlA137367; Sat, 9 Mar 2019 22:32:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=jm4ioGczLAAN1hWb1TuDVZAIDyGHevzVRP1/jGPi9iQ=; b=HqQrOiZFNWrTq4B4n9sPvqt+2r7CejV4sQgj2o/qSv7gM+tIYx4kruhyi4Itw5eI9ZpP nLCEKMUXTeoEJHDdM3HJpyZpeuZBGqJzA0TSvX/5OZgcwPTNQlgUR9p1O6sPBdkvHnsY eSeS5ibGVkxkENoXPpT66QlSyswtPHuZlnKJnZ/iSz5SOOiRUJ24x9A+m9xMmNin8GUR baCAmecjOXwxh7tpf4l6sn0nJ+my4yLQg71yigBUQrlaxHhQ89n2R1ymlP81aPlZV+AC Kqhep6qcqSys+wN/57RycbMPN62SvMJk1nJ8DDjXzQaBMTycpdlYugCxtMAnwZ7kcjjl aw== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2r464r1hww-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 09 Mar 2019 22:32:25 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x29MWO9n018906 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 9 Mar 2019 22:32:24 GMT Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x29MWNh2029669; Sat, 9 Mar 2019 22:32:23 GMT MIME-Version: 1.0 Message-ID: Date: Sat, 9 Mar 2019 14:32:22 -0800 (PST) From: Drew Adams References: <<>> <<<831s3g7zv1.fsf@gnu.org>>> <> <<83r2bf7w21.fsf@gnu.org>> In-Reply-To: <<83r2bf7w21.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4810.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9190 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903090171 X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > > > > AFAICT neither the doc string nor the Elisp manual states what the > > > > default value is if argument DEF is nil. IOW, what is the default > > > > buffer name if no explicit default is provided? It seems (without > > > > thorough testing) to be the value of `(buffer-name (current-buffer)= )'. > > > > > > No, it's an empty string, and I think the doc string already conveys > > > that. > > > > I cannot tell from the doc string that the default value, > > i.e., the value returned when DEF is nil, is the empty > > string. >=20 > Optional second arg DEF is value to return if user enters an empty line= . >=20 > Doesn't this say that when DEF is omitted the function will return > that empty line? No, it doesn't. If DEF is omitted it is nil. Is nil the "value to return if user enters an empty line?" I don't think so.=20 `RET' with empty input can result in anything one likes as default value. And other input-reading functions do so. There is nothing here that says that empty input results in the empty string being returned. > > > (Note that if read-buffer-function is non-nil, what happens > > > then is entirely up to that function, which doesn't make it easy to > > > say exactly how DEF is handled.) > > > > It's not hard to state what the default DEF behavior > > is, and then later say that if `read-buffer-function' > > is non-nil then the use of the other args is up to it, > > i.e., not necessarily as described above. This is > > not unusual for a function that optionally accepts a > > function arg as one possibility. >=20 > 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? Read the name of a buffer with completion and return it as a string. If option `read-buffer-function' is non-nil then it is a function that accepts all of the `read-buffer' arguments, in order, and returns a buffer name. That buffer name is returned by `read-buffer'. Otherwise, prompt with first arg PROMPT, a string that should end with a colon followed by a space char (`: '). Other args control the read behavior, as follows. Optional arg DEFAULT determines the return value if user input is empty (just `RET' with no minibuffer input): * If a non-nil list then return its first element. * If absent or nil then return the empty string, \"\". * If anything else then return it (DEFAULT). Non-nil optional arg REQUIRE-MATCH means allow only names of existing buffers as input. It is the same as for 'completing-read'. The names of all existing (live) buffers are completion candidates. Non-nil optional arg PREDICATE should be a function that accepts a buffer or buffer name as its first argument. It filters the list of candidate buffers, excluding any buffers for which it returns nil. Non-nil option `read-buffer-completion-ignore-case' means that buffer-name completion ignores case while reading the buffer name. [If you prefer, the description of the use of `read-buffer-function' could be moved to the end. I think it is probably better where it is. It definitely should not be put in the middle of descriptions of the arguments, IMO.] 2. I guessed wrt REQUIRE-MATCH, regarding which buffer names are completion candidates. 3. I also had to guess wrt PREDICATE, as the current doc does not say what is acceptable as an argument (buffer? buffer name?), and it doesn't say which way the predicate works as a filter: keeping things that satisfy it or excluding them. I guessed that it works with either a buffer or its name, and I guessed that it keeps things that satisfy it.=20 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. 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. Is that the behavior we want? That's the behavior I documented, above. Do you prefer a separate bug report for this bug, or can you fix it based on this report? 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'. =20 From unknown Fri Sep 05 18:47:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34794: 26.1; doc of `read-buffer' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Mar 2019 22:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34794 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii , drew.adams@oracle.com Cc: 34794-done@debbugs.gnu.org Received: via spool by 34794-done@debbugs.gnu.org id=D34794.155217090519954 (code D ref 34794); Sat, 09 Mar 2019 22:36:02 +0000 Received: (at 34794-done) by debbugs.gnu.org; 9 Mar 2019 22:35:05 +0000 Received: from localhost ([127.0.0.1]:37500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h2kYb-0005Bm-80 for submit@debbugs.gnu.org; Sat, 09 Mar 2019 17:35:05 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:35662) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h2kYZ-0005BG-F6 for 34794-done@debbugs.gnu.org; Sat, 09 Mar 2019 17:35:03 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x29MULhp169022; Sat, 9 Mar 2019 22:34:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=jp+bx/XJ1KIYpeVHrMwXbdx6Xn6OVcD5BLGkwT8qC6A=; b=ieM+vdd/PgxcfGOORfqBsBtoIei4xm/eV6qXIhlhQJr1DOH7Q4eDOkrLelblI+NldOlU xRQP5L5iR1/Rgn1Le2BrzEohF8B7hngM2n2BX0pwFmbpGxM/LlMnLfPSwT0ykwpS/ecB ZkiF8nOdoWoqOFXASvq4l9g9ZRkI39KbFssohKzVi8LAjSNqaB82cYOWTLAAG/UaN63D g8uQDuSH7dVjnI6ZkU4tIvGksZfp7hsR5gR2EjypqWRKjyWUVLUPxiDmd5ZyY9VGRRNA N7rI6u1ieXjORSvQ9D1q9b/n5SULlwdKytvDzelwiWi8Q3vc8ZyvdjGmfVgLyE8KVxDk eQ== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2r430ea2j4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 09 Mar 2019 22:34:57 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x29MYuBs016843 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 9 Mar 2019 22:34:57 GMT Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x29MYu2f008904; Sat, 9 Mar 2019 22:34:56 GMT MIME-Version: 1.0 Message-ID: Date: Sat, 9 Mar 2019 14:34:55 -0800 (PST) From: Drew Adams References: <<> <<831s3g7zv1.fsf@gnu.org>> > <<83r2bf7w21.fsf@gnu.org>> <<83o96j7vl4.fsf@gnu.org>> In-Reply-To: <<83o96j7vl4.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4810.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9190 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=918 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903090171 X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > > > It's not hard to state what the default DEF behavior > > > is, and then later say that if `read-buffer-function' > > > is non-nil then the use of the other args is up to it, > > > i.e., not necessarily as described above. This is > > > not unusual for a function that optionally accepts a > > > function arg as one possibility. > > > > 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. >=20 > Didn't do anything about this. Feel free to reopen if you think the > bug is not done without that. You asked me to suggest such a text. I just spent time doing so, and detailed several problems. Then I see that you already replied to yourself asking me for the suggestion, saying that you've already closed the bug. Please reopen the bug and consider my suggestions. Thx. From unknown Fri Sep 05 18:47:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34794: 26.1; doc of `read-buffer' 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 X-GNU-PR-Keywords: To: Drew Adams Cc: 34794@debbugs.gnu.org Received: via spool by 34794-submit@debbugs.gnu.org id=B34794.155224209526676 (code B ref 34794); Sun, 10 Mar 2019 18:22:01 +0000 Received: (at 34794) by debbugs.gnu.org; 10 Mar 2019 18:21:35 +0000 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 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 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 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 Date: Sun, 10 Mar 2019 20:21:14 +0200 Message-Id: <83o96i615x.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Drew Adams on Sat, 9 Mar 2019 14:32:22 -0800 (PST)) References: <<>> <<<831s3g7zv1.fsf@gnu.org>>> <> <<83r2bf7w21.fsf@gnu.org>> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > 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. From unknown Fri Sep 05 18:47:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34794: 26.1; doc of `read-buffer' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Mar 2019 22:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34794 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii , Drew Adams Cc: 34794@debbugs.gnu.org Received: via spool by 34794-submit@debbugs.gnu.org id=B34794.155225659925685 (code B ref 34794); Sun, 10 Mar 2019 22:24:02 +0000 Received: (at 34794) by debbugs.gnu.org; 10 Mar 2019 22:23:19 +0000 Received: from localhost ([127.0.0.1]:38481 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h36qk-0006gD-Pm for submit@debbugs.gnu.org; Sun, 10 Mar 2019 18:23:19 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:52724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h36qh-0006fv-Og for 34794@debbugs.gnu.org; Sun, 10 Mar 2019 18:23:16 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x2AMJZ18022892; Sun, 10 Mar 2019 22:23:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=FlrM6beO7q+sm/J0ssx5ox7d/etW2hZ6DVuS7nyqVFc=; b=qN/RqFT2KDGVZyFinbrk/9prTZVKmulr0yBiwtvfssqZl4dEsqvs7Vk5ewk+S3prnppr MJ3qwaL2Ms6IPk95KXz74ZMb04AhuFktZaPD37YVET2/xY7KIXJcOf2OYvt7ATmybZGP wzx0iSMrCAwgc9xLY6Pn76XdSVIP02qaztMMUuDb8rs3fC47z3ReagN4dlsjE4/KICFu jPkFfsid73YzPZBkH1XH4XSndI+ed6tvKsh9KABjKGeQnUiH4wQeT7nwlO7JVg4HHwXr Jc6avB50CGwV73XQg2wWFdcQppyFd1kOlA8g0RJRJbNhLHxH1zDmZlqv4+46Huo57p3C Iw== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2120.oracle.com with ESMTP id 2r464r3brx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 10 Mar 2019 22:23:09 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x2AMN8ZR001146 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 10 Mar 2019 22:23:09 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x2AMN6q2028145; Sun, 10 Mar 2019 22:23:06 GMT MIME-Version: 1.0 Message-ID: <48406c96-9f8e-47cf-92f1-525a9ea7077e@default> Date: Sun, 10 Mar 2019 15:23:05 -0700 (PDT) From: Drew Adams References: <<<>>> <<<<831s3g7zv1.fsf@gnu.org>>>> <<>> <<<83r2bf7w21.fsf@gnu.org>>> <> <<83o96i615x.fsf@gnu.org>> In-Reply-To: <<83o96i615x.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4810.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9191 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903100172 X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > I used some ideas from your suggestion. Thanks. Do you have a URL to the updated doc? > > 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. >=20 > AFAICT, it just behaves according to documentation of DEF. >=20 > > 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. >=20 > That's only valid for something the user types, AFAIU. Yes, you're right about that. "`t' means that the user is not allowed to exit unless the input is (or completes to) an element of COLLECTION __or is null__." I forgot about that last part. > > Do you prefer a separate bug report for this bug, or > > can you fix it based on this report? >=20 > I don't really see what is there to fix. I guess not. I would have thought that a DEF that isn't a buffer name - or at least a string - might helpfully raise an error. Let me see what other `read-*' functions do... `read-string', `read-passwd', and `read-regexps' act the same way: the DEFAULT(S) arg can be anything at all, and it is returned as is upon empty input. `read-string' doesn'tt necessarily return a string, and so on. Not great, I'd say. But at least `read-buffer' is not alone in such behavior. And I suppose there is some code somewhere that even takes advantage of such a "feature" somehow... I'm happy, however, to see that at least some `read-*' commands do raise an error if the DEFAULT arg is not a string or nil. `read-command', for example, raises an error if DEF is not a string (it doesn't require a command name, but that test is better than nothing): Hitting RET with no input here: (read-command "Command: " (selected-window)) raises wrong-type-argument stringp # Same thing for `read-number', though at least that tests for the expected type: (read-number "Number: " (selected-window)) wrong-type-argument numberp #) `read-face-name' raises an error even before trying to read! It doesn't wait for input: (read-face-name "Face: " (selected-window)) wrong-type-argument listp # BTW, `read-from-minibuffer' with non-nil READ arg and with DEFAULT-VALUE not a string or nil ends with an `End of file during parsing error': Hitting RET with no input here: (read-from-minibuffer "Input: " nil nil t nil (selected-window)) DEFAULT-VALUE of course "should be a string", but if it's not the error message is not as helpful as it could be. There's nothing to be done about this one, however, I guess. Perhaps it could spit out the thing it was passed as DEFAULT-VALUE, to let you know what `read' choked on. =20 `read-input-method-name' seems a bit problematic when passed a non-string, non-nil DEFAULT-VALUE arg. It tries to insert it into the prompt's "%s", which ends in an error such as=20 wrong-type-argument sequencep #) `read-language-name' raises a similar error: wrong-type-argument sequencep #) There isn't much consistency in these `read-*' functions wrt their handling of the DEFAULT arg. IMO at least some of them might be made better by testing whether that arg is of the proper type and raising a (somewhat relevant) error if not. From unknown Fri Sep 05 18:47:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34794: 26.1; doc of `read-buffer' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Mar 2019 14:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34794 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams Cc: 34794@debbugs.gnu.org Received: via spool by 34794-submit@debbugs.gnu.org id=B34794.15523143936258 (code B ref 34794); Mon, 11 Mar 2019 14:27:02 +0000 Received: (at 34794) by debbugs.gnu.org; 11 Mar 2019 14:26:33 +0000 Received: from localhost ([127.0.0.1]:39320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h3Lsu-0001cs-MH for submit@debbugs.gnu.org; Mon, 11 Mar 2019 10:26:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h3Lst-0001cd-Js for 34794@debbugs.gnu.org; Mon, 11 Mar 2019 10:26:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37336) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3Lso-0001V1-0O; Mon, 11 Mar 2019 10:26:26 -0400 Received: from [176.228.60.248] (port=2016 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h3Lsn-0002SS-Bv; Mon, 11 Mar 2019 10:26:25 -0400 Date: Mon, 11 Mar 2019 16:26:16 +0200 Message-Id: <83bm2h5vxz.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <48406c96-9f8e-47cf-92f1-525a9ea7077e@default> (message from Drew Adams on Sun, 10 Mar 2019 15:23:05 -0700 (PDT)) References: <<<>>> <<<<831s3g7zv1.fsf@gnu.org>>>> <<>> <<<83r2bf7w21.fsf@gnu.org>>> <> <<83o96i615x.fsf@gnu.org>> <48406c96-9f8e-47cf-92f1-525a9ea7077e@default> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Date: Sun, 10 Mar 2019 15:23:05 -0700 (PDT) > From: Drew Adams > Cc: 34794@debbugs.gnu.org > > Thanks. Do you have a URL to the updated doc? You can always see both the updated files and the changes here: https://savannah.gnu.org/projects/emacs Put the mouse point on "Source code" and click on "Browse Sources Repository" in the menu that drops down. On the page presented after that, click the branch you are interested in ("master" if you want to see Emacs 27 files). Then either click "tree" if you want to see the files, or on one of the commits under "log" if you want to see only the changes. From unknown Fri Sep 05 18:47:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34794: 26.1; doc of `read-buffer' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Mar 2019 15:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34794 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 34794@debbugs.gnu.org Received: via spool by 34794-submit@debbugs.gnu.org id=B34794.155231680010121 (code B ref 34794); Mon, 11 Mar 2019 15:07:01 +0000 Received: (at 34794) by debbugs.gnu.org; 11 Mar 2019 15:06:40 +0000 Received: from localhost ([127.0.0.1]:39356 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h3MVk-0002dA-68 for submit@debbugs.gnu.org; Mon, 11 Mar 2019 11:06:40 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:55348) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h3MVi-0002cv-8T for 34794@debbugs.gnu.org; Mon, 11 Mar 2019 11:06:38 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x2BExV9C000771; Mon, 11 Mar 2019 15:06:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=s54ZqxccP6wHPOX02VXfhzHkqXrsmHtlibUut4uZBAE=; b=cJhOdZRCRtvnwgB2iSY+YUMFlDG+HbtrT+iI4/ppbDzMBQZd/suribLV1QcWqYxKAV+g m0wq2TJ8J07yv6r9mwHdI6MbD6O4ACMhqtcHNLa5lMTlGdlwQjEKiizVrE0kqi3jf/EC Kj/z5Pm2TSdYmRjErv0XPOB6aLz7UNeG6wglkN9I7K2jIPdqE/xlWG3HUFsnTQ4Inagf ps2dWI27Nn7ZrtnwJEEGXiazHKD2LIDRNwdh+kVFjXqOe1sN0VzVkCwxlUAFtd9MxSTV LoGhuX/QhxMiUflfwip9MzDbmmV+6I3UXZIXHmlEypMkcr9PWIbFUVq5tdXMALyH7wC3 zw== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2120.oracle.com with ESMTP id 2r464r6y3f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 11 Mar 2019 15:06:31 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x2BF6Uwr026122 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 11 Mar 2019 15:06:30 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x2BF6UwC018656; Mon, 11 Mar 2019 15:06:30 GMT MIME-Version: 1.0 Message-ID: <8fab20a5-d50e-4b70-a9d3-fdf05b6c3ba0@default> Date: Mon, 11 Mar 2019 08:06:29 -0700 (PDT) From: Drew Adams References: <<<>>> <<<<831s3g7zv1.fsf@gnu.org>>>> <<>> <<<83r2bf7w21.fsf@gnu.org>>> <> <<83o96i615x.fsf@gnu.org>> <48406c96-9f8e-47cf-92f1-525a9ea7077e@default> <83bm2h5vxz.fsf@gnu.org> In-Reply-To: <83bm2h5vxz.fsf@gnu.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4810.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9192 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=719 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903110109 X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > > Thanks. Do you have a URL to the updated doc? >=20 > You can always see both the updated files and the changes here: > https://savannah.gnu.org/projects/emacs=20 > Put the mouse point on "Source code" and click on "Browse Sources > Repository" in the menu that drops down. On the page presented after > that, click the branch you are interested in ("master" if you want to > see Emacs 27 files). Then either click "tree" if you want to see the > files, or on one of the commits under "log" if you want to see only > the changes. Thanks. But looking in "log" I don't see "34794" or "read-buffer" in any of the commit messages at http://git.savannah.gnu.org/cgit/emacs.git/log/, even if I expand the messages. I see "34792" several times, but not "34794". I checked several of the commits with your name on them but didn't find any for this. Is there no direct URL for this commit log? I then tried "tree" instead of "log", but didn't know what to pick after that, for this doc string. From unknown Fri Sep 05 18:47:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34794: 26.1; doc of `read-buffer' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Mar 2019 15:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34794 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams Cc: 34794@debbugs.gnu.org Received: via spool by 34794-submit@debbugs.gnu.org id=B34794.155231723710750 (code B ref 34794); Mon, 11 Mar 2019 15:14:02 +0000 Received: (at 34794) by debbugs.gnu.org; 11 Mar 2019 15:13:57 +0000 Received: from localhost ([127.0.0.1]:39361 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h3Mcn-0002nK-0s for submit@debbugs.gnu.org; Mon, 11 Mar 2019 11:13:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h3Mcl-0002n6-OQ for 34794@debbugs.gnu.org; Mon, 11 Mar 2019 11:13:56 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38047) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3Mcg-0003Yb-8o; Mon, 11 Mar 2019 11:13:50 -0400 Received: from [176.228.60.248] (port=1044 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h3Mcf-0002VA-Gc; Mon, 11 Mar 2019 11:13:50 -0400 Date: Mon, 11 Mar 2019 17:13:41 +0200 Message-Id: <83zhq14f6i.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <8fab20a5-d50e-4b70-a9d3-fdf05b6c3ba0@default> (message from Drew Adams on Mon, 11 Mar 2019 08:06:29 -0700 (PDT)) References: <<<>>> <<<<831s3g7zv1.fsf@gnu.org>>>> <<>> <<<83r2bf7w21.fsf@gnu.org>>> <> <<83o96i615x.fsf@gnu.org>> <48406c96-9f8e-47cf-92f1-525a9ea7077e@default> <83bm2h5vxz.fsf@gnu.org> <8fab20a5-d50e-4b70-a9d3-fdf05b6c3ba0@default> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Date: Mon, 11 Mar 2019 08:06:29 -0700 (PDT) > From: Drew Adams > Cc: 34794@debbugs.gnu.org > > Thanks. But looking in "log" I don't see "34794" or > "read-buffer" in any of the commit messages at > http://git.savannah.gnu.org/cgit/emacs.git/log/, > even if I expand the messages. I see "34792" several > times, but not "34794". Documentation changes are committed to the emacs-26 branch, not to master. From unknown Fri Sep 05 18:47:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34794: 26.1; doc of `read-buffer' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Mar 2019 15:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34794 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 34794@debbugs.gnu.org Received: via spool by 34794-submit@debbugs.gnu.org id=B34794.155231767911497 (code B ref 34794); Mon, 11 Mar 2019 15:22:02 +0000 Received: (at 34794) by debbugs.gnu.org; 11 Mar 2019 15:21:19 +0000 Received: from localhost ([127.0.0.1]:39366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h3Mju-0002zN-Su for submit@debbugs.gnu.org; Mon, 11 Mar 2019 11:21:19 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:45410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h3Mjt-0002z7-27 for 34794@debbugs.gnu.org; Mon, 11 Mar 2019 11:21:17 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x2BFJ7jo019453; Mon, 11 Mar 2019 15:21:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=N4WEeIw3KJxVIiZhALEur3jo34yW6Y01G+mJ26CBGQQ=; b=Ty2HtFRAFb5uzzJk6X97iMLCPIzK9UfKZblrSAB2/4OV9zv/Yn3J9L6q9k8s2PHfwpPU 9Y8zzJqQF8BGcemwoyL83OUD0K0WhVnTlMtcPgA0L8QOPP+QcJ9uqgxaHIpz1BJ+UV2+ z5uQ5Vohon0e+tSmDyVllI1aV5h1Y6/QYGm+HOd6/5oIJp0168g6JLXQWrgdf/l8vEeh mPZ0HBmEL5f+L8OW3hO7B3GlXK4uCI3gwDvgotuwvmJh7QiNS5IUjCpXxtxXxj/REqA8 ivUqjSe5Whr2WFj9ikEfAmghwRj8x9oGgiogwXZS9tlVNGAc9jH33hykka5TPmt8n+Rh 6A== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2120.oracle.com with ESMTP id 2r464r72d6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 11 Mar 2019 15:21:10 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x2BFLAal021391 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 11 Mar 2019 15:21:10 GMT Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x2BFL9n6027602; Mon, 11 Mar 2019 15:21:10 GMT MIME-Version: 1.0 Message-ID: <61c9b4e0-aaa6-43af-8931-ecb82cd54861@default> Date: Mon, 11 Mar 2019 08:21:08 -0700 (PDT) From: Drew Adams References: <<<>>> <<<<831s3g7zv1.fsf@gnu.org>>>> <<>> <<<83r2bf7w21.fsf@gnu.org>>> <> <<83o96i615x.fsf@gnu.org>> <48406c96-9f8e-47cf-92f1-525a9ea7077e@default> <83bm2h5vxz.fsf@gnu.org> <8fab20a5-d50e-4b70-a9d3-fdf05b6c3ba0@default> <83zhq14f6i.fsf@gnu.org> In-Reply-To: <83zhq14f6i.fsf@gnu.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4810.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9192 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=568 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903110110 X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Documentation changes are committed to the emacs-26 branch, not to > master. Got it. That info was missing from your message (which pointed to Emacs 27). From unknown Fri Sep 05 18:47:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34794: 26.1; doc of `read-buffer' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Mar 2019 16:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34794 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii , Drew Adams Cc: 34794@debbugs.gnu.org Received: via spool by 34794-submit@debbugs.gnu.org id=B34794.155232060915961 (code B ref 34794); Mon, 11 Mar 2019 16:11:01 +0000 Received: (at 34794) by debbugs.gnu.org; 11 Mar 2019 16:10:09 +0000 Received: from localhost ([127.0.0.1]:39380 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h3NVA-00049M-Qb for submit@debbugs.gnu.org; Mon, 11 Mar 2019 12:10:09 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:49438) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h3NV8-00048g-Sm for 34794@debbugs.gnu.org; Mon, 11 Mar 2019 12:10:07 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x2BG9TRr068478; Mon, 11 Mar 2019 16:10:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=i4WBMll4jh4t751axFe5bJdKVthDkjc76USkfLTy7Gs=; b=QHWp9rnnZlfdexqgbpYurPnRX4ueDzh0Zc8pGvFd1MbDBxtWjKPv562GXPoDsTrwDJjM tGgVEVlHXoY+LyodcHYeO4fOVa122x0vRf8cHJpqj7VWxv3cohmcZ1Qhlg/fiqBm54su 1dz/un/eq/rWjLjJqQcYUHpDvU7UDG1s4YyWlvaavAPiyYFNc/Y3VQQFKFfVA0DHWnw7 euuqu/HQCLqA1KhYdZb902A1rjAtVlJ8vZ8mUeyTbYWAcoNaZHRsNwoyxCqjvfg3VB0z uEVmUaQi8vRoYbi7X9JNlnnkDO5WBEKvPWe4rozls6AiSYvp8JQQ0sM0jnxs9rcb3PtE kw== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2120.oracle.com with ESMTP id 2r464r7cr4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 11 Mar 2019 16:10:00 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x2BG9wDm030761 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 11 Mar 2019 16:09:59 GMT Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x2BG9wxH026034; Mon, 11 Mar 2019 16:09:58 GMT MIME-Version: 1.0 Message-ID: Date: Mon, 11 Mar 2019 09:09:57 -0700 (PDT) From: Drew Adams References: <<<>>> <<<<831s3g7zv1.fsf@gnu.org>>>> <<>> <<<83r2bf7w21.fsf@gnu.org>>> <> <<83o96i615x.fsf@gnu.org>> In-Reply-To: <<83o96i615x.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4810.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9192 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903110116 X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > > 1. OK. How about this? > Thanks, I used some ideas from your suggestion. Thx. Definitely better than what was there before the bug report. My (minor) feedback, FWIW: 1. It says that the return value is a string buffer name. That's generally, and probably expected to be, the case. But as we've seen, if DEF is not a string or a list of strings then the default return value is not a string. =09 It's an open question whether the doc should discourage using non-string values with DEF. If it should then the doc should do that. If it shouldn't then perhaps the doc should point out that DEF can violate this expectation of a string buffer name (GIGO). 2. "if user enters an empty line, instead of that empty string" is unclear. What empty string? No empty string has been mentioned, so "that" empty string doesn't mean anything. And what does "instead of" refer to? Is the user entering an empty line somehow instead of "that empty string"? Unclear. It should just say that empty input (not an empty "line", BTW - minibuffer input isn't line-oriented) means that the empty string is returned. 3. It should say which buffer names are completion candidates (all live buffers, it seems). This is different, for example, from the case of `read-file-name', which excludes some file names based on option `completion-ignored-extensions'. Many buffers, especially those users interact with, are visiting files, and it's not unreasonable to suppose that `completion-ignored-extension' or another, similar variable applies to `read-buffer'. There is no such variable - users can only use PREDICATE to exclude buffer names. 4. It's unclear that the `read-buffer-function' value, when called, is passed all of the args to `read-buffer', in order.