From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#49944: parse-partial-sexp fails to signal an error when (> START LIMIT). Date: Tue, 10 Aug 2021 11:07:38 -0400 Message-ID: References: <87r1f36by6.fsf@gnus.org> <87pmum4wnm.fsf@gnus.org> <87a6lpz9vq.fsf@gnus.org> <83mtppflcu.fsf@gnu.org> <87o8a5xscc.fsf@gnus.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24643"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: acm@muc.de, Eli Zaretskii , 49944@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 10 17:10:40 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDTOq-00069j-9o for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 10 Aug 2021 17:10:40 +0200 Original-Received: from localhost ([::1]:40946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDTOp-00006F-6W for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 10 Aug 2021 11:10:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37802) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDTMO-0003qG-Es for bug-gnu-emacs@gnu.org; Tue, 10 Aug 2021 11:08:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48847) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mDTMO-00025g-80 for bug-gnu-emacs@gnu.org; Tue, 10 Aug 2021 11:08:08 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mDTMO-0007ZG-2q for bug-gnu-emacs@gnu.org; Tue, 10 Aug 2021 11:08:08 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 10 Aug 2021 15:08:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49944 X-GNU-PR-Package: emacs Original-Received: via spool by 49944-submit@debbugs.gnu.org id=B49944.162860806928856 (code B ref 49944); Tue, 10 Aug 2021 15:08:08 +0000 Original-Received: (at 49944) by debbugs.gnu.org; 10 Aug 2021 15:07:49 +0000 Original-Received: from localhost ([127.0.0.1]:60335 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDTM4-0007VA-SZ for submit@debbugs.gnu.org; Tue, 10 Aug 2021 11:07:49 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:61853) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDTM2-0007Uk-HK for 49944@debbugs.gnu.org; Tue, 10 Aug 2021 11:07:47 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 070E14412B7; Tue, 10 Aug 2021 11:07:41 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id B280F4407E5; Tue, 10 Aug 2021 11:07:39 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1628608059; bh=9btWZPzi77h3WaoQ79Prl5XyYSURxPO0nFAAs0bZUjM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=JDxVwvY0KfTpwRXFLiBkMD42Wrhf1TWaX2q2ttKfzxFi9B1ia6LaHk1L/WvmlxQta 9MdJd43Nx5tGE57edWqVRo1eFavloUW94MyDHy7NZ1yeVjW/YEupKaIJUF4AS4U9ln 6JcFfc7ap/3+9UFU8esuTk/vrTLTxe8gRYHSAWjSKWDcHt6l0gKjRH/+0H/mW/6JnG ORaEa14oMB79g3ZYUFlcu5Rq+ZiVdAq7vePcjMiJhyZOMoakdFh7APW7UYNEABJT5Q dtrWsS+XpKMNRu1gSGkNejCuywbfD4CrByTG0p0EWgxe8pYoabKBr+XrvK1NLfcSus 6JH5uhE1ysAKw== Original-Received: from alfajor (104-222-120-40.cpe.teksavvy.com [104.222.120.40]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 7729112023C; Tue, 10 Aug 2021 11:07:39 -0400 (EDT) In-Reply-To: <87o8a5xscc.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 10 Aug 2021 16:54:59 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:211511 Archived-At: Lars Ingebrigtsen [2021-08-10 16:54:59] wrote: > But I guess you'll get incorrect results if you pass in any OLDSTATE > that doesn't belong to START, not just when START and END are swapped? If the caller needs to know whether swapping will take place in order to pass the right OLDSTATE, then it defeats the purpose of swapping (which is presumably to make life easier for the caller). > So perhaps signalling an error here is the correct thing after all? > (Or just not doing any swapping.) I don't have an opinion on signaling an error or not, but swapping is a bad idea here IMO. Stefan