unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Nacho Barrientos <nacho.barrientos@cern.ch>
Cc: 58669-done@debbugs.gnu.org
Subject: bug#58669: 28.2; bindat: str and strz not operating on vectors
Date: Fri, 21 Oct 2022 11:29:45 -0400	[thread overview]
Message-ID: <jwv8rl99ozl.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87tu3ymm51.fsf@cern.ch> (Nacho Barrientos's message of "Thu, 20 Oct 2022 14:18:13 +0200")

Hola Nacho,

Nacho Barrientos [2022-10-20 14:18:13] wrote:
> Debugger entered--Lisp error: (wrong-type-argument listp [78 111 110 101])
>   apply(unibyte-string [78 111 110 101])

Duh, yes the code was clearly wrong.

> With the attached patch both return the string "None" as expected (well,
> as I'd expect, *grins*). The diff also adds some extra tests.

Thanks, pushed to `master`.

> It's the first time that I look into this package so I'm not sure this
> is the way it's meant to work but similar operations work fine on
> vectors of bytes, for instance:

Yes, I'm actually surprised I left this code in there as-is because
I remember wondering how to make a unibyte string from a vector of bytes
in an efficient way (and concluding that there's currently no good way
to do that :-( ).


        Stefan






  parent reply	other threads:[~2022-10-21 15:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-20 12:18 bug#58669: 28.2; bindat: str and strz not operating on vectors Nacho Barrientos
2022-10-20 20:57 ` Stefan Kangas
2022-10-21 15:29 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-10-21 16:02   ` Eli Zaretskii
2022-10-21 16:47     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-21 17:16       ` Eli Zaretskii
2022-10-21 18:34         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-23  8:18   ` Nacho Barrientos

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=jwv8rl99ozl.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=58669-done@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=nacho.barrientos@cern.ch \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).