From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#22957: C-u C-x = prints garbage for a text property with value '(string . ?") Date: Tue, 30 Jul 2019 09:45:56 +0000 Message-ID: <20190730094556.GB5427@ACM> References: <20160309055441.GA2490@acm.fritz.box> <87lfwh7zt5.fsf@mouse.gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="268178"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: 22957@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 30 11:47:20 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 1hsOj2-0017eW-GU for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Jul 2019 11:47:20 +0200 Original-Received: from localhost ([::1]:59260 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsOj1-000880-EG for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Jul 2019 05:47:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36071) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsOil-00087s-Dy for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2019 05:47:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hsOik-0001lU-78 for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2019 05:47:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40736) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hsOik-0001lP-3h for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2019 05:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hsOij-0008Rv-UY for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2019 05:47:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Jul 2019 09:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22957 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 22957-submit@debbugs.gnu.org id=B22957.156447996329414 (code B ref 22957); Tue, 30 Jul 2019 09:47:01 +0000 Original-Received: (at 22957) by debbugs.gnu.org; 30 Jul 2019 09:46:03 +0000 Original-Received: from localhost ([127.0.0.1]:49557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hsOhm-0007dy-Ka for submit@debbugs.gnu.org; Tue, 30 Jul 2019 05:46:03 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:24123 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1hsOhk-0007Zq-1g for 22957@debbugs.gnu.org; Tue, 30 Jul 2019 05:46:00 -0400 Original-Received: (qmail 84033 invoked by uid 3782); 30 Jul 2019 08:53:27 -0000 Original-Received: from acm.muc.de (p4FE15868.dip0.t-ipconnect.de [79.225.88.104]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 30 Jul 2019 10:53:26 +0200 Original-Received: (qmail 5490 invoked by uid 1000); 30 Jul 2019 09:45:56 -0000 Content-Disposition: inline In-Reply-To: <87lfwh7zt5.fsf@mouse.gnus.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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:164098 Archived-At: Hello, Lars. On Mon, Jul 29, 2019 at 15:09:10 +0200, Lars Ingebrigtsen wrote: > 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? It does indeed fix the problem. I haven't tracked down anything in the commit log, but I can believe there's no widget stuff left to drive that cond arm. And even if there were, it would only be a corner case (like the original bug scenario was). I feel only a slight unease at removing that cond arm, which would no doubt dissipate if I took more time to look at it again. So, I would agree with you: apply the patch and close the bug. :-) > 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 -- Alan Mackenzie (Nuremberg, Germany).