From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.help Subject: Re: completing-read depricated initial-input Date: Fri, 24 Jun 2022 14:31:35 +0300 Message-ID: References: <86r13hubaw.fsf_-_@gnu.org> <86letphfke.fsf_-_@gnu.org> <86mte3lsj2.fsf_-_@gnu.org> <871qvfoce1.fsf@web.de> <87zgi2tqwt.fsf@dataswamp.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10332"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/+ () (2022-05-21) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 24 13:39:23 2022 Return-path: Envelope-to: geh-help-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 1o4hel-0002TO-9k for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 24 Jun 2022 13:39:23 +0200 Original-Received: from localhost ([::1]:50922 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4hek-000211-7w for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 24 Jun 2022 07:39:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38228) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4hdB-0001zu-Nu for help-gnu-emacs@gnu.org; Fri, 24 Jun 2022 07:37:45 -0400 Original-Received: from stw1.rcdrun.com ([217.170.207.13]:43431) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4hd9-0006ql-UO for help-gnu-emacs@gnu.org; Fri, 24 Jun 2022 07:37:45 -0400 Original-Received: from localhost ([::ffff:197.239.7.48]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000087C51.0000000062B5A206.000066CA; Fri, 24 Jun 2022 04:37:42 -0700 Mail-Followup-To: help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <87zgi2tqwt.fsf@dataswamp.org> Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_SBL=0.141, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:138070 Archived-At: * Emanuel Berg [2022-06-24 11:26]: > Jean Louis wrote: > > > (read-from-minibuffer "Your name: " nil nil nil nil "Jean") > > Holy cow, there's no need to hard code that! What if you were > to change your name (nom de guerre if you wish) for romantic > and/or conspiratorial reasons? Use `user-full-name' > instead ... Which name? That is not name, that is: 1. jean, blue jean, denim -- ((usually plural) close-fitting trousers of heavy denim for manual work or casual wear) Jokes aside... 👁️ > >> Inserting default would make sense. We should not continue > >> with the initial-value name then. Stating that DEF will be > >> displayed as first instance. Making things smoother and > >> clearer to understand. > > > > I do not find it so. I do not say how function works, but > > I wish to say what I expect as user. > > We have been thinking of it in very practical terms so far. > > I already asked, what concept is the initial value? I'm not > aware of any such concept in this context. One can think of > several UIs (including GUIs) where the initial value has been > inserted to communicate the default value, and enable - > transparently, even - for the user to submit this value. > In that sense, it isn't that bad: the default value is shown > loud and clear, it can be edited and when its submitted this > happens with the same method so no extras in terms of > technology at that end. It is my sincere hope you will understand the difference between those two. 1) Default is what will be chosen if use press enter, regardless if user sees that default or not. That is my expectation, but read-from-minibuffer in development version does not behave this way. Personally I have heavy uses of defaults, such as "Default address" while some addresses are rather different "Work address" or "Temporary address". I need default address, thus it is usable for me. 2) Initial value is usable as it is visible and makes it easier to make the choice, but it is not necessarily default. My personal example is that some people have one address in Germany, other in Austria, but one of those addresses is default (this word now has no relation to Emacs). If letter has been sent last 2 times to Austria, system can recognize it and offer such as initial input. But if Austria is not choosen, or if nothing in particular has been seen in the prompt and user hits RET, then default German address would be choosen. Another example is that I am entering phone numbers every day. Communication line is "Phone" but type is "Default", which means nothing in particular. However, I start entering many mobile numbers, than I appreciate that system looks in past and offers me "Mobile" as initial input, just to press enter, while my Default would be choosen if I delete it and press enter on empty minibuffer. ┌───────────────────────┬────────┐ │ Addreses in last year │ Count │ ├───────────────────────┼────────┤ │ Addresses │ 197299 │ └───────────────────────┴────────┘ The above personal example I go through many times per day. In my example I do not use initial-value to communicate default, but to communicate the choice which could be more probable based on last information. That choice may be dynamically chosen, it is not hard code. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/