all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mauro Aranda <maurooaranda@gmail.com>
To: Robert Pluim <rpluim@gmail.com>
Cc: Fernando de Morais <fernandodemorais.jf@gmail.com>,
	60501@debbugs.gnu.org
Subject: bug#60501: 28.2; pr-interface: widget-default-create: Wrong type argument
Date: Wed, 4 Jan 2023 13:07:21 -0300	[thread overview]
Message-ID: <f5d1bb1a-2145-0664-91c2-41951119f500@gmail.com> (raw)
In-Reply-To: <87r0wai929.fsf@gmail.com>

Robert Pluim <rpluim@gmail.com> writes:

 >>>>>> On Wed, 4 Jan 2023 12:21:55 -0300, Mauro Aranda
 > <maurooaranda@gmail.com> said:
 >
 >     Mauro> I don't have a lot of time right now, but I took a look at
 >     Mauro> the code in
 >     Mauro> printing.el and I don't really understand why its using 
:inline t
 >     Mauro> when creating the menu-choice widget, since the values 
seem to be
 >     Mauro> strings or symbols.  That is, nothing that needs to be 
inlined.
 >
 > OK. I canʼt comment on that, but we should try to be defensive
 >
 >     Mauro> I wasn't aware of this breakage, of course, but it looks 
like I
 >     Mauro> should've made the code be more defensive (i.e., use
 >     Mauro> car-safe instead of
 >     Mauro> car).
 >
 > How about this (using car-safe would result in nil):
 >
 > diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
 > index 8250316bcc7..f4a49f58bed 100644
 > --- a/lisp/wid-edit.el
 > +++ b/lisp/wid-edit.el
 > @@ -2231,7 +2231,9 @@ widget-choice-value-create
 >              (if (widget-get current :inline)
 >                  (setq val value
 >                        fun :match-inline)
 > -              (setq val (car value)
 > +              (setq val (if (consp value)
 > +                            (car value)
 > +                          value)
 >                      fun :match))
 >            (setq val value
 >                  fun :match))


Yes, that should do.

Thanks for taking care of this.







  reply	other threads:[~2023-01-04 16:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-02 20:08 bug#60501: 28.2; pr-interface: widget-default-create: Wrong type argument Fernando de Morais
2023-01-04 10:47 ` Robert Pluim
2023-01-04 15:21   ` Mauro Aranda
2023-01-04 16:00     ` Robert Pluim
2023-01-04 16:07       ` Mauro Aranda [this message]
2023-01-04 16:12         ` Robert Pluim
2023-01-04 17:10           ` Eli Zaretskii
2023-01-06  9:08             ` Robert Pluim

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=f5d1bb1a-2145-0664-91c2-41951119f500@gmail.com \
    --to=maurooaranda@gmail.com \
    --cc=60501@debbugs.gnu.org \
    --cc=fernandodemorais.jf@gmail.com \
    --cc=rpluim@gmail.com \
    /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.