all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Alan Mackenzie <acm@muc.de>
Cc: 22957@debbugs.gnu.org
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	[thread overview]
Message-ID: <87lfwh7zt5.fsf@mouse.gnus.org> (raw)
In-Reply-To: <20160309055441.GA2490@acm.fritz.box> (Alan Mackenzie's message of "Wed, 9 Mar 2016 05:54:41 +0000")

Alan Mackenzie <acm@muc.de> 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





  reply	other threads:[~2019-07-29 13:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-09  5:54 bug#22957: C-u C-x = prints garbage for a text property with value '(string . ?") Alan Mackenzie
2019-07-29 13:09 ` Lars Ingebrigtsen [this message]
2019-07-30  9:45   ` Alan Mackenzie
2019-07-30 10:10     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lfwh7zt5.fsf@mouse.gnus.org \
    --to=larsi@gnus.org \
    --cc=22957@debbugs.gnu.org \
    --cc=acm@muc.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.