From mboxrd@z Thu Jan 1 00:00:00 1970
Path: news.gmane.org!.POSTED!not-for-mail
From: Philipp Stephani
Newsgroups: gmane.emacs.bugs
Subject: bug#34104: 26.1; Inaccurate error report of (sort "cba" #'<)
Date: Thu, 17 Jan 2019 23:43:16 +0100
Message-ID:
References: <17949751547650399@iva2-6ec8f0a6115e.qloud-c.yandex.net>
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="000000000000733261057faf1f89"
X-Trace: blaine.gmane.org 1547764924 27009 195.159.176.226 (17 Jan 2019 22:42:04 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 17 Jan 2019 22:42:04 +0000 (UTC)
Cc: 34104@debbugs.gnu.org
To: mail@xuchunyang.me
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 17 23:42:00 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 esmtp (Exim 4.84_2)
(envelope-from )
id 1gkGMJ-0006rj-5R
for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Jan 2019 23:41:59 +0100
Original-Received: from localhost ([127.0.0.1]:57001 helo=lists.gnu.org)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from )
id 1gkGOQ-00072l-0E
for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Jan 2019 17:44:10 -0500
Original-Received: from eggs.gnu.org ([209.51.188.92]:59821)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from ) id 1gkGOJ-00070R-L5
for bug-gnu-emacs@gnu.org; Thu, 17 Jan 2019 17:44:04 -0500
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1gkGOI-0004sN-Ru
for bug-gnu-emacs@gnu.org; Thu, 17 Jan 2019 17:44:03 -0500
Original-Received: from debbugs.gnu.org ([209.51.188.43]:36133)
by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
(Exim 4.71) (envelope-from )
id 1gkGOI-0004sB-Nc
for bug-gnu-emacs@gnu.org; Thu, 17 Jan 2019 17:44:02 -0500
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
(envelope-from ) id 1gkGOI-0003Ji-GS
for bug-gnu-emacs@gnu.org; Thu, 17 Jan 2019 17:44:02 -0500
X-Loop: help-debbugs@gnu.org
Resent-From: Philipp Stephani
Original-Sender: "Debbugs-submit"
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Thu, 17 Jan 2019 22:44:02 +0000
Resent-Message-ID:
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 34104
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
Original-Received: via spool by 34104-submit@debbugs.gnu.org id=B34104.154776501512710
(code B ref 34104); Thu, 17 Jan 2019 22:44:02 +0000
Original-Received: (at 34104) by debbugs.gnu.org; 17 Jan 2019 22:43:35 +0000
Original-Received: from localhost ([127.0.0.1]:35414 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1gkGNr-0003Iv-3o
for submit@debbugs.gnu.org; Thu, 17 Jan 2019 17:43:35 -0500
Original-Received: from mail-ot1-f46.google.com ([209.85.210.46]:44510)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1gkGNp-0003Ij-DH
for 34104@debbugs.gnu.org; Thu, 17 Jan 2019 17:43:33 -0500
Original-Received: by mail-ot1-f46.google.com with SMTP id f18so12662080otl.11
for <34104@debbugs.gnu.org>; Thu, 17 Jan 2019 14:43:33 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:cc; bh=pkOg8qE3QGIW9QKqB18o8f+LbI+BQ3moH2oOytz8VyM=;
b=b42C7hB61x07kYY8FGe/OVsLVPLa5B05leQ9XEr2z/m7lunmgkfKSd8G6OV+UqNEb0
+8Q9yg+mB62a1WvxdWw2rNOFKTVJIRHE/O7jnrIxTLSMJ+9tRInCJHuW8SHshcAMLwIi
Fi1lays0CxupBJRy/BP6gf/33At0V85BTQvqLokDiUeogGmudBm/deojKywkRLUgWaaP
c/lKhAv/GhVgljZEx4d4aQssD+NFbmp7oIp1RUGUWyykyy/5uZ52Y2E7lLSjnAkSuMwm
kuBcBFhX+cc+gW6T5HzHkMWx20IVva+Rc6FO0znyI5iI5/ulsRxXMTYFy/klGAQnEyKA
doQQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc;
bh=pkOg8qE3QGIW9QKqB18o8f+LbI+BQ3moH2oOytz8VyM=;
b=CjV8DOwx3r8xalIigPq1fFL1Xt9bePEl4cBVqVEweVyC49wnVcitFMrIUqnIHeuW33
vqVQUyaLOx0FbWq8X2LaLeJce8y2hKzqsV1m1sryfTxgF/ViWIAU7TTPwPy1QqDYahKZ
OTEyG1PmlPDY3C6hrJpGFPeqgWKQkfoI5Jf2AYTHLgdoNlcRnDoj2ieYb1617rFZ21rt
o0McPO0MnhlSUTY32yvzI9jukejNe5hXAKf+0a1tXo2ehIUbEWbPDSPiQ3HG7Y22TnWj
/TgtIy4nJGhUadHReNCrTRGht7xXf3szk3BbIHGEGiepNetskUZhj+sViegKLhO5g4TN
Yeiw==
X-Gm-Message-State: AJcUukcmigY39HYdo//2gTRPYVYOeDodjqZduaFsdwAw0z7jKo5trtu1
mpNOsQPFOICdMlvVoJmcIyzMgpxZ33iy9/WV86g=
X-Google-Smtp-Source: ALg8bN7t5IO4cQCfHRnJDXeecRFGOAT+3Q7TaELALPkjDiY9Ju3jlQnqnF27bjArTFcmUZmj1oHxaYjCR580KgZSLUU=
X-Received: by 2002:a9d:2184:: with SMTP id s4mr10717258otb.46.1547765007190;
Thu, 17 Jan 2019 14:43:27 -0800 (PST)
In-Reply-To: <17949751547650399@iva2-6ec8f0a6115e.qloud-c.yandex.net>
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:154533
Archived-At:
--000000000000733261057faf1f89
Content-Type: text/plain; charset="UTF-8"
Am Mi., 16. Jan. 2019 um 15:54 Uhr schrieb :
>
>
> Eval (sort "cba" #'<) gives
>
> Debugger entered--Lisp error: (wrong-type-argument sequencep "cba")
> sort("cba" <)
> eval((sort "cba" (function <)) nil)
> elisp--eval-last-sexp(nil)
> eval-last-sexp(nil)
> funcall-interactively(eval-last-sexp nil)
> call-interactively(eval-last-sexp nil nil)
> command-execute(eval-last-sexp)
>
> the error is inaccurate since "cba" is indeed a sequence
>
> (sequencep "cba")
> ;; => t
>
> it should report "cba" is not a list or vector instead.
>
Here's a patch.
--000000000000733261057faf1f89
Content-Type: text/plain; charset="US-ASCII";
name="0001-Improve-error-data-when-passing-a-wrong-type-to-sort.txt"
Content-Disposition: attachment;
filename="0001-Improve-error-data-when-passing-a-wrong-type-to-sort.txt"
Content-Transfer-Encoding: base64
Content-ID:
X-Attachment-Id: f_jr17b9nm0
RnJvbSAwMzM1OGY4NTA2OWY3MGI4MDc5YWJiODQwMDJlNDkzMGJjODNjMjFmIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBQaGlsaXBwIFN0ZXBoYW5pIDxwaHN0QGdvb2ds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