From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#22957: C-u C-x = prints garbage for a text property with value '(string . ?") Date: Mon, 29 Jul 2019 15:09:10 +0200 Message-ID: <87lfwh7zt5.fsf@mouse.gnus.org> References: <20160309055441.GA2490@acm.fritz.box> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="238301"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 22957@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 29 15:10:13 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hs5Po-000zr0-It for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Jul 2019 15:10:12 +0200 Original-Received: from localhost ([::1]:52018 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hs5Pm-00015H-Sh for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Jul 2019 09:10:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40416) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hs5Pf-0000zf-SR for bug-gnu-emacs@gnu.org; Mon, 29 Jul 2019 09:10:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hs5Pe-00019J-Kr for bug-gnu-emacs@gnu.org; Mon, 29 Jul 2019 09:10:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38997) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hs5Pe-00018b-Hi for bug-gnu-emacs@gnu.org; Mon, 29 Jul 2019 09:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hs5Pe-0007q3-9n for bug-gnu-emacs@gnu.org; Mon, 29 Jul 2019 09:10: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: Mon, 29 Jul 2019 13:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22957 X-GNU-PR-Package: emacs Original-Received: via spool by 22957-submit@debbugs.gnu.org id=B22957.156440576030069 (code B ref 22957); Mon, 29 Jul 2019 13:10:02 +0000 Original-Received: (at 22957) by debbugs.gnu.org; 29 Jul 2019 13:09:20 +0000 Original-Received: from localhost ([127.0.0.1]:47816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hs5Oy-0007ov-8q for submit@debbugs.gnu.org; Mon, 29 Jul 2019 09:09:20 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:43148) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hs5Ot-0007oa-Ad for 22957@debbugs.gnu.org; Mon, 29 Jul 2019 09:09:16 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hs5Oo-0002AL-SX; Mon, 29 Jul 2019 15:09:13 +0200 In-Reply-To: <20160309055441.GA2490@acm.fritz.box> (Alan Mackenzie's message of "Wed, 9 Mar 2016 05:54:41 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:164021 Archived-At: Alan Mackenzie writes: > Hello, Emacs. > > In the master branch: > emacs -Q > . > In the *scratch* buffer, with point at any character, do: > > M-: (put-text-property (point) (1+ (point)) 'asdf '(string . ?\")) > > . Without moving point, > > C-u C-x = > > . There appears in the *Help* buffer the following: > > There are text properties here: > asdf string (widget)Top > face font-lock-comment-face > fontified t > > . The entry for "asdf" is garbage. It should show the actual value of > the text property just set, not "string (widget)Top". The same thing > happens in Emacs 24.5 (and presumably the emacs-25 branch). Indeed. > Initial investigation: > > The symbol 'string has a 'widget-type property. Without validating the > structure (or lack thereof) of the assumed widget value, > `describe-property-list' attempts to enter the "widget browser" rather > than printing the full value of the 'asdf text property. `describe-property-list' is a very general-sounding function, and doesn't mention anything about widgets, so having it do widget stuff is rather surprising. The only callers to this function are from descr-text and as far as I can tell, none of them are widget-ey. Looking at the commit log, it looks like there was a bunch of widget stuff in here before, but it's been removed. Perhaps this was just forgotten? The following trivial patch fixes the problem. Any opinions? diff --git a/lisp/descr-text.el b/lisp/descr-text.el index 8be2b94458..ba53aeb385 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el @@ -88,8 +88,6 @@ describe-property-list (insert-text-button (format "%S" value) 'type 'help-face 'help-args (list value))) - ((widgetp value) - (describe-text-widget value)) (t (describe-text-sexp value)))) (insert "\n"))) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no