From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#43218: EWW handles default answer incorrectly when changing a select Date: Sun, 06 Sep 2020 01:59:28 +0200 Message-ID: <878sdn22sf.fsf@gnus.org> References: <86ft7wuoq0.fsf@hypra-xx> 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="13571"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 43218@debbugs.gnu.org, Stefan Monnier To: Nicolas Graner Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 06 02:00:12 2020 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 1kEi6N-0003T4-Gn for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 06 Sep 2020 02:00:11 +0200 Original-Received: from localhost ([::1]:56564 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kEi6M-0003GB-I4 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Sep 2020 20:00:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kEi6F-0003Fq-9Z for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2020 20:00:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:32814) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kEi6E-0006pj-Po for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2020 20:00:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kEi6E-00049z-N7 for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2020 20:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 06 Sep 2020 00:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43218 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 43218-submit@debbugs.gnu.org id=B43218.159935039015946 (code B ref 43218); Sun, 06 Sep 2020 00:00:02 +0000 Original-Received: (at 43218) by debbugs.gnu.org; 5 Sep 2020 23:59:50 +0000 Original-Received: from localhost ([127.0.0.1]:44360 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEi62-000497-D3 for submit@debbugs.gnu.org; Sat, 05 Sep 2020 19:59:50 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:39008) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEi60-00048q-AE for 43218@debbugs.gnu.org; Sat, 05 Sep 2020 19:59:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=TjV/J9yXoLymV31cUFzCO/wgOObCHg+fnL/RqqPZ8u0=; b=YcCCFcWlEgWKu/YNwkrIuEB4kW sa3fiyP/b9+r1UU0w7LK0wfZdtQvdBMjb6/iy7FT0ksHIXqaO426CUQcOpn9BnSYJnv7sa5pBqdGq CiM7w6YsS635uFSC48xl3+LOQN82tGs/AjvaP9BVUxZlrGStQjdYDURypK7TEC9nCHME=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kEi5i-0005ir-6K; Sun, 06 Sep 2020 01:59:40 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEXh4dqyvMG7q3// //+B6H/TAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+QJBRcwBc2KFv4AAAFhSURBVCjPRZKxaiwxDEWv wwjCVJ4gB9IlxYPHfoUmrFOksoMV2C7F+5DdhdfnEyZb7WdG8s4maszhSrqSMFDL/el0Og4IAKk2 oL8C3mONG+Du8QrjHjGoxiCR9PYLd09q0TTreEA8AIVJCqxdZAQ5iEQrQCwILy9110AGYso2tIZg MDfKe+JCDqrpIWZuaTagUArjg0p1QKh5+jQDg+HfFERzCQ68rXESnqL7sFSezJ7ZYc5kGUQrSAuS 0AySpiBUeHagpnX7555VDeLw3nZ1aqGbqppoU/k4bt1M4XABm7leVihgrk0Lks8GquoX9HEWyBBl LngOfjfyYyWV3uAafW3V0sXezW8uwMWHhvFvjGvaLMdNIE8rdvXn42afeo1qHpfNYg3gMI3L+GVA XXm9gtWowTKtSof8A+dxqQ4weDsf/6e1W4e8+uj27PUGnkaPS/kBLemyAve3fwzG8Ltp/Aa3Q2kW N64XuQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMC0wOS0wNVQyMzo0ODowNCswMDowMKNjmT8AAAAl dEVYdGRhdGU6bW9kaWZ5ADIwMjAtMDktMDVUMjM6NDg6MDQrMDA6MDDSPiGDAAAAAElFTkSuQmCC X-Now-Playing: Various's _For Discos Only (1)_: "Poussez! - Boogie With Me (12" Disco Mix)" In-Reply-To: <86ft7wuoq0.fsf@hypra-xx> (Nicolas Graner's message of "Sat, 05 Sep 2020 19:18:15 +0200") 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:187304 Archived-At: Nicolas Graner writes: > Activate the select and change its value to 'two'. > Activate it again and answer to the prompt for value: the > displayed value returns to 'one'. > > This is not critical as this situation is rare and the value sent to the > server will be correct anyway, but it is confusing to the user who does > not usually know the value of each option. That's true... there's also a general problem with how the values are selected: We're doing a completing-read over the display names, and then mapping that back to the values. But this is perfectly valid: But there's no way to select the second value in eww. Unfortunately, the Emacs primitives for prompting are very text-oriented, and don't allow putting properties on the values we're completing over, not even with: --- minibuffer-allow-text-properties is a variable defined in =E2=80=98src/mini= buf.c=E2=80=99. Its value is nil Probably introduced at or before Emacs version 20. Documentation: Non-nil means =E2=80=98read-from-minibuffer=E2=80=99 should not discard tex= t properties. This also affects =E2=80=98read-string=E2=80=99, but it does not affect =E2= =80=98read-minibuffer=E2=80=99, =E2=80=98read-no-blanks-input=E2=80=99, or any of the functions that do min= ibuffer input with completion; they always discard text properties. --- I wonder what the logic behind this is? And I also have a vague feeling I've asked this before... Perhaps Stefan knows and or remembers. :-) So the test case is: (let ((minibuffer-allow-text-properties t)) (completing-read "Foo: " (list (propertize "foo" 'data 'bar)) nil 'require-match)) =3D> "foo" instead of #("foo" 0 3 (data bar)) --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no