From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh Newsgroups: gmane.emacs.bugs Subject: bug#56183: 29.0.50; read-from-minibuffer does not result with default value Date: Fri, 24 Jun 2022 13:33:16 +0530 Message-ID: <87edzemqt7.fsf@gmail.com> References: <86zgi2k0ch.fsf@protected.rcdrun.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="875"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 56183@debbugs.gnu.org To: Jean Louis Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 24 10:04:36 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o4eIu-000AT9-7i for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Jun 2022 10:04:36 +0200 Original-Received: from localhost ([::1]:42972 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4eIs-00062e-N5 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Jun 2022 04:04:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33952) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4eIN-000609-An for bug-gnu-emacs@gnu.org; Fri, 24 Jun 2022 04:04:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46879) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o4eIM-0001Ix-9m for bug-gnu-emacs@gnu.org; Fri, 24 Jun 2022 04:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o4eIM-0000hg-1i for bug-gnu-emacs@gnu.org; Fri, 24 Jun 2022 04:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Visuwesh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Jun 2022 08:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56183 X-GNU-PR-Package: emacs Original-Received: via spool by 56183-submit@debbugs.gnu.org id=B56183.16560578192674 (code B ref 56183); Fri, 24 Jun 2022 08:04:02 +0000 Original-Received: (at 56183) by debbugs.gnu.org; 24 Jun 2022 08:03:39 +0000 Original-Received: from localhost ([127.0.0.1]:40776 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4eHy-0000h4-Ot for submit@debbugs.gnu.org; Fri, 24 Jun 2022 04:03:39 -0400 Original-Received: from mail-pg1-f196.google.com ([209.85.215.196]:39792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4eHu-0000go-92 for 56183@debbugs.gnu.org; Fri, 24 Jun 2022 04:03:36 -0400 Original-Received: by mail-pg1-f196.google.com with SMTP id q140so1710583pgq.6 for <56183@debbugs.gnu.org>; Fri, 24 Jun 2022 01:03:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=xC2xeJLORXDQhejys5my1Vdjhnc2fYT6n2RIaxulCYE=; b=ZSG++nsdvDAVTGHsnZelbBn4bYrSVw2SglM3FVtgEsFChQDDY/2Z1XfrMxpvvk2kpb cQfPUGBd6vuAeomAaoXt+M5Y7bG7+d2O/Z8cBWzc1X8e/fL54wxBiH8bRrf2tD6rcx5k UNuhTgkAqmknW39c1+vkKOnlaeMbKVzhJShf4nVEpgjMDDDDNWseN/iKwAM3NTkq+U0U VYHrm+i9pHDs8e15iulxs6PgHTjuWDG2RZJnDHxrbqO2z4xK4PfH0wLOv8jDtgRcXUDC YcbTMZ9G7sLwil8ab3j7Fn0Py/1cvj46dLZ1gj8I9Lerqa6ycNP97/lOqFJLtU25uUU5 SmWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=xC2xeJLORXDQhejys5my1Vdjhnc2fYT6n2RIaxulCYE=; b=4XOfu/Eghzdxp8YkTDmpDNINGCckRaKqKY+x46blrLwcKRFSftH2HvfoYCZivZo9Qe l6xPFTaEUETsHi7vwLpuzC09IgBZ6L9L769WpjTi6qS80Uw+ix/hqwga2WscX/AaHVyg xJs8/DZmjSn1tgGrP+duTi5LY6BPNI3x3fGz/IIqbKeoA3n68CR1WDhWlbBWRsDS1+EL 38/17w3zNmIeDGRRa8LUiYUDjCygqZW8tY3e5OfWKdzObdMHOxuthz7IQCG4QK1uwlz4 Wr2SZCjL1S0+R8kESgwXCUJ5Ir5KSQ+C36Jwqgfwjbeu1ZlfjnDyloqBQ0EtFP3t4+UU 4QGQ== X-Gm-Message-State: AJIora86SQ9bI79XUOZ4oZ70bEUCZW6JNFvA2ZafzgUzxNVoDcW1YeO2 c3GALA4DATSdUtriBuEZiTk= X-Google-Smtp-Source: AGRyM1sNgEhQbvjs2fQwXA6aTk+ogbeRE4CkoAkcuFcIOAl/vWogrqXtelNCuWwLuKLB+zgHbACfMw== X-Received: by 2002:a05:6a00:2311:b0:4e1:52bf:e466 with SMTP id h17-20020a056a00231100b004e152bfe466mr44927776pfh.77.1656057808286; Fri, 24 Jun 2022 01:03:28 -0700 (PDT) Original-Received: from localhost ([49.204.128.184]) by smtp.gmail.com with ESMTPSA id y16-20020a17090264d000b0016a12fab6c2sm1083870pli.307.2022.06.24.01.03.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jun 2022 01:03:27 -0700 (PDT) In-Reply-To: <86zgi2k0ch.fsf@protected.rcdrun.com> (Jean Louis's message of "Fri, 24 Jun 2022 10:05:34 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:235157 Archived-At: [=E0=AE=B5=E0=AF=86=E0=AE=B3=E0=AF=8D=E0=AE=B3=E0=AE=BF =E0=AE=9C=E0=AF=82= =E0=AE=A9=E0=AF=8D 24, 2022] Jean Louis wrote: > How I understand the "default" is that it should be the value > that function gives as result in case when user does not write > anything else, hits enter. > > However, it does not work this way with `read-from-minibuffer', > so I will file bug report. > > (read-from-minibuffer "Your name: " nil nil nil nil "Jean") =E2=87=92 "" > As the docstring of read-from-minibuffer says, READ should be non-nil if DEFAULT-VALUE is to be returned: Sixth arg DEFAULT-VALUE, if non-nil, should be a string, which is used as the default to =E2=80=98read=E2=80=99 if READ is non-nil and the u= ser enters empty input. But if READ is nil, this function does _not_ return DEFAULT-VALUE for empty input! Instead, it returns the empty string. so everything works as expected. Try (read-from-minibuffer "Your name: " nil nil t nil "Jean") instead. > However, in this function it does work the expected way: > > (completing-read "Your name: " '("Jean" "Emmanuel" "Adebayo") nil nil nil= nil "Jean") =E2=87=92 "Jean" > > (completing-read "Your name: " '("Jean" "Emmanuel" "Adebayo") nil nil nil= nil "Adebayo") =E2=87=92 "Adebayo" > > > > In GNU Emacs 29.0.50 (build 10, x86_64-pc-linux-gnu, X toolkit, cairo ver= sion 1.17.6, Xaw3d scroll bars) > of 2022-06-18 built on protected.rcdrun.com > Repository revision: 99577312f569e22f05a4d0960cc881ff46d4dc3a > Repository branch: master > Windowing system distributor 'The X.Org Foundation', version 11.0.12101003 > System Description: Parabola GNU/Linux-libre > > Configured using: > 'configure --with-x-toolkit=3Dlucid' > > Configured features: > ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG > JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY > PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS > WEBP X11 XAW3D XDBE XIM XINPUT2 XPM LUCID ZLIB > > Important settings: > value of $LC_ALL: en_US.UTF-8 > value of $LANG: de_DE.UTF-8 > value of $XMODIFIERS: @im=3Dexwm-xim > locale-coding-system: utf-8-unix > > Major mode: Lisp Interaction > > Minor modes in effect: > tooltip-mode: t > global-eldoc-mode: t > eldoc-mode: t > show-paren-mode: t > electric-indent-mode: t > mouse-wheel-mode: t > tool-bar-mode: t > menu-bar-mode: t > file-name-shadow-mode: t > global-font-lock-mode: t > font-lock-mode: t > blink-cursor-mode: t > line-number-mode: t > indent-tabs-mode: t > transient-mark-mode: t > auto-composition-mode: t > auto-encryption-mode: t > auto-compression-mode: t > > Load-path shadows: > None found. > > Features: > (shadow sort mail-extr emacsbug message mailcap yank-media rmc puny > dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg > rfc6068 epg-config gnus-util text-property-search time-date seq gv > subr-x byte-opt bytecomp byte-compile cconv mm-decode mm-bodies > mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs > cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils > iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks > lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd > tool-bar dnd fontset image regexp-opt fringe tabulated-list replace > newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar > rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock > font-lock syntax font-core term/tty-colors frame minibuffer nadvice > simple cl-generic indonesian philippine cham georgian utf-8-lang > misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms > cp51932 hebrew greek romanian slovak czech european ethiopic indian > cyrillic chinese composite emoji-zwj charscript charprop case-table > epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button > loaddefs faces cus-face macroexp files window text-properties overlay > sha1 md5 base64 format env code-pages mule custom widget keymap > hashtable-print-readable backquote threads dbusbind inotify lcms2 > dynamic-setting system-font-setting font-render-setting cairo x-toolkit > xinput2 x multi-tty make-network-process emacs) > > Memory information: > ((conses 16 47056 8487) > (symbols 48 6255 3) > (strings 32 17744 2189) > (string-bytes 1 558767) > (vectors 16 12163) > (vector-slots 8 172412 13460) > (floats 8 22 38) > (intervals 56 246 0) > (buffers 992 11))