From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively Date: Mon, 21 Sep 2020 12:55:19 +0200 Message-ID: <47564F1F-5826-43B1-A9F1-1F4440AF2A6A@acm.org> References: <64C7CB3A-36F2-4988-9FF9-B99115C9ED13@acm.org> <87k0wri5xq.fsf@gnus.org> <87imcbds81.fsf@gnus.org> <9FE2FD7F-84CF-415B-BD7F-DDAF0D401414@acm.org> <874kntsvm7.fsf@gnus.org> <9852E6CA-1EB9-41B6-8B01-DAD627C2ED21@acm.org> <87tuvsjkax.fsf@gnus.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38699"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 43489@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 21 12:56:11 2020 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 1kKJUQ-0009xl-IX for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Sep 2020 12:56:10 +0200 Original-Received: from localhost ([::1]:48330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKJUP-0003qt-IT for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Sep 2020 06:56:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKJUI-0003ql-Jy for bug-gnu-emacs@gnu.org; Mon, 21 Sep 2020 06:56:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41987) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kKJUI-0004uu-AQ for bug-gnu-emacs@gnu.org; Mon, 21 Sep 2020 06:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kKJUI-000562-8Y for bug-gnu-emacs@gnu.org; Mon, 21 Sep 2020 06:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Sep 2020 10:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43489 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 43489-submit@debbugs.gnu.org id=B43489.160068572719547 (code B ref 43489); Mon, 21 Sep 2020 10:56:02 +0000 Original-Received: (at 43489) by debbugs.gnu.org; 21 Sep 2020 10:55:27 +0000 Original-Received: from localhost ([127.0.0.1]:53533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKJTi-00055D-Tl for submit@debbugs.gnu.org; Mon, 21 Sep 2020 06:55:27 -0400 Original-Received: from mail235c50.megamailservers.eu ([91.136.10.245]:51902 helo=mail56c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKJTg-000553-7C for 43489@debbugs.gnu.org; Mon, 21 Sep 2020 06:55:25 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1600685721; bh=DULG893AUmvm6wzjrPGPkj3UHbyfWzsQMG5mG4jj80Y=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=hhIwQeRMw6CK+l7hyLk7nAmBHz4xryfLSXk30/SlNSRpltDi/xtK3j6B4u0y1SeQa NnILAYj+aDf6Gjpw3V8lGCIMBmSXZeCyGc41pTrZs5LPPpWDYQZ2WkAQfOSQHKd0Co vx3EBaewrRyApU7Ee1Bg/baKW4ZTafyanbu6XmnU= Feedback-ID: mattiase@acm.or Original-Received: from stanniol.lan (c-304ee655.032-75-73746f71.bbcust.telenor.se [85.230.78.48]) (authenticated bits=0) by mail56c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 08LAtJAj003393; Mon, 21 Sep 2020 10:55:20 +0000 In-Reply-To: <87tuvsjkax.fsf@gnus.org> X-Mailer: Apple Mail (2.3445.104.15) X-CTCH-RefID: str=0001.0A782F15.5F688699.0105, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=UqsdyN4B c=1 sm=1 tr=0 a=63Z2wlQ1NB3xHpgKFKE71g==:117 a=63Z2wlQ1NB3xHpgKFKE71g==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=OocQHUDgAAAA:8 a=EDEZF4b6yV705Ww5_1gA:9 a=CjuIK1q_8ugA:10 a=xUZTl98r3Qw_uB5NK3jt:22 X-Origin-Country: SE 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:188563 Archived-At: 20 sep. 2020 kl. 21.54 skrev Lars Ingebrigtsen : > Even if the error looked like an internal error, the bit in the middle > is informative: >=20 > forward-sexp: Scan error: "Containing expression ends prematurely", = 2076, 2077 That message reads either as an error in Emacs itself or in the user's = code. There is typically no expression that ends prematurely when the = command is invoked (there may be, but Emacs cannot know that). It seems = that the message is not so much informative as outright misinforming. The message from C-M-u, "Unbalanced parentheses", is an equally blatant = lie. > OK, tried it now. It's less confusing on the whole, except this bit: Thank you for testing the patch. (Less confusing than Emacs master, I = presume? Or if you mean compared with the no-message patch, what was = confusing about it?) > )() >=20 > gives you that error, but there is indeed more sexps in the buffer. = The > error is that the we can't progress because we reached the ")" without > having a "(". If I understand you properly, you say that "No next sexp" is an = inappropriate message for C-M-f at ((A B_) C D) where the underscore indicates point, since the expressions C and D = follow? Editors differ in how they handle this case: some just continue = up one level (in this case, past C) instead of stopping. There are = merits to either behaviour and I'm not suggesting a change to Emacs in = this respect. What would a good message be then, if we insist on one? "No next sexp" = is correct within the semantics of forward-sexp and to the point; a more = detailed message might be something like "Past last element in expression" "No next subexpression" "Past last subexpression" which may or may not be better. 'Sexp' is an Emacs-specific term which = may still be appropriate in these messages since it figures prominently = in the manual and the commands are defined around it. Suggestions are = welcome! Let's not forget that the empty string is also an alternative and should = be compared with the verbal messages. Assuming that the user understands = what C-M-f does, it seems clear enough.