From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [External] : Re: master 513c5d827d: Use `format-prompt' in Date: Tue, 06 Sep 2022 15:37:55 +0300 Message-ID: <83a67ck7a4.fsf@gnu.org> References: <83ilm4om39.fsf@gnu.org> <87r10sizhc.fsf@gnus.org> <83fsh8ol0v.fsf@gnu.org> <87ilm4iyeh.fsf@gnus.org> <8735d6fcqz.fsf@gmail.com> <83a67ekpx9.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7626"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rpluim@gmail.com, drew.adams@oracle.com, larsi@gnus.org, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 06 15:05:48 2022 Return-path: Envelope-to: ged-emacs-devel@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 1oVYGx-0001ms-Qk for ged-emacs-devel@m.gmane-mx.org; Tue, 06 Sep 2022 15:05:47 +0200 Original-Received: from localhost ([::1]:48838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oVYGt-00080q-Fq for ged-emacs-devel@m.gmane-mx.org; Tue, 06 Sep 2022 09:05:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52440) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVXqJ-0003Zg-P0 for emacs-devel@gnu.org; Tue, 06 Sep 2022 08:38:15 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41354) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVXqJ-0007ES-Bx; Tue, 06 Sep 2022 08:38:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=1W9ESsJjtDh+cefIm9IGsSI87uC9ZP6gq2CvLJ04PEs=; b=YNKq9y3uex2y 0zpiP/SVWhPywu+UKsOyolsM48XehIo2ZuZiD0r5QA4xxw267Xr1VRN0Hccs/wbsMiywZ9o0ZIzX/ z3SxT/yU3HM7/yFdpRE8m+CcYMknG9bYYbqWj0LAQDLFLXrwJj5gfztqpx1tjzh96FaogbRW5jT/S hbu4ibXvbd0FwUsrcEfUew0r7gAuS9FlJMKmYSChZhEFoOHzwdWw+5PSDPYfRNGiJDus8/5rR9wNX NuB305wR2NjujlED/vBKzpjoeyeDoXzzyq38g2V3bZ9IaPAkHMUtUeuDPWiZ53EZKw8mNoB6M0yDr Vg2O0AbTnUVMwvguxFG1+g==; Original-Received: from [87.69.77.57] (port=2905 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVXqI-0004Zc-EO; Tue, 06 Sep 2022 08:38:14 -0400 In-Reply-To: (message from Richard Stallman on Tue, 06 Sep 2022 00:16:33 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:294784 Archived-At: > From: Richard Stallman > Cc: rpluim@gmail.com, drew.adams@oracle.com, larsi@gnus.org, > emacs-devel@gnu.org > Date: Tue, 06 Sep 2022 00:16:33 -0400 > > > That part is fine, but the fact that using format-prompt splits the > > prompt text into two seemingly unrelated parts is a disadvantage, IMO. > > I wonder if we can do something about that, given that this function > > was released with Emacs 28. > > I suspect that the crucial issue here will be how it affects translation. Not only that. The readability is also diminished. Compare (read-char-by-name "Unicode name, single char, or hex, default all: " t)) with (read-char-by-name (format-prompt "Unicode name, single char, or hex" "all") t) To me, the first one tells very accurately what will the user see as the prompt, while the second doesn't. > Someone said that it will be hard to define the translations for strings > used in format-prompt. I don't know enough about the details to know > whether that is true, but we should find out. > > Would someone like to present that argument fully and clearly? The argument regarding translations is that "though shalt never break a complete sentence into several parts, then concatenate them at run time". That's because each part will be a separate translatable string, and when those translations are concatenated, the result will make sense in English, but not necessarily in other languages. In this case, there are 3 separate strings: "Unicode name, single char, or hex" ", default " "all" Translators should always see complete phrases and sentences to be able to translate them correctly into any arbitrary language.