From unknown Sat Jun 21 10:39:46 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#43489 <43489@debbugs.gnu.org> To: bug#43489 <43489@debbugs.gnu.org> Subject: Status: [PATCH] Don't signal scan-error when moving by sexp interactively Reply-To: bug#43489 <43489@debbugs.gnu.org> Date: Sat, 21 Jun 2025 17:39:46 +0000 retitle 43489 [PATCH] Don't signal scan-error when moving by sexp interacti= vely reassign 43489 emacs submitter 43489 Mattias Engdeg=C3=A5rd severity 43489 normal tag 43489 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 18 07:31:27 2020 Received: (at submit) by debbugs.gnu.org; 18 Sep 2020 11:31:28 +0000 Received: from localhost ([127.0.0.1]:41071 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJEbv-0005JF-Dv for submit@debbugs.gnu.org; Fri, 18 Sep 2020 07:31:27 -0400 Received: from lists.gnu.org ([209.51.188.17]:48578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJEbt-0005HE-JO for submit@debbugs.gnu.org; Fri, 18 Sep 2020 07:31:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46892) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJEbt-0001We-Cc for bug-gnu-emacs@gnu.org; Fri, 18 Sep 2020 07:31:25 -0400 Received: from mail1467c50.megamailservers.eu ([91.136.14.67]:55840 helo=mail268c50.megamailservers.eu) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJEbr-00046F-El for bug-gnu-emacs@gnu.org; Fri, 18 Sep 2020 07:31:25 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1600428679; bh=5i/z15+IHh7OOtvJQsIyXVO3aaegnNVo29O3QfSoPvU=; h=From:Subject:Date:To:From; b=ZNT5AjbMpYf+3AvEiTjNLe/NeV1HUVxRN7tfxL+FVnMWfNwp/KFE3/nKaPJYY8cOi iNsOWhHsXQOJZDb2v95b4V5/uUd5DvZ8md6BEbqE6WqWK9BkIY0Ll+r6Gby70FJhIS hFeL5oMxpmODGmzZSvCXczlOk3CXC9MSmrRFNQyE= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-304ee655.032-75-73746f71.bbcust.telenor.se [85.230.78.48]) (authenticated bits=0) by mail268c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 08IBVHPZ012209 for ; Fri, 18 Sep 2020 11:31:19 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: multipart/mixed; boundary="Apple-Mail=_6A20E3B3-1DC1-411D-8325-49328451627C" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Subject: [PATCH] Don't signal scan-error when moving by sexp interactively Message-Id: <64C7CB3A-36F2-4988-9FF9-B99115C9ED13@acm.org> Date: Fri, 18 Sep 2020 13:31:16 +0200 To: bug-gnu-emacs@gnu.org X-Mailer: Apple Mail (2.3445.104.15) X-CTCH-RefID: str=0001.0A782F19.5F649A87.0055, 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-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=BZ+mLYl2 c=1 sm=1 tr=0 a=63Z2wlQ1NB3xHpgKFKE71g==:117 a=63Z2wlQ1NB3xHpgKFKE71g==:17 a=M51BFTxLslgA:10 a=JC4bn7cTM7qGctUrLuYA:9 a=CjuIK1q_8ugA:10 a=xG116jtGo4NxAXRApYYA:9 a=B2y7HmGcmWMA:10 a=tclcd6dtLQvEqt9_mmAA:9 X-Origin-Country: SE Received-SPF: softfail client-ip=91.136.14.67; envelope-from=mattiase@acm.org; helo=mail268c50.megamailservers.eu X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/18 07:31:20 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x (no timestamps) [generic] X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --Apple-Mail=_6A20E3B3-1DC1-411D-8325-49328451627C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii When moving by sexp (C-M-f, C-M-u and so on) and point is already at a = boundary preventing further movement, Emacs currently signals an = internal error such as Scan error: "Containing expression ends prematurely", 5010, 5010 or Scan error: "Unbalanced parentheses", 5010, 1 which is unhelpful and rather looks as if something went wrong in the = internal machinery. The attached patch does away with this error when the commands are = invoked interactively; programmatic use of the functions will get the = scan-error just like before. There didn't seem to be much point in = replacing the errors with new messages so the current version of the = patch doesn't. --Apple-Mail=_6A20E3B3-1DC1-411D-8325-49328451627C Content-Disposition: attachment; filename=0001-Don-t-signal-scan-error-when-moving-by-sexp-interact.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Don-t-signal-scan-error-when-moving-by-sexp-interact.patch" Content-Transfer-Encoding: quoted-printable =46rom=2025a03c7ec547984b2e500d4e5be7855290ae95ff=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Fri,=2018=20Sep=202020=2012:49:33=20+0200=0A= Subject:=20[PATCH]=20Don't=20signal=20scan-error=20when=20moving=20by=20= sexp=20interactively=0A=0A*=20lisp/emacs-lisp/lisp.el=20(forward-sexp,=20= backward-sexp,=20forward-list)=0A(backward-list,=20down-list,=20= up-list):=20Remove=20unsightly=20scan-error=0Awhen=20running=20= interactively=20and=20no=20further=20movement=20by=20sexp=20can=20be=20= made.=0A---=0A=20lisp/emacs-lisp/lisp.el=20|=2084=20= +++++++++++++++++++++++++----------------=0A=201=20file=20changed,=2052=20= insertions(+),=2032=20deletions(-)=0A=0Adiff=20--git=20= a/lisp/emacs-lisp/lisp.el=20b/lisp/emacs-lisp/lisp.el=0Aindex=20= 8c18557c79..2b0ed76633=20100644=0A---=20a/lisp/emacs-lisp/lisp.el=0A+++=20= b/lisp/emacs-lisp/lisp.el=0A@@=20-55,7=20+55,7=20@@=20= forward-sexp-function=0A=20=20=20"If=20non-nil,=20`forward-sexp'=20= delegates=20to=20this=20function.=0A=20Should=20take=20the=20same=20= arguments=20and=20behave=20similarly=20to=20`forward-sexp'.")=0A=20=0A= -(defun=20forward-sexp=20(&optional=20arg)=0A+(defun=20forward-sexp=20= (&optional=20arg=20noerror)=0A=20=20=20"Move=20forward=20across=20one=20= balanced=20expression=20(sexp).=0A=20With=20ARG,=20do=20it=20that=20many=20= times.=20=20Negative=20arg=20-N=20means=20move=0A=20backward=20across=20= N=20balanced=20expressions.=20=20This=20command=20assumes=0A@@=20-64,23=20= +64,29=20@@=20forward-sexp=0A=20If=20unable=20to=20move=20over=20a=20= sexp,=20signal=20`scan-error'=20with=20three=0A=20arguments:=20a=20= message,=20the=20start=20of=20the=20obstacle=20(usually=20a=0A=20= parenthesis=20or=20list=20marker=20of=20some=20kind),=20and=20end=20of=20= the=0A-obstacle."=0A-=20=20(interactive=20"^p")=0A-=20=20(or=20arg=20= (setq=20arg=201))=0A-=20=20(if=20forward-sexp-function=0A-=20=20=20=20=20= =20(funcall=20forward-sexp-function=20arg)=0A-=20=20=20=20(goto-char=20= (or=20(scan-sexps=20(point)=20arg)=20(buffer-end=20arg)))=0A-=20=20=20=20= (if=20(<=20arg=200)=20(backward-prefix-chars))))=0A-=0A-(defun=20= backward-sexp=20(&optional=20arg)=0A+obstacle.=20=20If=20NOERROR=20is=20= non-nil,=20as=20it=20is=20interactively,=0A+do=20not=20signal=20an=20= error."=0A+=20=20(interactive=20"^p\nd")=0A+=20=20(if=20noerror=0A+=20=20= =20=20=20=20(condition-case=20_=0A+=20=20=20=20=20=20=20=20=20=20= (forward-sexp=20arg=20nil)=0A+=20=20=20=20=20=20=20=20(scan-error=20= (ding)))=0A+=20=20=20=20(or=20arg=20(setq=20arg=201))=0A+=20=20=20=20(if=20= forward-sexp-function=0A+=20=20=20=20=20=20=20=20(funcall=20= forward-sexp-function=20arg)=0A+=20=20=20=20=20=20(goto-char=20(or=20= (scan-sexps=20(point)=20arg)=20(buffer-end=20arg)))=0A+=20=20=20=20=20=20= (if=20(<=20arg=200)=20(backward-prefix-chars)))))=0A+=0A+(defun=20= backward-sexp=20(&optional=20arg=20noerror)=0A=20=20=20"Move=20backward=20= across=20one=20balanced=20expression=20(sexp).=0A=20With=20ARG,=20do=20= it=20that=20many=20times.=20=20Negative=20arg=20-N=20means=0A=20move=20= forward=20across=20N=20balanced=20expressions.=0A=20This=20command=20= assumes=20point=20is=20not=20in=20a=20string=20or=20comment.=0A-Uses=20= `forward-sexp'=20to=20do=20the=20work."=0A-=20=20(interactive=20"^p")=0A= +Uses=20`forward-sexp'=20to=20do=20the=20work.=0A+If=20NOERROR=20is=20= non-nil,=20as=20it=20is=20interactively,=20do=20not=20signal=20an=20= error."=0A+=20=20(interactive=20"^p\nd")=0A=20=20=20(or=20arg=20(setq=20= arg=201))=0A-=20=20(forward-sexp=20(-=20arg)))=0A+=20=20(forward-sexp=20= (-=20arg)=20noerror))=0A=20=0A=20(defun=20mark-sexp=20(&optional=20arg=20= allow-extend)=0A=20=20=20"Set=20mark=20ARG=20sexps=20from=20point.=0A@@=20= -108,41=20+114,52=20@@=20mark-sexp=0A=20=09=20=20=20=20(point))=0A=20=09=20= =20nil=20t))))=0A=20=0A-(defun=20forward-list=20(&optional=20arg)=0A= +(defun=20forward-list=20(&optional=20arg=20noerror)=0A=20=20=20"Move=20= forward=20across=20one=20balanced=20group=20of=20parentheses.=0A=20This=20= command=20will=20also=20work=20on=20other=20parentheses-like=20= expressions=0A=20defined=20by=20the=20current=20language=20mode.=0A=20= With=20ARG,=20do=20it=20that=20many=20times.=0A=20Negative=20arg=20-N=20= means=20move=20backward=20across=20N=20groups=20of=20parentheses.=0A= -This=20command=20assumes=20point=20is=20not=20in=20a=20string=20or=20= comment."=0A-=20=20(interactive=20"^p")=0A-=20=20(or=20arg=20(setq=20arg=20= 1))=0A-=20=20(goto-char=20(or=20(scan-lists=20(point)=20arg=200)=20= (buffer-end=20arg))))=0A-=0A-(defun=20backward-list=20(&optional=20arg)=0A= +This=20command=20assumes=20point=20is=20not=20in=20a=20string=20or=20= comment.=0A+If=20NOERROR=20is=20non-nil,=20as=20it=20is=20interactively,=20= do=20not=20signal=20an=20error."=0A+=20=20(interactive=20"^p\nd")=0A+=20=20= (if=20noerror=0A+=20=20=20=20=20=20(condition-case=20_=0A+=20=20=20=20=20= =20=20=20=20=20(forward-list=20arg=20nil)=0A+=20=20=20=20=20=20=20=20= (scan-error=20(ding)))=0A+=20=20=20=20(or=20arg=20(setq=20arg=201))=0A+=20= =20=20=20(goto-char=20(or=20(scan-lists=20(point)=20arg=200)=20= (buffer-end=20arg)))))=0A+=0A+(defun=20backward-list=20(&optional=20arg=20= noerror)=0A=20=20=20"Move=20backward=20across=20one=20balanced=20group=20= of=20parentheses.=0A=20This=20command=20will=20also=20work=20on=20other=20= parentheses-like=20expressions=0A=20defined=20by=20the=20current=20= language=20mode.=0A=20With=20ARG,=20do=20it=20that=20many=20times.=0A=20= Negative=20arg=20-N=20means=20move=20forward=20across=20N=20groups=20of=20= parentheses.=0A-This=20command=20assumes=20point=20is=20not=20in=20a=20= string=20or=20comment."=0A-=20=20(interactive=20"^p")=0A+This=20command=20= assumes=20point=20is=20not=20in=20a=20string=20or=20comment.=0A+If=20= NOERROR=20is=20non-nil,=20as=20it=20is=20interactively,=20do=20not=20= signal=20an=20error."=0A+=20=20(interactive=20"^p\nd")=0A=20=20=20(or=20= arg=20(setq=20arg=201))=0A-=20=20(forward-list=20(-=20arg)))=0A+=20=20= (forward-list=20(-=20arg)=20noerror))=0A=20=0A-(defun=20down-list=20= (&optional=20arg)=0A+(defun=20down-list=20(&optional=20arg=20noerror)=0A=20= =20=20"Move=20forward=20down=20one=20level=20of=20parentheses.=0A=20This=20= command=20will=20also=20work=20on=20other=20parentheses-like=20= expressions=0A=20defined=20by=20the=20current=20language=20mode.=0A=20= With=20ARG,=20do=20this=20that=20many=20times.=0A=20A=20negative=20= argument=20means=20move=20backward=20but=20still=20go=20down=20a=20= level.=0A-This=20command=20assumes=20point=20is=20not=20in=20a=20string=20= or=20comment."=0A-=20=20(interactive=20"^p")=0A-=20=20(or=20arg=20(setq=20= arg=201))=0A-=20=20(let=20((inc=20(if=20(>=20arg=200)=201=20-1)))=0A-=20=20= =20=20(while=20(/=3D=20arg=200)=0A-=20=20=20=20=20=20(goto-char=20(or=20= (scan-lists=20(point)=20inc=20-1)=20(buffer-end=20arg)))=0A-=20=20=20=20=20= =20(setq=20arg=20(-=20arg=20inc)))))=0A+This=20command=20assumes=20point=20= is=20not=20in=20a=20string=20or=20comment.=0A+If=20NOERROR=20is=20= non-nil,=20as=20it=20is=20interactively,=20do=20not=20signal=20an=20= error."=0A+=20=20(interactive=20"^p\nd")=0A+=20=20(if=20noerror=0A+=20=20= =20=20=20=20(condition-case=20_=0A+=20=20=20=20=20=20=20=20=20=20= (down-list=20arg=20nil)=0A+=20=20=20=20=20=20=20=20(scan-error=20= (ding)))=0A+=20=20=20=20(or=20arg=20(setq=20arg=201))=0A+=20=20=20=20= (let=20((inc=20(if=20(>=20arg=200)=201=20-1)))=0A+=20=20=20=20=20=20= (while=20(/=3D=20arg=200)=0A+=20=20=20=20=20=20=20=20(goto-char=20(or=20= (scan-lists=20(point)=20inc=20-1)=20(buffer-end=20arg)))=0A+=20=20=20=20=20= =20=20=20(setq=20arg=20(-=20arg=20inc))))))=0A=20=0A=20(defun=20= backward-up-list=20(&optional=20arg=20escape-strings=20= no-syntax-crossing)=0A=20=20=20"Move=20backward=20out=20of=20one=20level=20= of=20parentheses.=0A@@=20-229,7=20+246,10=20@@=20up-list=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(or=20(<=20inc=200)=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(forward-comment=20= 1))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(setf=20arg=20= (+=20arg=20inc)))=0A-=20=20=20=20=20=20=20=20=20=20=20=20(signal=20(car=20= err)=20(cdr=20err))))))=0A+=20=20=20=20=20=20=20=20=20=20=20=20(if=20= no-syntax-crossing=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20= Assume=20called=20interactively;=20don't=20signal=20an=20error.=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(ding)=0A+=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(signal=20(car=20err)=20(cdr=20err)))))))=0A=20=20=20= =20=20=20=20(setq=20arg=20(-=20arg=20inc)))))=0A=20=0A=20(defun=20= kill-sexp=20(&optional=20arg)=0A--=20=0A2.21.1=20(Apple=20Git-122.3)=0A=0A= --Apple-Mail=_6A20E3B3-1DC1-411D-8325-49328451627C Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail=_6A20E3B3-1DC1-411D-8325-49328451627C-- From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 18 09:13:34 2020 Received: (at 43489) by debbugs.gnu.org; 18 Sep 2020 13:13:34 +0000 Received: from localhost ([127.0.0.1]:41241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJGCk-0000M8-AS for submit@debbugs.gnu.org; Fri, 18 Sep 2020 09:13:34 -0400 Received: from quimby.gnus.org ([95.216.78.240]:53794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJGCi-0000Lu-KT for 43489@debbugs.gnu.org; Fri, 18 Sep 2020 09:13:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=bWx3Dd/pILYsdhwBvOqAA5qkhxveqw171oHkDmAsYL4=; b=hSLlV8DlIxvDFxNFNwrCXc7H1Q LkClkf8xt/Ann37ZO9KH9h3Xm3FxzFBdVPOx/P24wD2lVyd08j43IubGOTw3s8VVbQLgW9CxslA1Y Ed69t/8GnrN5FnnCT8EG+AHN2WCPzXMEMwTWt9k6CcjALwkClsLWA66RGATymC9npqqE=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kJGCZ-00066v-OJ; Fri, 18 Sep 2020 15:13:26 +0200 From: Lars Ingebrigtsen To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively References: <64C7CB3A-36F2-4988-9FF9-B99115C9ED13@acm.org> X-Now-Playing: Stina Nordenstam's _This Is Stina Nordenstam_: "Stations" Date: Fri, 18 Sep 2020 15:13:21 +0200 In-Reply-To: <64C7CB3A-36F2-4988-9FF9-B99115C9ED13@acm.org> ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Fri, 18 Sep 2020 13:31:16 +0200") Message-ID: <87k0wri5xq.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Mattias EngdegÃ¥rd writes: > When moving by sexp (C-M-f, C-M-u and so on) and point is already at a > boundary preventing further movement, Emacs currently signals an > internal error such as > > Scan error: "Containing express [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43489 Cc: 43489@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > When moving by sexp (C-M-f, C-M-u and so on) and point is already at a > boundary preventing further movement, Emacs currently signals an > internal error such as > > Scan error: "Containing expression ends prematurely", 5010, 5010 > > or > > Scan error: "Unbalanced parentheses", 5010, 1 > > which is unhelpful and rather looks as if something went wrong in the > internal machinery. Yes, those error messages are confusing in interactive usage. > The attached patch does away with this error when the commands are > invoked interactively; programmatic use of the functions will get the > scan-error just like before. There didn't seem to be much point in > replacing the errors with new messages so the current version of the > patch doesn't. [...] > + (if noerror > + (condition-case _ > + (forward-list arg nil) > + (scan-error (ding))) So you basically just `ding' in interactive usage? I wonder whether this would have any negative effect when people are using these commands in keyboard macros. For instance, if you've recorded a macro that does `M-C-f M-DEL' or something, previously it would signal an error and then stop, while now it'll just continue and delete the wrong thing? --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 18 09:19:07 2020 Received: (at 43489) by debbugs.gnu.org; 18 Sep 2020 13:19:07 +0000 Received: from localhost ([127.0.0.1]:41280 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJGI6-0000Xo-S4 for submit@debbugs.gnu.org; Fri, 18 Sep 2020 09:19:07 -0400 Received: from mail-lj1-f181.google.com ([209.85.208.181]:45332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJGI5-0000X5-T7 for 43489@debbugs.gnu.org; Fri, 18 Sep 2020 09:19:06 -0400 Received: by mail-lj1-f181.google.com with SMTP id c2so5048836ljj.12 for <43489@debbugs.gnu.org>; Fri, 18 Sep 2020 06:19:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=/wJVea6Rft0vhYzQgHD7D2I50J+k00o/B7Vbt8KBHVw=; b=PqajALYS1VEMEHCpWnuGt/FBlG1fRWVySx/yB/UxRJ/5jJ4EbW/cxWgi7UI9MVTYMn hNl29Ym+uTHLqX5k1HK1I+Wfu6ikeCTfop+gdGQpqTmg+AQIA2EKOeQsMI4QeAbP82KD l6uBiMkk2HmdVvNnMSBkhUpVFu2dHoQVXtZBVi6Jr6LdN+QH6EGFtx8WAl4+7GY99quP MMU5fR8shtXCQlt9UAXFdOyYYdDezf7cxPiAKw3dnQhRqsUQ1WI7lLnziZxOtLzcV0Fz Eyk95UsT3YcdAdg+j4P+tbjwtHrl5Vr0yKgH8ClXJkzoaitWNXbcpZ8ItWqQrovat1r4 RQ6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/wJVea6Rft0vhYzQgHD7D2I50J+k00o/B7Vbt8KBHVw=; b=eGdvyvlMA8sTnlaRaADqaJx7T13xCI50iHvv8TY6w5lxaxP/ThQAytsh0tB3zvDj2F g4lpDEYLg8EKyrt0j8K6yFo0xJRfdHfcSrxfPCwSIVpXS7a8rMTc97/HNxyNIi+7WEcr IaqlfXAKUe7klqbs2jMopTZdITIIF7nbV2SRX4rB1p25/tHolknIopkp3mdr1xAHQWs+ 5oLocpYy06YkzdkQiyFs2OofCujEDHpIquDCk07sbb6ei0PIl/IH6YojKb1dUz7cV7YJ rz0s2Ihk00zqPEHZbtC5fDyS66isHOrt9pCtC3YKgylfV8xiNjHbxPkbHbA53XYrdC44 FqeQ== X-Gm-Message-State: AOAM533EbsG4uxrDl4hFEHfRRxe7wavTAi0+Qbd9uD7IkQY8zgLInItL yJ9Uo0WvPf1kdf+k2K0v29LqtqmNBv4UpQ== X-Google-Smtp-Source: ABdhPJzjyIakf3cGnHMz9nP1KNeyAalRGDvNtOLK56HcrnXXM3D9Fz5GLvWpDD2AVu0rq3O3xfL4PQ== X-Received: by 2002:a2e:9992:: with SMTP id w18mr12482592lji.301.1600435139457; Fri, 18 Sep 2020 06:18:59 -0700 (PDT) Received: from [192.168.0.104] ([94.229.108.16]) by smtp.googlemail.com with ESMTPSA id c20sm588972lff.291.2020.09.18.06.18.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 18 Sep 2020 06:18:58 -0700 (PDT) Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively To: Lars Ingebrigtsen , =?UTF-8?Q?Mattias_Engdeg=c3=a5rd?= References: <64C7CB3A-36F2-4988-9FF9-B99115C9ED13@acm.org> <87k0wri5xq.fsf@gnus.org> From: Dmitry Gutov Message-ID: <56ac5e48-71dc-8219-a2ac-e5691a7cc22b@yandex.ru> Date: Fri, 18 Sep 2020 16:18:57 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <87k0wri5xq.fsf@gnus.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 43489 Cc: 43489@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) On 18.09.2020 16:13, Lars Ingebrigtsen wrote: >> When moving by sexp (C-M-f, C-M-u and so on) and point is already at a >> boundary preventing further movement, Emacs currently signals an >> internal error such as >> >> Scan error: "Containing expression ends prematurely", 5010, 5010 >> >> or >> >> Scan error: "Unbalanced parentheses", 5010, 1 >> >> which is unhelpful and rather looks as if something went wrong in the >> internal machinery. > Yes, those error messages are confusing in interactive usage. They might be kinda helpful for interactive debugging, though? From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 18 09:42:57 2020 Received: (at 43489) by debbugs.gnu.org; 18 Sep 2020 13:42:57 +0000 Received: from localhost ([127.0.0.1]:41409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJGfB-0003NG-1G for submit@debbugs.gnu.org; Fri, 18 Sep 2020 09:42:57 -0400 Received: from quimby.gnus.org ([95.216.78.240]:54492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJGf9-0003Mw-Ej for 43489@debbugs.gnu.org; Fri, 18 Sep 2020 09:42:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=y5gYnrsbSnracKDQIuW2haFu7wAnFWJaC0qqkfx7Jcs=; b=Fu6gnsuU33i9vmyMt1S7tVzNqE 7pHUaVzrq/GHBG2pztsMx+bTAbexWuYXzq10YxpHGHPr2iyW4ahf6itNBrlSaQ+GnN3VGJQFsD4mu OEy+FjMShaXxcsUgjV0/JUght6PVi2t7Jy1GQ4KVv9v7uxFcx6GUsDFRxvLv+ZzeQMC4=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kJGf0-0006P5-IY; Fri, 18 Sep 2020 15:42:49 +0200 From: Lars Ingebrigtsen To: Dmitry Gutov Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively References: <64C7CB3A-36F2-4988-9FF9-B99115C9ED13@acm.org> <87k0wri5xq.fsf@gnus.org> <56ac5e48-71dc-8219-a2ac-e5691a7cc22b@yandex.ru> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAG1BMVEUJBws5PD05REcl KixbZGR8goDf5NWYm5j///8N3poeAAAAAWJLR0QIht6VegAAAAd0SU1FB+QJEg0pDYQuflQAAAGM SURBVDjL1ZJNb8MgDIbduruH0B/QAL0TXO3cMbrct1Q5T9rS+5SWvz9DP6ROiTTttvdAMI9fQ8AA f9dMaBL3SzaPSJLoHuTYjhQhsogjABmwCXGMJNPPHS7Ewgj4nxq7lrPs74tkzbYT4OF9Aiw+pw41 5ZhPOHBxwHEAPU7U+vGClybgN9dEyE1x5TZ3iRVz50kKJ20tSRYMJHIPCuscVlSUrtLIIN0aG6RU nEuKE0pVkkDK1+mMCKpSVV2RLkumBUEqVZOrl8Jr0tYlhxFa5jMicqosnx+HcKKqVqpUOr0M8okc GKdf+r6vlFDeG40iA6opmKem7w8qeOWNqah23LFUhiR9Or2ZPAvekuL/c+ocErn0GRgYKYFqTmsb Di1sEjimchbBBBP38ciwgGUCkR0FZNAMkQ1hlUG7Y8sK5mCUCZFB26xgzem7thu8gg0Yv+4Y7GLc QhNZ2e4NxLCOZ31Bl7/7Lm0FoYlXgGk85vnuFUJ3BQNeZ2knON6iAW7msB/gtn76wBsYuu4bOQuB gJmpMFgAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMDktMThUMTM6NDE6MTMrMDA6MDCk9iAkAAAA JXRFWHRkYXRlOm1vZGlmeQAyMDIwLTA5LTE4VDEzOjQxOjEzKzAwOjAw1auYmAAAAABJRU5ErkJg gg== X-Now-Playing: Stina Nordenstam's _The World Is Saved_: "I'm Staring Out The World" Date: Fri, 18 Sep 2020 15:42:45 +0200 In-Reply-To: <56ac5e48-71dc-8219-a2ac-e5691a7cc22b@yandex.ru> (Dmitry Gutov's message of "Fri, 18 Sep 2020 16:18:57 +0300") Message-ID: <87k0wrgq0a.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Dmitry Gutov writes: >>> Scan error: "Containing expression ends prematurely", 5010, 5010 >>> >>> or >>> >>> Scan error: "Unbalanced parentheses", 5010, 1 >>> >>> which is unhelpful and rather looks as if something went w [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43489 Cc: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= , 43489@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Dmitry Gutov writes: >>> Scan error: "Containing expression ends prematurely", 5010, 5010 >>> >>> or >>> >>> Scan error: "Unbalanced parentheses", 5010, 1 >>> >>> which is unhelpful and rather looks as if something went wrong in the >>> internal machinery. >> Yes, those error messages are confusing in interactive usage. > > They might be kinda helpful for interactive debugging, though? They don't seem like user-level error messages (as you'd expect from a command like `C-M-f'), and if you're debugging, you're probably calling `M-: (forward-sexp 1)' or something? (In which case you get these error messages still with the patch in question.) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 18 09:48:49 2020 Received: (at 43489) by debbugs.gnu.org; 18 Sep 2020 13:48:49 +0000 Received: from localhost ([127.0.0.1]:41427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJGkr-0005gf-HD for submit@debbugs.gnu.org; Fri, 18 Sep 2020 09:48:49 -0400 Received: from mail-lf1-f48.google.com ([209.85.167.48]:47056) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJGkp-0005gQ-QQ for 43489@debbugs.gnu.org; Fri, 18 Sep 2020 09:48:48 -0400 Received: by mail-lf1-f48.google.com with SMTP id b22so6157394lfs.13 for <43489@debbugs.gnu.org>; Fri, 18 Sep 2020 06:48:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=RMIvO2X3SG9DKH1CFO3HkGvGgvG4FjOReU6nWo3Sl/E=; b=GUvfW9eUQ8i3z7kWsCcjtVg9hxleH+Na4C9UujttbaiNOY3iMecud182+qwaoO8rOO nkAWb4u8mkTGdIKy0xd9HW28EnZ4Moz03HatYm9FFNnI6VbEfW3znfJX6bh+Dn8oWQDp 9TY47+SbAvYdX4JyyU/g+i1lU1EZhiCBu/wwCev2g4EB2r6Kp7kQ+qI8tV5odxxrdQTs 5vP45wZeEkFt7rbfX6a/pJ8fLP3GeVLdijLe/67UQV4KzfcNAQxb1fIcoP9OZqRv9Xsq aenHF/Hiej/M8FSD1DExWBLvcTmY8CHvqXBE4xNL4XD2yhtdoMjC7ep/rBb6RWTlGRjt J6UQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=RMIvO2X3SG9DKH1CFO3HkGvGgvG4FjOReU6nWo3Sl/E=; b=jSzlwG7AddZiNvnyc1iIc6WRnIlJLpcUkX3g6/NDYrGgie+ghZvqhVSATvT7S7LgI3 nokPSr+JWMOYI4/MrWOlkKg2jSuE/avAjCIcrCppAo+6GqsZ5JTaeUAG61E5t5YaHZdX y6wsynuJz5gFwsARIVRAqYcB1JwG/q4TU8T+KgRQsw1o9uVuPebwa4H4u4g3wc5pMTI9 RsP5JSEvl2P8Yn5aoKha63TCdurX07SNlSL3h6Db96q8n6RNfpRJoiKOS0L0l2ydj4K4 6FsVAPPz40UGfoBKFnvXpZ/dWvJmk+19mZtWp5g4Ky1fbvyIk2CwhnvfCy+FyO05f6kB lbMw== X-Gm-Message-State: AOAM5339gm58i5MlaKKlL0c5SCD9ggBb85L4bxrzGS/ajsbl/y13wDKC qxWh9xr9RcpsV+Y5/cLWnXZqYJiS7xrU9w== X-Google-Smtp-Source: ABdhPJzOxhew8+g6j3DAIG6CjCX+bK0/w9b5GhsPipd/tKSgwl+OpO9Qfol+u8WpSKM5U99kjNpuUw== X-Received: by 2002:ac2:5b4d:: with SMTP id i13mr12403208lfp.12.1600436921360; Fri, 18 Sep 2020 06:48:41 -0700 (PDT) Received: from [192.168.0.104] ([94.229.108.16]) by smtp.googlemail.com with ESMTPSA id m10sm609525ljg.138.2020.09.18.06.48.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 18 Sep 2020 06:48:40 -0700 (PDT) Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively To: Lars Ingebrigtsen References: <64C7CB3A-36F2-4988-9FF9-B99115C9ED13@acm.org> <87k0wri5xq.fsf@gnus.org> <56ac5e48-71dc-8219-a2ac-e5691a7cc22b@yandex.ru> <87k0wrgq0a.fsf@gnus.org> From: Dmitry Gutov Message-ID: <0b5fb43f-3439-f069-9fbd-17040d4ccd3b@yandex.ru> Date: Fri, 18 Sep 2020 16:48:40 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <87k0wrgq0a.fsf@gnus.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 43489 Cc: =?UTF-8?Q?Mattias_Engdeg=c3=a5rd?= , 43489@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) On 18.09.2020 16:42, Lars Ingebrigtsen wrote: > They don't seem like user-level error messages (as you'd expect from a > command like `C-M-f'), and if you're debugging, you're probably calling > `M-: (forward-sexp 1)' or something? (In which case you get these error > messages still with the patch in question.) Some translation to better-looking messages would be an improvement, for sure. Up until now, M-x forward-sexp behaved the same as (forward-sexp 1), so I'd guess there are some Lisp developers used to that. It's not a very strong objection, though. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 18 11:13:30 2020 Received: (at 43489) by debbugs.gnu.org; 18 Sep 2020 15:13:30 +0000 Received: from localhost ([127.0.0.1]:44148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJI4o-0000JB-02 for submit@debbugs.gnu.org; Fri, 18 Sep 2020 11:13:30 -0400 Received: from mail1457c50.megamailservers.eu ([91.136.14.57]:47192 helo=mail267c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJI4l-0000Iu-CF for 43489@debbugs.gnu.org; Fri, 18 Sep 2020 11:13:28 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1600442000; bh=3pzR+56DGUEllkH1nwLuAIun+YnEpsHgh02f8yx3ATU=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=V94nODHJnvnzotK7ENU1zqfzv+X1E/QUpoTD7MMxbNo6XTikzlZ22oOE4WrlcaNdY xIDxGKpW8WIT0OhBNxcWy/vPKzm/6BgB2ssvFKhD50QqmfQgz339LnRHbrosNPcEMP tt3BPiMF40iLMPbDr1BMP9y/EygTxuRGWM6byeN0= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-304ee655.032-75-73746f71.bbcust.telenor.se [85.230.78.48]) (authenticated bits=0) by mail267c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 08IFDIsO021737; Fri, 18 Sep 2020 15:13:19 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <87k0wri5xq.fsf@gnus.org> Date: Fri, 18 Sep 2020 17:13:18 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <64C7CB3A-36F2-4988-9FF9-B99115C9ED13@acm.org> <87k0wri5xq.fsf@gnus.org> To: Lars Ingebrigtsen X-Mailer: Apple Mail (2.3445.104.15) X-CTCH-RefID: str=0001.0A782F1B.5F64CE90.0062, 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-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=Cf92G4jl c=1 sm=1 tr=0 a=63Z2wlQ1NB3xHpgKFKE71g==:117 a=63Z2wlQ1NB3xHpgKFKE71g==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=OocQHUDgAAAA:8 a=r32adzmBVe0XzYqks-kA:9 a=CjuIK1q_8ugA:10 a=xUZTl98r3Qw_uB5NK3jt:22 X-Origin-Country: SE X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 18 sep. 2020 kl. 15.13 skrev Lars Ingebrigtsen : First of all, thanks for looking at the patch! > So you basically just `ding' in interactive usage? Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 43489 Cc: 43489@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 18 sep. 2020 kl. 15.13 skrev Lars Ingebrigtsen : First of all, thanks for looking at the patch! > So you basically just `ding' in interactive usage? Right. I probably owe you a deeper explanation! Please bear with me for = a moment. It would be acceptable to replace the dings with (user-error = "appropriate message"); it would still be an improvement. However: I'm a firm believer in positive design. Features should be motivated by = their actual value rather than habit or tradition. =46rom the user's = point of view, it is not an error when the cursor refuses to move beyond = its bounds. No other editor (except one) displays a message in these = cases, and many don't even beep. The only exception I've found is ed, = which should delight everybody. These messages don't make the editor easier to use in any way; it is = crystal clear what the reason is when the cursor doesn't move at the = edge of the {line, buffer, sexp, list, ...}. I'd say the contrary: they = are nuisance messages that obscure the echo area, clutter the *Messages* = buffer, and needlessly cause distractive movement in the visual = periphery (a big no-no for any serious industrial UI designer). In fact, several of the commands in question don't even beep at the = boundaries in some cases: for example, C-M-f after the last sexp of the = buffer jumps to end-of-buffer and silently stays there. Should we add = noise messages for such cases? Surely not. In other words: I'm not strongly against messages instead of dings if = that is the condition for applying the patch, but would like to hear the = benefit of those messages argued positively. There, I'm better now. And here's a hot cuppa, lovely. > I wonder whether this would have any negative effect when people are > using these commands in keyboard macros. For instance, if you've > recorded a macro that does `M-C-f M-DEL' or something, previously it > would signal an error and then stop, while now it'll just continue and > delete the wrong thing? Actually, (ding) interrupts keyboard macros, so this does work. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 18 11:23:25 2020 Received: (at 43489) by debbugs.gnu.org; 18 Sep 2020 15:23:25 +0000 Received: from localhost ([127.0.0.1]:44185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJIEP-0002j5-AK for submit@debbugs.gnu.org; Fri, 18 Sep 2020 11:23:25 -0400 Received: from quimby.gnus.org ([95.216.78.240]:55778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJIEN-0002ir-I7 for 43489@debbugs.gnu.org; Fri, 18 Sep 2020 11:23:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=f+1LdQKFlBRJZ048knuED/jyYqfxntMhcUsT1zn1DYQ=; b=edyW1aCHuaYq0vgdbvlyHNV4Ws rEgRQuzAeBX90epbaE59CEYGSFYv7Y9b7PkIn0lp97LbNxKl0FQ98VWSWRHSqM/KArGOUhK1/ErMN dUEjAx8AWbCc6JKNbNFIj4ntO+8FvVU1hvMKsaNLxy9HNWDmJHWIzfcyL2ZFUJujs/8w=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kJIEB-0007G8-N3; Fri, 18 Sep 2020 17:23:17 +0200 From: Lars Ingebrigtsen To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively References: <64C7CB3A-36F2-4988-9FF9-B99115C9ED13@acm.org> <87k0wri5xq.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQAAAAB/ecQqAAAABGdBTUEAALGPC/xhBQAAAAJi S0dEAAHdihOkAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAB3RJTUUH5AkQCyMGR5f7bwAAABBJREFU GNNj+A8GDKMUdSgAT1Qe8M8TmhgAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMDktMTZUMTE6MzU6 MDUrMDA6MDBrguOZAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTA5LTE2VDExOjM1OjA1KzAwOjAw Gt9bJQAAAABJRU5ErkJggg== X-Now-Playing: Saito Koji's _433-1_: "433_086" Date: Fri, 18 Sep 2020 17:23:10 +0200 In-Reply-To: ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Fri, 18 Sep 2020 17:13:18 +0200") Message-ID: <87imcbds81.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Mattias EngdegÃ¥rd writes: > In fact, several of the commands in question don't even beep at the > boundaries in some cases: for example, C-M-f after the last sexp of > the buffer jumps to end-of-buffer and silently stays there [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43489 Cc: 43489@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > In fact, several of the commands in question don't even beep at the > boundaries in some cases: for example, C-M-f after the last sexp of > the buffer jumps to end-of-buffer and silently stays there. Should we > add noise messages for such cases? Surely not. Yeah, that is pretty inconsistent. > In other words: I'm not strongly against messages instead of dings if > that is the condition for applying the patch, but would like to hear > the benefit of those messages argued positively. Emacs does signal errors a lot more in editing than other editors, it's true -- for instance, `left' at the beginning of the buffer. > There, I'm better now. And here's a hot cuppa, lovely. :-) >> I wonder whether this would have any negative effect when people are >> using these commands in keyboard macros. For instance, if you've >> recorded a macro that does `M-C-f M-DEL' or something, previously it >> would signal an error and then stop, while now it'll just continue and >> delete the wrong thing? > > Actually, (ding) interrupts keyboard macros, so this does work. Ah, I'd forgotten that. Still, I'm not sure whether a (ding) is more helpful than a non-cryptic user-error message in these instances. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 18 12:01:47 2020 Received: (at 43489) by debbugs.gnu.org; 18 Sep 2020 16:01:47 +0000 Received: from localhost ([127.0.0.1]:44255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJIpW-0007Og-IX for submit@debbugs.gnu.org; Fri, 18 Sep 2020 12:01:46 -0400 Received: from mail204c50.megamailservers.eu ([91.136.10.214]:60158 helo=mail193c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJIpT-0007Kh-PR for 43489@debbugs.gnu.org; Fri, 18 Sep 2020 12:01:45 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1600444901; bh=hLXwc7elklpVF8955g5IU4kBtOux/yAzOjPYN5fc70U=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=OafD/W+sSMnwSUJjTA9B0+WCqFe85p00V8+orDgbeyPLP86K3OEdjSrzHvU5yO5RO dUioYcwgqMesRJHQQL3Y/BBFySNuCqxrbqRKUm3kX1aRQl78CtFzaZK9iRpRc1Sd1W Ubog8pbEhuhUmGsTJvMexfBWvg+nrFjdLdE8mIZU= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-304ee655.032-75-73746f71.bbcust.telenor.se [85.230.78.48]) (authenticated bits=0) by mail193c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 08IG1dB4000890; Fri, 18 Sep 2020 16:01:40 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <87imcbds81.fsf@gnus.org> Date: Fri, 18 Sep 2020 18:01:39 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <9FE2FD7F-84CF-415B-BD7F-DDAF0D401414@acm.org> References: <64C7CB3A-36F2-4988-9FF9-B99115C9ED13@acm.org> <87k0wri5xq.fsf@gnus.org> <87imcbds81.fsf@gnus.org> To: Lars Ingebrigtsen X-Mailer: Apple Mail (2.3445.104.15) X-CTCH-RefID: str=0001.0A782F21.5F64D9E5.004E, 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-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=cM2eTWWN c=1 sm=1 tr=0 a=63Z2wlQ1NB3xHpgKFKE71g==:117 a=63Z2wlQ1NB3xHpgKFKE71g==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=OocQHUDgAAAA:8 a=pJWbe5TTnqLJTz-G7VIA:9 a=CjuIK1q_8ugA:10 a=xUZTl98r3Qw_uB5NK3jt:22 X-Origin-Country: SE X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 43489 Cc: 43489@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 18 sep. 2020 kl. 17.23 skrev Lars Ingebrigtsen : > Still, I'm not sure whether a (ding) is more helpful than a = non-cryptic > user-error message in these instances. That's a fair view, but my point is that we shouldn't put in a message = unless we can honestly argue for its usefulness. In this case it seems = difficult to do so given the evidence. It's not like every other editor = is more difficult to use in this particular aspect. Or put in another way: the absence of a message isn't necessarily = cryptic. When the editor explains itself by the result of the user's = action, a verbal message on top of it can make matters worse. By the way, (ding) and (user-error "") seem more or less equivalent, in = case one would be preferable. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 19 10:13:25 2020 Received: (at 43489) by debbugs.gnu.org; 19 Sep 2020 14:13:25 +0000 Received: from localhost ([127.0.0.1]:47655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJdcC-0002x8-Up for submit@debbugs.gnu.org; Sat, 19 Sep 2020 10:13:25 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJdcA-0002wu-SP for 43489@debbugs.gnu.org; Sat, 19 Sep 2020 10:13:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=rb7LQpes9aYy5Be4FeDO6XdNMp+M1NzRXEpqVvqbXOM=; b=mK72rCYk6OYV9ps0LV9tkCAY7y XRFV64A1UIsRjyrYY5gLA28emwxnYPntkIIy1DGxkM4kp5r5SuhzSralP1fYVCPZgq5ZNyCYRE/ra xLh59cVwJ4kYAKRr8RxgxJ0o2sc95VSrhVAgsAa1KF51ixV/SgdMyw604uIQilWlP63M=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kJdbt-00043B-LE; Sat, 19 Sep 2020 16:13:17 +0200 From: Lars Ingebrigtsen To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively References: <64C7CB3A-36F2-4988-9FF9-B99115C9ED13@acm.org> <87k0wri5xq.fsf@gnus.org> <87imcbds81.fsf@gnus.org> <9FE2FD7F-84CF-415B-BD7F-DDAF0D401414@acm.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAD1BMVEULBwZfOTOpa1vs 1Mr///8qN6K2AAAAAWJLR0QEj2jZUQAAAAd0SU1FB+QJEw4KDPd64J8AAAGjSURBVDjLnZPrdcMw CIXBWUDgBQwsUIv9dysPOXZ62j/VyUPOJy7iQgAAiKe6+9w81xzA8QUDQJQLcAMZeSICUA40d1Jb AHABnaQ+VZV9EqsAWIFt1kFllsI/gA8ksUmUYE8wOLXVzxA1J2BtgNKA/YxMpdVg076NeSvGmRXh WYPm4QuMzmH5G9GeYHYdVGCrgmVz8YMsAXIBkJXjsBKLgCw9HWmPfFh6GbcuN+IdNlTpEFlDcIxC EFZKlOtRMI9ogNAN4gEonjlqnRQa1MDytqmbihGNWTvAkY5oguoWWTqf3s+2KvLqjFis2t0UvKyK Rsd5Udm7prijW4Ps84nDlmEJun/1iejXgqndp37a/I7wpZpU7Y547w649x8AfgDsBuZsXEDXOSBY 69LcF4APMIHQHoAucLIL3iC2o8FXCI0PcCwQxTwBi64cMfUFWBr4AqdFmxOsKI25WVKahgPuWt0n XTlOJa3ZRTp6kq5bKUkWyGLns0AdHK+MIDseoP6sAC9P8YclX+9tDBbdYL63r8+I8bQU3ylw3SIx wi/rTwD/A98NUniNb/NXxQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMC0wOS0xOVQxNDoxMDoxMisw MDowME8PeyUAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjAtMDktMTlUMTQ6MTA6MTIrMDA6MDA+UsOZ AAAAAElFTkSuQmCC X-Now-Playing: Propaganda's _A Secret Wish (2)_: "Do Well (The First Cut-Duel-Jewel (Cut Rough)-Wonder-Bejewelled)" Date: Sat, 19 Sep 2020 16:13:04 +0200 In-Reply-To: <9FE2FD7F-84CF-415B-BD7F-DDAF0D401414@acm.org> ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Fri, 18 Sep 2020 18:01:39 +0200") Message-ID: <874kntsvm7.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Mattias EngdegÃ¥rd writes: > 18 sep. 2020 kl. 17.23 skrev Lars Ingebrigtsen : > >> Still, I'm not sure whether a (ding) is more helpful than a non-cryptic >> user-error message in these instances. > > That's a f [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43489 Cc: 43489@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > 18 sep. 2020 kl. 17.23 skrev Lars Ingebrigtsen : > >> Still, I'm not sure whether a (ding) is more helpful than a non-cryptic >> user-error message in these instances. > > That's a fair view, but my point is that we shouldn't put in a message > unless we can honestly argue for its usefulness. In this case it seems > difficult to do so given the evidence. It's not like every other > editor is more difficult to use in this particular aspect. The movement commands Emacs has here are more complicated than most editors have, though. Saying why `C-M-f' can't move seems like useful information for the user to receive. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 20 13:33:39 2020 Received: (at 43489) by debbugs.gnu.org; 20 Sep 2020 17:33:39 +0000 Received: from localhost ([127.0.0.1]:52554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kK3DX-000735-5U for submit@debbugs.gnu.org; Sun, 20 Sep 2020 13:33:39 -0400 Received: from mail1447c50.megamailservers.eu ([91.136.14.47]:59732 helo=mail265c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kK3DT-00072p-NK for 43489@debbugs.gnu.org; Sun, 20 Sep 2020 13:33:38 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1600623208; bh=lD5NMfOm46qFMDqVwbiNeaIC63Ofb5JWK4lg/gfyhpQ=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=r1uiJYCTebe8qw9OuUIs7He74aUwwWJ1pXmlTqUjznMimSbDoszFyLIBekxcCcfTq bZ7IwfQlYCS63SV6+0Cc0Vf2hoZ2XxW0n29jmJX+W5Q/gEVlqNa0ZxohJsKvE/3W8J /Oay94BJ38c4Kjf+NFwUhwoK8fpbsjaOaqTeSssA= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-304ee655.032-75-73746f71.bbcust.telenor.se [85.230.78.48]) (authenticated bits=0) by mail265c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 08KHXP36001089; Sun, 20 Sep 2020 17:33:27 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Message-Id: <9852E6CA-1EB9-41B6-8B01-DAD627C2ED21@acm.org> Content-Type: multipart/mixed; boundary="Apple-Mail=_6F22B6D3-AEC0-4620-BEB0-8881C487EA63" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively Date: Sun, 20 Sep 2020 19:33:25 +0200 In-Reply-To: <874kntsvm7.fsf@gnus.org> To: Lars Ingebrigtsen 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> X-Mailer: Apple Mail (2.3445.104.15) X-CTCH-RefID: str=0001.0A782F28.5F679268.0025, 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-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=D5w51cZj c=1 sm=1 tr=0 a=63Z2wlQ1NB3xHpgKFKE71g==:117 a=63Z2wlQ1NB3xHpgKFKE71g==:17 a=M51BFTxLslgA:10 a=OocQHUDgAAAA:8 a=oG6y52frVLhZH0yRXvUA:9 a=CjuIK1q_8ugA:10 a=xG116jtGo4NxAXRApYYA:9 a=B2y7HmGcmWMA:10 a=xUZTl98r3Qw_uB5NK3jt:22 X-Origin-Country: SE X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 19 sep. 2020 kl. 16.13 skrev Lars Ingebrigtsen : > The movement commands Emacs has here are more complicated than most > editors have, though. Saying why `C-M-f' can't move seems like useful > information for the user to receive. Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 43489 Cc: 43489@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --Apple-Mail=_6F22B6D3-AEC0-4620-BEB0-8881C487EA63 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 19 sep. 2020 kl. 16.13 skrev Lars Ingebrigtsen : > The movement commands Emacs has here are more complicated than most > editors have, though. Saying why `C-M-f' can't move seems like useful > information for the user to receive. Well, but is that true? There is no evidence for it. Emacs currently = gives no useful information in such situations and never has = ('scan-error' indeed). The previously posted patch can only improve = matters. Of course we can put in messages for the at-bounds cases; it would look = something like the patch below. While it would still be an improvement = over what Emacs currently does, it is still a statement that we value = tradition over usability. Try both! Another alternative would be the standard Emacs compromise: add a = defcustom. Since it could control the message emission by other movement = commands like backward-char and next-line, it's perhaps not a bad idea = after all... It wouldn't need to do anything about movement by word or sentence since = they already seem to be fixed, good! --Apple-Mail=_6F22B6D3-AEC0-4620-BEB0-8881C487EA63 Content-Disposition: attachment; filename=move-by-sexp--user-error.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="move-by-sexp--user-error.patch" Content-Transfer-Encoding: quoted-printable =46rom=20ddbbaf7cdc922968ee5c2df614bc273c8d879a9a=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Fri,=2018=20Sep=202020=2012:49:33=20+0200=0A= Subject:=20[PATCH]=20Don't=20signal=20scan-error=20when=20moving=20by=20= sexp=20interactively=0A=0A*=20lisp/emacs-lisp/lisp.el=20(forward-sexp,=20= backward-sexp,=20forward-list)=0A(backward-list,=20down-list,=20= up-list):=20Remove=20unsightly=20scan-error=0Awhen=20running=20= interactively=20and=20no=20further=20movement=20by=20sexp=20can=20be=20= made.=0A---=0A=20lisp/emacs-lisp/lisp.el=20|=2088=20= ++++++++++++++++++++++++++---------------=0A=201=20file=20changed,=2056=20= insertions(+),=2032=20deletions(-)=0A=0Adiff=20--git=20= a/lisp/emacs-lisp/lisp.el=20b/lisp/emacs-lisp/lisp.el=0Aindex=20= 8c18557c79..a0b86d2fd1=20100644=0A---=20a/lisp/emacs-lisp/lisp.el=0A+++=20= b/lisp/emacs-lisp/lisp.el=0A@@=20-55,7=20+55,7=20@@=20= forward-sexp-function=0A=20=20=20"If=20non-nil,=20`forward-sexp'=20= delegates=20to=20this=20function.=0A=20Should=20take=20the=20same=20= arguments=20and=20behave=20similarly=20to=20`forward-sexp'.")=0A=20=0A= -(defun=20forward-sexp=20(&optional=20arg)=0A+(defun=20forward-sexp=20= (&optional=20arg=20noerror)=0A=20=20=20"Move=20forward=20across=20one=20= balanced=20expression=20(sexp).=0A=20With=20ARG,=20do=20it=20that=20many=20= times.=20=20Negative=20arg=20-N=20means=20move=0A=20backward=20across=20= N=20balanced=20expressions.=20=20This=20command=20assumes=0A@@=20-64,23=20= +64,31=20@@=20forward-sexp=0A=20If=20unable=20to=20move=20over=20a=20= sexp,=20signal=20`scan-error'=20with=20three=0A=20arguments:=20a=20= message,=20the=20start=20of=20the=20obstacle=20(usually=20a=0A=20= parenthesis=20or=20list=20marker=20of=20some=20kind),=20and=20end=20of=20= the=0A-obstacle."=0A-=20=20(interactive=20"^p")=0A-=20=20(or=20arg=20= (setq=20arg=201))=0A-=20=20(if=20forward-sexp-function=0A-=20=20=20=20=20= =20(funcall=20forward-sexp-function=20arg)=0A-=20=20=20=20(goto-char=20= (or=20(scan-sexps=20(point)=20arg)=20(buffer-end=20arg)))=0A-=20=20=20=20= (if=20(<=20arg=200)=20(backward-prefix-chars))))=0A-=0A-(defun=20= backward-sexp=20(&optional=20arg)=0A+obstacle.=20=20If=20NOERROR=20is=20= non-nil,=20as=20it=20is=20interactively,=0A+do=20not=20signal=20an=20= error."=0A+=20=20(interactive=20"^p\nd")=0A+=20=20(if=20noerror=0A+=20=20= =20=20=20=20(condition-case=20_=0A+=20=20=20=20=20=20=20=20=20=20= (forward-sexp=20arg=20nil)=0A+=20=20=20=20=20=20=20=20(scan-error=20= (user-error=20(if=20(>=20arg=200)=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= "No=20next=20sexp"=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20"No=20previous=20= sexp"))))=0A+=20=20=20=20(or=20arg=20(setq=20arg=201))=0A+=20=20=20=20= (if=20forward-sexp-function=0A+=20=20=20=20=20=20=20=20(funcall=20= forward-sexp-function=20arg)=0A+=20=20=20=20=20=20(goto-char=20(or=20= (scan-sexps=20(point)=20arg)=20(buffer-end=20arg)))=0A+=20=20=20=20=20=20= (if=20(<=20arg=200)=20(backward-prefix-chars)))))=0A+=0A+(defun=20= backward-sexp=20(&optional=20arg=20noerror)=0A=20=20=20"Move=20backward=20= across=20one=20balanced=20expression=20(sexp).=0A=20With=20ARG,=20do=20= it=20that=20many=20times.=20=20Negative=20arg=20-N=20means=0A=20move=20= forward=20across=20N=20balanced=20expressions.=0A=20This=20command=20= assumes=20point=20is=20not=20in=20a=20string=20or=20comment.=0A-Uses=20= `forward-sexp'=20to=20do=20the=20work."=0A-=20=20(interactive=20"^p")=0A= +Uses=20`forward-sexp'=20to=20do=20the=20work.=0A+If=20NOERROR=20is=20= non-nil,=20as=20it=20is=20interactively,=20do=20not=20signal=20an=20= error."=0A+=20=20(interactive=20"^p\nd")=0A=20=20=20(or=20arg=20(setq=20= arg=201))=0A-=20=20(forward-sexp=20(-=20arg)))=0A+=20=20(forward-sexp=20= (-=20arg)=20noerror))=0A=20=0A=20(defun=20mark-sexp=20(&optional=20arg=20= allow-extend)=0A=20=20=20"Set=20mark=20ARG=20sexps=20from=20point.=0A@@=20= -108,41=20+116,54=20@@=20mark-sexp=0A=20=09=20=20=20=20(point))=0A=20=09=20= =20nil=20t))))=0A=20=0A-(defun=20forward-list=20(&optional=20arg)=0A= +(defun=20forward-list=20(&optional=20arg=20noerror)=0A=20=20=20"Move=20= forward=20across=20one=20balanced=20group=20of=20parentheses.=0A=20This=20= command=20will=20also=20work=20on=20other=20parentheses-like=20= expressions=0A=20defined=20by=20the=20current=20language=20mode.=0A=20= With=20ARG,=20do=20it=20that=20many=20times.=0A=20Negative=20arg=20-N=20= means=20move=20backward=20across=20N=20groups=20of=20parentheses.=0A= -This=20command=20assumes=20point=20is=20not=20in=20a=20string=20or=20= comment."=0A-=20=20(interactive=20"^p")=0A-=20=20(or=20arg=20(setq=20arg=20= 1))=0A-=20=20(goto-char=20(or=20(scan-lists=20(point)=20arg=200)=20= (buffer-end=20arg))))=0A-=0A-(defun=20backward-list=20(&optional=20arg)=0A= +This=20command=20assumes=20point=20is=20not=20in=20a=20string=20or=20= comment.=0A+If=20NOERROR=20is=20non-nil,=20as=20it=20is=20interactively,=20= do=20not=20signal=20an=20error."=0A+=20=20(interactive=20"^p\nd")=0A+=20=20= (if=20noerror=0A+=20=20=20=20=20=20(condition-case=20_=0A+=20=20=20=20=20= =20=20=20=20=20(forward-list=20arg=20nil)=0A+=20=20=20=20=20=20=20=20= (scan-error=20(user-error=20(if=20(>=20arg=200)=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20"No=20next=20expression"=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20"No=20= previous=20expression"))))=0A+=20=20=20=20(or=20arg=20(setq=20arg=201))=0A= +=20=20=20=20(goto-char=20(or=20(scan-lists=20(point)=20arg=200)=20= (buffer-end=20arg)))))=0A+=0A+(defun=20backward-list=20(&optional=20arg=20= noerror)=0A=20=20=20"Move=20backward=20across=20one=20balanced=20group=20= of=20parentheses.=0A=20This=20command=20will=20also=20work=20on=20other=20= parentheses-like=20expressions=0A=20defined=20by=20the=20current=20= language=20mode.=0A=20With=20ARG,=20do=20it=20that=20many=20times.=0A=20= Negative=20arg=20-N=20means=20move=20forward=20across=20N=20groups=20of=20= parentheses.=0A-This=20command=20assumes=20point=20is=20not=20in=20a=20= string=20or=20comment."=0A-=20=20(interactive=20"^p")=0A+This=20command=20= assumes=20point=20is=20not=20in=20a=20string=20or=20comment.=0A+If=20= NOERROR=20is=20non-nil,=20as=20it=20is=20interactively,=20do=20not=20= signal=20an=20error."=0A+=20=20(interactive=20"^p\nd")=0A=20=20=20(or=20= arg=20(setq=20arg=201))=0A-=20=20(forward-list=20(-=20arg)))=0A+=20=20= (forward-list=20(-=20arg)=20noerror))=0A=20=0A-(defun=20down-list=20= (&optional=20arg)=0A+(defun=20down-list=20(&optional=20arg=20noerror)=0A=20= =20=20"Move=20forward=20down=20one=20level=20of=20parentheses.=0A=20This=20= command=20will=20also=20work=20on=20other=20parentheses-like=20= expressions=0A=20defined=20by=20the=20current=20language=20mode.=0A=20= With=20ARG,=20do=20this=20that=20many=20times.=0A=20A=20negative=20= argument=20means=20move=20backward=20but=20still=20go=20down=20a=20= level.=0A-This=20command=20assumes=20point=20is=20not=20in=20a=20string=20= or=20comment."=0A-=20=20(interactive=20"^p")=0A-=20=20(or=20arg=20(setq=20= arg=201))=0A-=20=20(let=20((inc=20(if=20(>=20arg=200)=201=20-1)))=0A-=20=20= =20=20(while=20(/=3D=20arg=200)=0A-=20=20=20=20=20=20(goto-char=20(or=20= (scan-lists=20(point)=20inc=20-1)=20(buffer-end=20arg)))=0A-=20=20=20=20=20= =20(setq=20arg=20(-=20arg=20inc)))))=0A+This=20command=20assumes=20point=20= is=20not=20in=20a=20string=20or=20comment.=0A+If=20NOERROR=20is=20= non-nil,=20as=20it=20is=20interactively,=20do=20not=20signal=20an=20= error."=0A+=20=20(interactive=20"^p\nd")=0A+=20=20(if=20noerror=0A+=20=20= =20=20=20=20(condition-case=20_=0A+=20=20=20=20=20=20=20=20=20=20= (down-list=20arg=20nil)=0A+=20=20=20=20=20=20=20=20(scan-error=20= (user-error=20"At=20bottom=20level")))=0A+=20=20=20=20(or=20arg=20(setq=20= arg=201))=0A+=20=20=20=20(let=20((inc=20(if=20(>=20arg=200)=201=20-1)))=0A= +=20=20=20=20=20=20(while=20(/=3D=20arg=200)=0A+=20=20=20=20=20=20=20=20= (goto-char=20(or=20(scan-lists=20(point)=20inc=20-1)=20(buffer-end=20= arg)))=0A+=20=20=20=20=20=20=20=20(setq=20arg=20(-=20arg=20inc))))))=0A=20= =0A=20(defun=20backward-up-list=20(&optional=20arg=20escape-strings=20= no-syntax-crossing)=0A=20=20=20"Move=20backward=20out=20of=20one=20level=20= of=20parentheses.=0A@@=20-229,7=20+250,10=20@@=20up-list=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(or=20(<=20inc=200)=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(forward-comment=20= 1))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(setf=20arg=20= (+=20arg=20inc)))=0A-=20=20=20=20=20=20=20=20=20=20=20=20(signal=20(car=20= err)=20(cdr=20err))))))=0A+=20=20=20=20=20=20=20=20=20=20=20=20(if=20= no-syntax-crossing=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20= Assume=20called=20interactively;=20don't=20signal=20an=20error.=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(user-error=20"At=20top=20= level")=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20(signal=20(car=20= err)=20(cdr=20err)))))))=0A=20=20=20=20=20=20=20(setq=20arg=20(-=20arg=20= inc)))))=0A=20=0A=20(defun=20kill-sexp=20(&optional=20arg)=0A--=20=0A= 2.21.1=20(Apple=20Git-122.3)=0A=0A= --Apple-Mail=_6F22B6D3-AEC0-4620-BEB0-8881C487EA63-- From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 20 15:54:45 2020 Received: (at 43489) by debbugs.gnu.org; 20 Sep 2020 19:54:45 +0000 Received: from localhost ([127.0.0.1]:52743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kK5Q4-0002Az-V6 for submit@debbugs.gnu.org; Sun, 20 Sep 2020 15:54:45 -0400 Received: from quimby.gnus.org ([95.216.78.240]:36192) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kK5Q2-0002Ak-7W for 43489@debbugs.gnu.org; Sun, 20 Sep 2020 15:54:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=kC+VmuU9BIW95fdLqSbLL03hr4y/SaVOiu9d1iq7IYU=; b=QbfsYa/ReAM3K3rqlVnKg16gOG YJ8oAyjSMOb71n62LeoZvMZwcNucWTFwynH9g8w6WMo4X8De/EEfKM0X8pdNQGwOlcKfy5RI5pb/J Ko8QNzhOfZT38eA+Tm2btVqhJGwrc5XvLmFSlFkfkypRcxf8KfbsvWpOMwc1lzGHV9VY=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kK5Ps-0001HV-4W; Sun, 20 Sep 2020 21:54:35 +0200 From: Lars Ingebrigtsen To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively 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> X-Now-Playing: Japan's _Gentlemen Take Polaroids_: "Ain't That Peculiar" Date: Sun, 20 Sep 2020 21:54:30 +0200 In-Reply-To: <9852E6CA-1EB9-41B6-8B01-DAD627C2ED21@acm.org> ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Sun, 20 Sep 2020 19:33:25 +0200") Message-ID: <87tuvsjkax.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Mattias EngdegÃ¥rd writes: > Well, but is that true? There is no evidence for it. Emacs currently > gives no useful information in such situations and never has > ('scan-error' indeed). The previously posted patch can only impr [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43489 Cc: 43489@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > Well, but is that true? There is no evidence for it. Emacs currently > gives no useful information in such situations and never has > ('scan-error' indeed). The previously posted patch can only improve > matters. Even if the error looked like an internal error, the bit in the middle is informative: forward-sexp: Scan error: "Containing expression ends prematurely", 2076, 2= 077 > Of course we can put in messages for the at-bounds cases; it would > look something like the patch below. While it would still be an > improvement over what Emacs currently does, it is still a statement > that we value tradition over usability. Try both! OK, tried it now. It's less confusing on the whole, except this bit: > + (if noerror > + (condition-case _ > + (forward-sexp arg nil) > + (scan-error (user-error (if (> arg 0) > + "No next sexp" > + "No previous sexp")))) Hitting `C-M-f' at the start of this line )() 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 "(". --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 20 17:39:59 2020 Received: (at 43489) by debbugs.gnu.org; 20 Sep 2020 21:39:59 +0000 Received: from localhost ([127.0.0.1]:52870 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kK73v-0006sW-Il for submit@debbugs.gnu.org; Sun, 20 Sep 2020 17:39:59 -0400 Received: from mail-lf1-f49.google.com ([209.85.167.49]:38260) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kK73r-0006sE-9U for 43489@debbugs.gnu.org; Sun, 20 Sep 2020 17:39:57 -0400 Received: by mail-lf1-f49.google.com with SMTP id y11so11866299lfl.5 for <43489@debbugs.gnu.org>; Sun, 20 Sep 2020 14:39:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=muNVvIASJ3HrsQrts5EFSaRMrFHUWmbMGifEQkgFMhY=; b=R1Ex/oMaNvCwsal+mdooZsCQis5OF+LPnN5NGFnz6Se3R+FyK+Js7mli5DoUXXaWvb fjvgFbbhqX8reKEFRDRneF+9sBQPGLJtUrToeK0dsARYHnC2k/ihfnJqkYbrR/eU494f UJO6v0wnZN+F18EgLqDfbe8xqyxq66cL1qdzyYDcnt39d1GUyEk0X6ChYIw4BFfWWdyY RyD/6wH+Ge26L4J315ZPEFhlYmuj3rdT4TQyOkX4L/jenQUbjIX4x50rM0LsWvaIzAXe aMaUGjiFEVX5/hob/gP9YJIQE0uPK7aBPHOu/2W9FV2fGpELzdozz676bFWqkB12vupG pm0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=muNVvIASJ3HrsQrts5EFSaRMrFHUWmbMGifEQkgFMhY=; b=D8NMcPFsKll8IhbHd7CbR5UCj6wf1CrvOn8vNYaqvD59JBw3frSQ37mkS4naS9w+Kc MziaGir8Plyn5LaxR6zKTzHLONY0VGa7ARrMoujcBXYWgHyaoqUAgkOG8pu6DDz0DAOb P9RzTp6DRbkDedS9mVdNXfZjbJMqb0IW+H5IFKPjic2SsZz3V6rxWIWxZXE86jqkgxXd IDuW73nAxD1V7VfbEvHNCHrXvhHL4e2NGVm6fydjV7x0DRE+yjK7XdXEyeiCYHnKr1i2 1VvD5s+RpDTSHbT5f4V9S67Eaqzkt8CqDbfrSgVyc9oZv3rDc7jmgRWMCYIf7+q078Fw hrIQ== X-Gm-Message-State: AOAM533tMN3pJuATRXBlf/0iiwZGRYdVDijs03gbqoXYhPfZd9gR7+ya u8MSyZ0FHGpI2CKGzALHy4P5xUxIfvE= X-Google-Smtp-Source: ABdhPJwG8DvBEzMSodLtWek5gToT1YWaAUM+YSdSKyr+V+D/0vfIao58E0kBiDjuEUyYxKaFGEkwNQ== X-Received: by 2002:ac2:523a:: with SMTP id i26mr14095576lfl.577.1600637988610; Sun, 20 Sep 2020 14:39:48 -0700 (PDT) Received: from [192.168.0.104] ([94.229.108.16]) by smtp.googlemail.com with ESMTPSA id u11sm2174750ljh.17.2020.09.20.14.39.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 20 Sep 2020 14:39:47 -0700 (PDT) Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively To: =?UTF-8?Q?Mattias_Engdeg=c3=a5rd?= , Lars Ingebrigtsen 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> From: Dmitry Gutov Message-ID: Date: Mon, 21 Sep 2020 00:39:47 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <9852E6CA-1EB9-41B6-8B01-DAD627C2ED21@acm.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 43489 Cc: 43489@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 20.09.2020 20:33, Mattias Engdegård wrote: > While it would still be an improvement over what Emacs currently does, it is still a statement that we value tradition over usability. Try both! I think that is certainly the case, as a multitude of discussions on emacs-devel has shown. It's kinda weird that you chose this particular bit of functionality as an example, though. There are no counterparts to this in other editors, so there's no real usability research, and we don't really know which approach is the most usable. I'd really prefer we examine both and make a considered choice, rather than add a user option. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 21 04:49:46 2020 Received: (at 43489) by debbugs.gnu.org; 21 Sep 2020 08:49:46 +0000 Received: from localhost ([127.0.0.1]:53428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKHW6-0001wZ-Aq for submit@debbugs.gnu.org; Mon, 21 Sep 2020 04:49:46 -0400 Received: from mail-il1-f175.google.com ([209.85.166.175]:46432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKHW3-0001wL-FE for 43489@debbugs.gnu.org; Mon, 21 Sep 2020 04:49:45 -0400 Received: by mail-il1-f175.google.com with SMTP id u18so12858187iln.13 for <43489@debbugs.gnu.org>; Mon, 21 Sep 2020 01:49:43 -0700 (PDT) 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=2AJ/NFf7KMCyMYunJ+isWPJRY4TbQj9KevijD8skwvw=; b=ROB2NVNetX8Eyz2TkdccjFHBSQZkdxpD+d6DKqUdjQpiG5c5nt9w7+SJrjVb6dI2hD ePA0Ja2kUy/SOhjKWZnROu54KZSOSJFi5CZmBV7TI6hD7qiIx7DAEXbCbP6yp3k0Xukz aGJXLeMsg2Wv4hSO3FFSAz0NDwtQ62tZxPnZ/X0qAzhMQPADbqCeVpxlaemDJCI+1Gse 4331KDMP7NBxLXs8yqG3BPehxDjZpGFekxoAB9r2QnIQQNPSHLm7gM8FdDIYkEjGgeIu RJhVHUnvPFZoyAIdEpwIQY8ADYUwTbenBSQifG7NiJUON+joKf2jbTm/xg6tsWOzy3hr UOjg== 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=2AJ/NFf7KMCyMYunJ+isWPJRY4TbQj9KevijD8skwvw=; b=HEE6Tv68b3lWXrl4O+UxHkyRLU1a5Tup2NrJltCtT9kg/+sNdDVAYf6ieMFaArd0P9 IR7l9WgE4TyX/Y1/bjBIFNflADFerggK78kCJ+MZ8YiAs/iKhWr6bJhog867D98O/PH/ dTvdjuRk41lBawlI7/tow9S+OySs82eZuuByErX5SHB1Jc6DQt3C75zicg7e3AZM69Zl MZiwjd7H+GAUrMmwbMNwp8LssS9cI2gyw7sJp4WKHWJ07HqlZwkivYuxK48ZHPLbUX9M KSwJ0/W2ZtqVxKN6Hmk7+KBJTkXDrNAs8n2ntYUkiz5Oy3y4/6udRmAbU5yZo69zuk3L sRRg== X-Gm-Message-State: AOAM530PYEGqqt7SJ3dPv+glh7Pr3ASwu6dDhsX1EVNvFjzz+dlhnxGK NE7uLbgl0hgfX0zIAjtlfuLzklCHRzRaI2LIgC0= X-Google-Smtp-Source: ABdhPJyQiwmMkJ3Fo8dtTJY8KVp3w8Kb0r4s1eJNoghkPUbCpuv/XuQ+61LGeihNoTiZBq/P4y6hLs5APhf9D5G6G1E= X-Received: by 2002:a92:a307:: with SMTP id a7mr18249878ili.97.1600678177581; Mon, 21 Sep 2020 01:49:37 -0700 (PDT) MIME-Version: 1.0 References: <64C7CB3A-36F2-4988-9FF9-B99115C9ED13@acm.org> <87k0wri5xq.fsf@gnus.org> In-Reply-To: <87k0wri5xq.fsf@gnus.org> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Mon, 21 Sep 2020 09:49:25 +0100 Message-ID: Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively To: Lars Ingebrigtsen Content-Type: multipart/alternative; boundary="0000000000002cae4605afceeee7" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43489 Cc: =?UTF-8?Q?Mattias_Engdeg=C3=A5rd?= , 43489@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0000000000002cae4605afceeee7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Sep 18, 2020 at 2:14 PM Lars Ingebrigtsen wrote: > Mattias Engdeg=C3=A5rd writes: > > > When moving by sexp (C-M-f, C-M-u and so on) and point is already at a > > boundary preventing further movement, Emacs currently signals an > > internal error such as > > > > Scan error: "Containing expression ends prematurely", 5010, 5010 > > > > or > > > > Scan error: "Unbalanced parentheses", 5010, 1 > > > > which is unhelpful and rather looks as if something went wrong in the > > internal machinery. > > Yes, those error messages are confusing in interactive usage. > I disagree strongly. Maybe the integers following them and containing character positions are confusing, but the messages themselves are fine. Here's my use case. When selecting a certain amount of forms inside another one, but not an outermost one, I type a lot of M-PC until I see the "Containing expression..." message. I actively look out for it. When it pops up, the region persists. I can then C-w or do whatever, keeping that part of the code balanced. If, however, the message is "Unbalanced parenthesis", I know something's up and have to fix it. Please don't remove the message and/or conflate the two cases. Jo=C3=A3o --0000000000002cae4605afceeee7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Sep 18, 2020 at 2:14 PM Lars Ingebrigtsen <larsi@gnus.org> wrote:
Mattias Engdeg=C3=A5rd <mattiase@acm.org> writes:
> When moving by sexp (C-M-f, C-M-u and so on) and point is already at a=
> boundary preventing further movement, Emacs currently signals an
> internal error such as
>
>=C2=A0 Scan error: "Containing expression ends prematurely", = 5010, 5010
>
> or
>
>=C2=A0 Scan error: "Unbalanced parentheses", 5010, 1
>
> which is unhelpful and rather looks as if something went wrong in the<= br> > internal machinery.

Yes, those error messages are confusing in interactive usage.

I disagree strongly.=C2=A0 Maybe the integers follow= ing them and
containing character positions are confusing, b= ut the messages
themselves are fine.=C2=A0
Here's my use case.=C2=A0 When selecting a certain amount = of forms
inside another one, but not an outermost one, I type a l= ot of M-PC
until I see the "Containing expression..." m= essage.=C2=A0 I actively look
out for it.=C2=A0 When it pops= up, the region persists. I can then C-w
or do whatever, kee= ping that part of the code balanced. If, however,
the messag= e is "Unbalanced parenthesis", I know something's up
and have to fix it.

Please don't re= move the message and/or conflate the two cases.=C2=A0

Jo=C3=A3o
--0000000000002cae4605afceeee7-- From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 21 06:55:27 2020 Received: (at 43489) by debbugs.gnu.org; 21 Sep 2020 10:55:27 +0000 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 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 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 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <87tuvsjkax.fsf@gnus.org> Date: Mon, 21 Sep 2020 12:55:19 +0200 Content-Transfer-Encoding: quoted-printable 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> To: Lars Ingebrigtsen 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-Rules: 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-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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: > > forward-sexp: Scan error: "Containing expression ends prematurely", 2076, 2077 Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 43489 Cc: 43489@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 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. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 21 07:21:16 2020 Received: (at 43489) by debbugs.gnu.org; 21 Sep 2020 11:21:16 +0000 Received: from localhost ([127.0.0.1]:53559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKJsi-0005io-6O for submit@debbugs.gnu.org; Mon, 21 Sep 2020 07:21:16 -0400 Received: from mail211c50.megamailservers.eu ([91.136.10.221]:40572 helo=mail194c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKJsd-0005ic-JI for 43489@debbugs.gnu.org; Mon, 21 Sep 2020 07:21:14 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1600687270; bh=2VGVRs6APNFxvJFcqwZEMCBu0IUMOYtTeby7sM9c9z4=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=hjTFfi35YXvLvdFD3PGhhn9oAWxVM48IB9eJz2Cyz7D9SPFFZ5qycBdsmgW3sY7PY fPgSGttEGthSabNbYcsJeGtq50t0mhzTwhqSkZKyU1erIaXhFAT/6+gnPTV5ANN/Fh dR5fySCjZ2SUUkB9jw2O1y0601DPMiFS70EvBq4k= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-304ee655.032-75-73746f71.bbcust.telenor.se [85.230.78.48]) (authenticated bits=0) by mail194c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 08LBL7do019591; Mon, 21 Sep 2020 11:21:09 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Mon, 21 Sep 2020 13:21:07 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <031C4910-1295-4724-8C01-BEFE84F2C25F@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> To: Dmitry Gutov X-Mailer: Apple Mail (2.3445.104.15) X-CTCH-RefID: str=0001.0A782F1A.5F688CA5.00E0, 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-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=KsozJleN c=1 sm=1 tr=0 a=63Z2wlQ1NB3xHpgKFKE71g==:117 a=63Z2wlQ1NB3xHpgKFKE71g==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=vaJtXVxTAAAA:8 a=nAFW1r2V06NwmyH48WYA:9 a=CjuIK1q_8ugA:10 X-Origin-Country: SE X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 43489 Cc: Lars Ingebrigtsen , 43489@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 20 sep. 2020 kl. 23.39 skrev Dmitry Gutov : > I think that is certainly the case, as a multitude of discussions on = emacs-devel has shown. Unfortunately yes, but what else can we do than trying to improve = matters little by little? We will probably fail, but at least we have = tried. > There are no counterparts to this in other editors, so there's no real = usability research, and we don't really know which approach is the most = usable. Other editors have structural movement commands although they may or may = not behave identically. However, it is a common pattern almost = everywhere else that verbal messages aren't displayed unless needed to = convey useful information; Emacs is the clear outlier here. There is no = reason to believe why one special kind of movement commands in Emacs = would warrant error messages (but only sometimes). > I'd really prefer we examine both and make a considered choice, rather = than add a user option. Very much agreed! From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 21 08:37:03 2020 Received: (at 43489) by debbugs.gnu.org; 21 Sep 2020 12:37:03 +0000 Received: from localhost ([127.0.0.1]:53689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKL43-0003Qq-0y for submit@debbugs.gnu.org; Mon, 21 Sep 2020 08:37:03 -0400 Received: from mail-lf1-f54.google.com ([209.85.167.54]:42520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKL3z-0003QJ-Vm for 43489@debbugs.gnu.org; Mon, 21 Sep 2020 08:37:01 -0400 Received: by mail-lf1-f54.google.com with SMTP id b12so13801997lfp.9 for <43489@debbugs.gnu.org>; Mon, 21 Sep 2020 05:36:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=mS1bV3uNNQUFzZSgaGYMnkrO/v/12ebINx7a2OGMhhU=; b=rlTEQ1G4xiFNG5yZbQMl90/jTJxuGBDP8ZTBJKVr6hbFIuhrFphhomf1a3j6yJLakt Uw5c1FbusyOKTrNsNjX6ymz9WbV9/kLupi5BwHVOOtCEwGPLJIxdYPARUcHLsk7SCaPv zw838YLyY+Qp+JRPpVR8FlKK5udT7rcSUjccKDzYe5dsGsjF/tZUx8TTzpxQxf4JZ/2Y RvJ5Fpmn2/UPwwZ8s+e2bNzmY6SpPi0yE+cPCOG/lmMFZAQIR5La1ePUAO1eDSCRcZ6z FoZzlfgjKrtNlTnKSD9lVNHv3SFs4rS74lGbsWYMTR8orwAv2tmd/RbKsEqGCyu9rQOJ XuxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=mS1bV3uNNQUFzZSgaGYMnkrO/v/12ebINx7a2OGMhhU=; b=Z/WE6daEDEvfuWUnVnBnlVKvRBzJpMPHggD88PVlqJcYLGjDIpf6bQFdGUdk4TPsNL Is6oeZnAfAH6hgchKuLYXjvZmvBqZ1emrZAqJmGFga0RWqzuyjhL2u5m5qKymuvz/jcL eE6LCbHtNMAVk1GOmP1S/dEFkNxlA24kafd8frfQ0U4I+yVJe5XTmYYyH6brO++y5hwu jgWUds7r3V7oKxIega5NN/0cHt8IQsLEdvL5XTktx0j5zGXzDdqDARIAt+u0NUDSQ3ra qK/biqUoKS0zig+vVGmLIIjNVJRTYv1IRGtnqAWCQxLWc1mbmNYLvTa0bEmsXZbDEC5G CzUw== X-Gm-Message-State: AOAM531TewCciOBF1GpwGQpWpB8k3S/MkJr2B56guR8Xv/yVYPlA1W8N vSbd2uE6xiPtpBssaKTZBLWUTy2pkeo= X-Google-Smtp-Source: ABdhPJwdZmGPGIczPYUDBqXLvmoyL9bZKt+liDJZeYtPi3QlW+v9FQQtny4SPmouZaF10/uarTGRDw== X-Received: by 2002:a19:4186:: with SMTP id o128mr16228288lfa.297.1600691813563; Mon, 21 Sep 2020 05:36:53 -0700 (PDT) Received: from [192.168.0.104] ([94.229.108.16]) by smtp.googlemail.com with ESMTPSA id 65sm2562285lfb.260.2020.09.21.05.36.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Sep 2020 05:36:52 -0700 (PDT) Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively To: =?UTF-8?Q?Mattias_Engdeg=c3=a5rd?= 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> <031C4910-1295-4724-8C01-BEFE84F2C25F@acm.org> From: Dmitry Gutov Message-ID: Date: Mon, 21 Sep 2020 15:36:52 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <031C4910-1295-4724-8C01-BEFE84F2C25F@acm.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 43489 Cc: Lars Ingebrigtsen , 43489@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 21.09.2020 14:21, Mattias Engdegård wrote: > Other editors have structural movement commands although they may or may not behave identically. Do they try to preserve the pairing of parentheses (or similar structures)? What do they say if the user tries to delete a closing delimiter without deleting the opening one? > However, it is a common pattern almost everywhere else that verbal messages aren't displayed unless needed to convey useful information; "We don't move point because of XXX" might be useful info, might it not? From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 21 10:44:07 2020 Received: (at 43489) by debbugs.gnu.org; 21 Sep 2020 14:44:07 +0000 Received: from localhost ([127.0.0.1]:55705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKN31-0007E6-9n for submit@debbugs.gnu.org; Mon, 21 Sep 2020 10:44:07 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49292) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKN2y-0007DS-Vr for 43489@debbugs.gnu.org; Mon, 21 Sep 2020 10:44:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=2fgZTtwZLPhjonXresRgnr5eMA81v1nNDU2/KruGOtY=; b=Vq9yLDUyZl49wMw9PR822wJv8h JgfkfeivpW5RB4wBURB1iDUX9xzoeS3arSX2Njpe4Fv5hLWfzv/9couHvyEwSlSFIdyuc2B3jdkx0 Hz0G4N0dlG7niEUrfcR/EgKDOHOgQxl8uRQpbNKpSqpoC0LaBpH7y7ZfJS7kjCotG2rg=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kKN2m-0005SN-4d; Mon, 21 Sep 2020 16:43:58 +0200 From: Lars Ingebrigtsen To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively References: <64C7CB3A-36F2-4988-9FF9-B99115C9ED13@acm.org> <87k0wri5xq.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEVbW190gpQqKivQ 0tb7+/yYmZ/////rhg9bAAAAAWJLR0QGYWa4fQAAAAd0SU1FB+QJFQ4DL6G0dXgAAAG3SURBVDjL jZNBcusgDIYFrvcmHfYyfdmnBQ7QgeyhNve/ypMMxK7TzlSZTGJ9QvqRJQAQqpkxZojdYAf5BB4H zkAJpelTdFZ4GYJzITjbgKoAUL6GSCBW0Exzqn97qu4uORF4O9bYCquSs5QSVkdVNmCQUGHjVAZd P8EPm2KQDMz1AL7br8D9BcBPqajkLA9+7OBicDISjZEnwM8AkxGlkvmoCtRlLotNT/eYCxRLlp4u qMfFNvIA85ag+hcr9xrXdy46Whus9emgiiSZSlzQ8gg2k2YI8TYDyDmeeoVL5JyIZ2Cw1J+1q8og cbs0toihq0owhqKg1eJGuA3cEqClQQo30xSadQOpRi3xDv3FvzB4+2qpxZLLTUyyVYG5umnqMesP kWUbuyYXafDAiwSitx56PCTQyzRRi+QOkNfnE4TzpIRyXvurZQATwOppFejv8EiFdePGe+aQCrAD Ht9XT+cEbBfkPrUDk9BeqaR121qUWPeN14dtaUDRV6u2JMFz3+o6U8Hka2wN7quWSKmr/rJ+W05Q g/MVuAMoOg0+hmJ5GOMO9PKex3t8MiguWB9/AKwjuGfwH7KCwskKcAy4AAAAJXRFWHRkYXRlOmNy ZWF0ZQAyMDIwLTA5LTIxVDE0OjAzOjQ3KzAwOjAwX+f67gAAACV0RVh0ZGF0ZTptb2RpZnkAMjAy MC0wOS0yMVQxNDowMzo0NyswMDowMC66QlIAAAAASUVORK5CYII= X-Now-Playing: LCD Soundsystem's _This Is Happening_: "Pow Pow" Date: Mon, 21 Sep 2020 16:43:50 +0200 In-Reply-To: (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vora=22's?= message of "Mon, 21 Sep 2020 09:49:25 +0100") Message-ID: <87k0wnmbq1.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: João Távora writes: > > Scan error: "Containing expression ends prematurely", 5010, 5010 > > > > or > > > > Scan error: "Unbalanced parentheses", 5010, 1 > > > > which is unhelpful and rather looks as if something went w [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43489 Cc: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= , 43489@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Jo=C3=A3o T=C3=A1vora writes: > > Scan error: "Containing expression ends prematurely", 5010, 5010 > > > > or > > > > Scan error: "Unbalanced parentheses", 5010, 1 > > > > which is unhelpful and rather looks as if something went wrong in the > > internal machinery. > > Yes, those error messages are confusing in interactive usage. > > I disagree strongly. Maybe the integers following them and=20 > containing character positions are confusing, but the messages=20 > themselves are fine.=20=20 Yes, those are the confusing bits. :-) "Scan error" and ", 5010, 1" sounds like something went wrong deep inside Emacs. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 21 10:48:06 2020 Received: (at 43489) by debbugs.gnu.org; 21 Sep 2020 14:48:06 +0000 Received: from localhost ([127.0.0.1]:55726 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKN6s-000127-36 for submit@debbugs.gnu.org; Mon, 21 Sep 2020 10:48:06 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKN6q-00011W-0W for 43489@debbugs.gnu.org; Mon, 21 Sep 2020 10:48:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=KnINug6y7xfisrMCC31mo6cyjLwrulcA5LoKrImUEEw=; b=Qim8xbdHnxs+JRY3xn5t1syXgq RYMVM2Swspa3x/AiwwXE49k0c6HEScb37TSqT6VTWgc1QqAhrk0GfuYc6V0/PO7eH7yifoMG9oHZ0 zBnaCTTab2XFCW4k0AeikvJxL9ROwlsuESwzfIftzWVmaiPJ6zokfVjfuksHzl5ZM6Yk=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kKN6h-0005Wc-O7; Mon, 21 Sep 2020 16:47:58 +0200 From: Lars Ingebrigtsen To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively 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> <47564F1F-5826-43B1-A9F1-1F4440AF2A6A@acm.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEVbW190gpQqKivQ 0tb7+/yYmZ/////rhg9bAAAAAWJLR0QGYWa4fQAAAAd0SU1FB+QJFQ4DL6G0dXgAAAG3SURBVDjL jZNBcusgDIYFrvcmHfYyfdmnBQ7QgeyhNve/ypMMxK7TzlSZTGJ9QvqRJQAQqpkxZojdYAf5BB4H zkAJpelTdFZ4GYJzITjbgKoAUL6GSCBW0Exzqn97qu4uORF4O9bYCquSs5QSVkdVNmCQUGHjVAZd P8EPm2KQDMz1AL7br8D9BcBPqajkLA9+7OBicDISjZEnwM8AkxGlkvmoCtRlLotNT/eYCxRLlp4u qMfFNvIA85ag+hcr9xrXdy46Whus9emgiiSZSlzQ8gg2k2YI8TYDyDmeeoVL5JyIZ2Cw1J+1q8og cbs0toihq0owhqKg1eJGuA3cEqClQQo30xSadQOpRi3xDv3FvzB4+2qpxZLLTUyyVYG5umnqMesP kWUbuyYXafDAiwSitx56PCTQyzRRi+QOkNfnE4TzpIRyXvurZQATwOppFejv8EiFdePGe+aQCrAD Ht9XT+cEbBfkPrUDk9BeqaR121qUWPeN14dtaUDRV6u2JMFz3+o6U8Hka2wN7quWSKmr/rJ+W05Q g/MVuAMoOg0+hmJ5GOMO9PKex3t8MiguWB9/AKwjuGfwH7KCwskKcAy4AAAAJXRFWHRkYXRlOmNy ZWF0ZQAyMDIwLTA5LTIxVDE0OjAzOjQ3KzAwOjAwX+f67gAAACV0RVh0ZGF0ZTptb2RpZnkAMjAy MC0wOS0yMVQxNDowMzo0NyswMDowMC66QlIAAAAASUVORK5CYII= X-Now-Playing: LCD Soundsystem's _This Is Happening_: "Pow Pow" Date: Mon, 21 Sep 2020 16:47:54 +0200 In-Reply-To: <47564F1F-5826-43B1-A9F1-1F4440AF2A6A@acm.org> ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Mon, 21 Sep 2020 12:55:19 +0200") Message-ID: <87ft7bmbj9.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Mattias Engdegård writes: > Thank you for testing the patch. (Less confusing than Emacs master, I > presume? Yes. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43489 Cc: 43489@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > Thank you for testing the patch. (Less confusing than Emacs master, I > presume? Yes. > Or if you mean compared with the no-message patch, what was confusing > about it?) Beeping at me without telling me why is confusing, I think. > 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" The current message is "Containing expression ends prematurely", which isn't... perfect... but it tells us that it tried to read an expression but failed, because it reached something that ended the expression before ... it should?=20=20 Uhm... No, I have no good suggestions, but these new messages aren't really any clearer than the old one. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 21 13:12:45 2020 Received: (at 43489) by debbugs.gnu.org; 21 Sep 2020 17:12:45 +0000 Received: from localhost ([127.0.0.1]:56031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKPMr-0002kU-09 for submit@debbugs.gnu.org; Mon, 21 Sep 2020 13:12:45 -0400 Received: from mail210c50.megamailservers.eu ([91.136.10.220]:41276 helo=mail194c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKPMo-0002kG-Cj for 43489@debbugs.gnu.org; Mon, 21 Sep 2020 13:12:43 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1600708361; bh=GkuMd7hkRawDf2JKwDOcKerhOIoG6NohLLqtfit3qV0=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=a6FXM5GeGksJq44/I1TMviYIA3PqKJRWO6wiFxrqLxHMdQEJLsSLRj4vqq/zdf5Tj ClH0SrATu6rMCuX2vNkjw2e3GP6avE6oWMiHF/KesgNFfzNlXvmkifVIZs/HPWsWhj wiTCWIvlKG5QqYmdDCr5HVB4vZc8hSXldqMp/DS0= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-304ee655.032-75-73746f71.bbcust.telenor.se [85.230.78.48]) (authenticated bits=0) by mail194c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 08LHCb9k017922; Mon, 21 Sep 2020 17:12:41 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <87ft7bmbj9.fsf@gnus.org> Date: Mon, 21 Sep 2020 19:12:40 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: 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> <47564F1F-5826-43B1-A9F1-1F4440AF2A6A@acm.org> <87ft7bmbj9.fsf@gnus.org> To: Lars Ingebrigtsen X-Mailer: Apple Mail (2.3445.104.15) X-CTCH-RefID: str=0001.0A782F1F.5F68DF09.0020, 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-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=KsozJleN c=1 sm=1 tr=0 a=63Z2wlQ1NB3xHpgKFKE71g==:117 a=63Z2wlQ1NB3xHpgKFKE71g==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=OocQHUDgAAAA:8 a=V6YVcRO7eCuUgCUM1J4A:9 a=CjuIK1q_8ugA:10 a=xUZTl98r3Qw_uB5NK3jt:22 X-Origin-Country: SE X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 43489 Cc: 43489@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 21 sep. 2020 kl. 16.47 skrev Lars Ingebrigtsen : > Beeping at me without telling me why is confusing, I think. Well, better than beeping while lying to you I'd say... > The current message is "Containing expression ends prematurely", which > isn't... perfect... but it tells us that it tried to read an > expression but failed, because it reached something that ended the > expression before ... it should? =20 Well put -- you and I, and everyone else friendly with the internal = workings, have to make the effort to stop thinking like Emacs and put = ourselves in the shoes of the User (who doesn't give two hoots for what = happens inside the machine). > Uhm... No, I have no good suggestions, but these new messages aren't > really any clearer than the old one. Here is a long shot. If we think that "End of buffer" is a good message = (I don't really) then what about "End of expression" "End of subexpressions" The standard procedure for a designer who has trouble formulating a = response to the user is to rework the operation so that the response = isn't needed, but we can't really do that. Another strategy is = considering whether a response is necessary at all. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 21 13:12:48 2020 Received: (at 43489) by debbugs.gnu.org; 21 Sep 2020 17:12:48 +0000 Received: from localhost ([127.0.0.1]:56034 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKPMu-0002kf-8Y for submit@debbugs.gnu.org; Mon, 21 Sep 2020 13:12:48 -0400 Received: from mail209c50.megamailservers.eu ([91.136.10.219]:41266 helo=mail194c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKPMn-0002kE-QX for 43489@debbugs.gnu.org; Mon, 21 Sep 2020 13:12:44 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1600708359; bh=fYi+R1qAA08akZ1Y+wIZOoDkRIXJi+i4TGaZ3itLCGc=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=mVpiXrROAjiPvmOGMBYbYxSFHubFPbkXKstyfZqwKAUzwtuu5PchtGCdlClSgCVaT INjUpY+ndmGo8UIVdY5ZTw9RTCH0oX/WdHtTCD6firju/UyQ4/BHoehzRvbbv8wVLe jshH7Ytbof2Q71/49dY0m0PMFVIgwJ5+cL4Kc/7Y= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-304ee655.032-75-73746f71.bbcust.telenor.se [85.230.78.48]) (authenticated bits=0) by mail194c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 08LHCb9j017922; Mon, 21 Sep 2020 17:12:39 +0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Mon, 21 Sep 2020 19:12:37 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <0C5EE050-CE0C-4D3C-9467-D52A0142397A@acm.org> References: <64C7CB3A-36F2-4988-9FF9-B99115C9ED13@acm.org> <87k0wri5xq.fsf@gnus.org> To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= X-Mailer: Apple Mail (2.3445.104.15) X-CTCH-RefID: str=0001.0A782F1F.5F68DF07.0079, 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-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=KsozJleN c=1 sm=1 tr=0 a=63Z2wlQ1NB3xHpgKFKE71g==:117 a=63Z2wlQ1NB3xHpgKFKE71g==:17 a=IkcTkHD0fZMA:10 a=M51BFTxLslgA:10 a=pGLkceISAAAA:8 a=HwKjb--WjXm4NGlDNOgA:9 a=QEXdDO2ut3YA:10 X-Origin-Country: SE X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 43489 Cc: Lars Ingebrigtsen , 43489@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 21 sep. 2020 kl. 10.49 skrev Jo=C3=A3o T=C3=A1vora = : > If, however,=20 > the message is "Unbalanced parenthesis", I know something's up=20 > and have to fix it. Thanks for mentioning mark-sexp; it was accidentally omitted in my = patch. I agree that this particular condition in mark-sexp merits = special treatment; the reason for not being able to extend the mark may = be far from the cursor and even off-screen. It is probably worthwhile to communicate the "unbalanced parenthesis" = case differently. For those wondering what this is about: the condition arises when = C-M-SPC is pressed with point before an unbalanced left bracket. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 21 13:12:52 2020 Received: (at 43489) by debbugs.gnu.org; 21 Sep 2020 17:12:52 +0000 Received: from localhost ([127.0.0.1]:56036 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKPMy-0002ky-I0 for submit@debbugs.gnu.org; Mon, 21 Sep 2020 13:12:52 -0400 Received: from mail209c50.megamailservers.eu ([91.136.10.219]:41314 helo=mail194c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKPMt-0002kd-SB for 43489@debbugs.gnu.org; Mon, 21 Sep 2020 13:12:48 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1600708367; bh=U4v0mxtZKtw31bTgyYK4tPRdvB0w5UNBvwFbcveIT+M=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=hM2tcj0EtK+ptBRewd7qEbMHw4Ox1eKcPFlHeeGV4X/fNzz13DUHm2/mBvYgfxOZs Wr99xJYjWbMRbE1Y2rftDmHBNzTB5wR60sLRj1UqL1/431Os516OEFeG7+1KcRLa2t cBg9yQvMvYOLxhIpEoM+psCpnaVVRW8gjruYWF1E= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-304ee655.032-75-73746f71.bbcust.telenor.se [85.230.78.48]) (authenticated bits=0) by mail194c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 08LHCb9l017922; Mon, 21 Sep 2020 17:12:46 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Mon, 21 Sep 2020 19:12:46 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: 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> <031C4910-1295-4724-8C01-BEFE84F2C25F@acm.org> To: Dmitry Gutov X-Mailer: Apple Mail (2.3445.104.15) X-CTCH-RefID: str=0001.0A782F1F.5F68DF0E.0098, 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-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=KsozJleN c=1 sm=1 tr=0 a=63Z2wlQ1NB3xHpgKFKE71g==:117 a=63Z2wlQ1NB3xHpgKFKE71g==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=vaJtXVxTAAAA:8 a=qrGLO8XVinmyW1JL4z4A:9 a=CjuIK1q_8ugA:10 X-Origin-Country: SE X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 43489 Cc: Lars Ingebrigtsen , 43489@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 21 sep. 2020 kl. 14.36 skrev Dmitry Gutov : >> Other editors have structural movement commands although they may or = may not behave identically. >=20 > Do they try to preserve the pairing of parentheses (or similar = structures)? What do they say if the user tries to delete a closing = delimiter without deleting the opening one? Structural editing has long history and there is great variety, all from = rigid syntax-enforcing editors to plain text editors with some assisting = electricity on top; it's impossible to generalise. > "We don't move point because of XXX" might be useful info, might it = not? So one might think, but there's an opportunity cost. If the user = understands what's going on (from context, behaviour etc) without a = textual message, then that message is of negative value. In other words, = the user would be better off without it. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 21 13:26:00 2020 Received: (at 43489) by debbugs.gnu.org; 21 Sep 2020 17:26:00 +0000 Received: from localhost ([127.0.0.1]:56071 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKPZf-00035K-TV for submit@debbugs.gnu.org; Mon, 21 Sep 2020 13:26:00 -0400 Received: from mail-io1-f54.google.com ([209.85.166.54]:34698) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKPZe-000356-1Q for 43489@debbugs.gnu.org; Mon, 21 Sep 2020 13:25:58 -0400 Received: by mail-io1-f54.google.com with SMTP id m17so16310143ioo.1 for <43489@debbugs.gnu.org>; Mon, 21 Sep 2020 10:25:58 -0700 (PDT) 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=j+C3yylZsEdclTt3am2YymHBx+z++qP6o/eIzcLH7kk=; b=BEaqm+0gpT3Sz9Ornz5g11KyhB5nit7te6qc9deWWgocmQ3VA9DT3x/BSB+wXQaOad GVRr+UxIroH1SI1RcUdwlZOM8fXzDdKUfIKg460RjW3Oyh6TondohCa2bB/lDzbn9Wpb Ue6v4W7leJY3TQfNNoGqCRDUm+WPxl48rzC3MzZixIjl2+SRUHI8MXdYkkLDuvoI+Ig8 tp/X2i+MO4GKQtTLKqDpqwGgrurhcy8pxFPjs2lIAn5XVo9EeX/iFw4jQfix7BPNeTiH bO0euZou5lFS0mFrAieiBIZ9LFa4SX3ghUmoZ+N4xPTpXk14pyIPrrXp4ae3q7rIjeoZ Y1wQ== 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=j+C3yylZsEdclTt3am2YymHBx+z++qP6o/eIzcLH7kk=; b=p4pqwCgfxyBT1sstP6UKWMRjKg5AgtjqLzo3hoiLw3aKWt6MDKVa+idNdBxyby7Agm lt6KQWgpk4dF2B74CV0RWtC/suejJ6ORuLEidF9aroAbhC0qOLkQg3Mam1qqchwTbUWo iE4IDFX16ODwGNZaWjmMJauZrZIEDfkEDRVeHsXys2dAkBsnWrW7yDDAsHZlNmaw3eMc bJAXRxzYxMD/lIW+ZyV5x+2STKZ75eJOnlEA5ALqI1BAJMV5z01BXd4QDK/XSu0lfdk4 cI4KaXnzG6ghSbo9P4mZBdABEsJF+5mCA6umd+23eupgnhdewgDet7sa5hVu/NM4Mtp4 kgBg== X-Gm-Message-State: AOAM533FoCR4K1fF8xp/VIw+paUP0yF58UaqE987zcJpNLHyaIpJ542u 2vtl67NP67Ew7o6DbL2HS+yenXpMLID9+UbIW6E= X-Google-Smtp-Source: ABdhPJysBU8Xpfgzhq3r2ZUmrYsXRkQcTcsCbK7RuEwDQGTqxRIyZ3v/SBVKUDI63fOaa38fVeKhJ5ZJYgNkuWCXxgE= X-Received: by 2002:a02:cbda:: with SMTP id u26mr880050jaq.71.1600709152281; Mon, 21 Sep 2020 10:25:52 -0700 (PDT) MIME-Version: 1.0 References: <64C7CB3A-36F2-4988-9FF9-B99115C9ED13@acm.org> <87k0wri5xq.fsf@gnus.org> <0C5EE050-CE0C-4D3C-9467-D52A0142397A@acm.org> In-Reply-To: <0C5EE050-CE0C-4D3C-9467-D52A0142397A@acm.org> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Mon, 21 Sep 2020 18:25:41 +0100 Message-ID: Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively To: =?UTF-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: multipart/alternative; boundary="00000000000069183805afd62461" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43489 Cc: Lars Ingebrigtsen , 43489@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000069183805afd62461 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Mattias, I haven't looked at your patch, but I hope you are taking care with the C-M- family of commands. It is not only mark-sexp that has that property that it warns about something potentially off screen. Many other C-M- commands also have that. Think M-7 C-M-k for example. I hope you understand you are touching a cornerstone of Lisp-related (actually, not only Lisp) editing here. So I think I can get used to differently worded messages, but the errors themselves are pretty useful. Jo=C3=A3o On Mon, Sep 21, 2020 at 6:12 PM Mattias Engdeg=C3=A5rd w= rote: > 21 sep. 2020 kl. 10.49 skrev Jo=C3=A3o T=C3=A1vora = : > > > If, however, > > the message is "Unbalanced parenthesis", I know something's up > > and have to fix it. > > Thanks for mentioning mark-sexp; it was accidentally omitted in my patch. > I agree that this particular condition in mark-sexp merits special > treatment; the reason for not being able to extend the mark may be far fr= om > the cursor and even off-screen. > It is probably worthwhile to communicate the "unbalanced parenthesis" cas= e > differently. > > For those wondering what this is about: the condition arises when C-M-SPC > is pressed with point before an unbalanced left bracket. > > --=20 Jo=C3=A3o T=C3=A1vora --00000000000069183805afd62461 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Mattias,

I haven't lo= oked at your patch, but I hope you are taking care with
the = C-M- family of commands.=C2=A0 It is not only mark-sexp that has
= that property that it warns about something potentially off screen.
Many other C-M- commands also have that.=C2=A0 Think=C2=A0 M-7 C-M-k for=
example.=C2=A0 I hope you understand you are touching a cornerst= one
of Lisp-related (actually, not only Lisp) editing here.
<= /div>

So I think I can get used to differently worded me= ssages, but the
errors themselves are pretty useful.

Jo=C3=A3o


On = Mon, Sep 21, 2020 at 6:12 PM Mattias Engdeg=C3=A5rd <mattiase@acm.org> wrote:
21 sep. 2020 kl. 10.49 skrev Jo=C3=A3o T= =C3=A1vora <jo= aotavora@gmail.com>:

> If, however,
> the message is "Unbalanced parenthesis", I know something= 9;s up
> and have to fix it.

Thanks for mentioning mark-sexp; it was accidentally omitted in my patch. I= agree that this particular condition in mark-sexp merits special treatment= ; the reason for not being able to extend the mark may be far from the curs= or and even off-screen.
It is probably worthwhile to communicate the "unbalanced parenthesis&q= uot; case differently.

For those wondering what this is about: the condition arises when C-M-SPC i= s pressed with point before an unbalanced left bracket.



--
Jo=C3=A3o T=C3=A1vora
--00000000000069183805afd62461-- From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 21 13:50:07 2020 Received: (at 43489) by debbugs.gnu.org; 21 Sep 2020 17:50:07 +0000 Received: from localhost ([127.0.0.1]:56118 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKPx1-0003hD-50 for submit@debbugs.gnu.org; Mon, 21 Sep 2020 13:50:07 -0400 Received: from mail-lf1-f50.google.com ([209.85.167.50]:36634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKPwy-0003ga-4C for 43489@debbugs.gnu.org; Mon, 21 Sep 2020 13:50:05 -0400 Received: by mail-lf1-f50.google.com with SMTP id x69so15009268lff.3 for <43489@debbugs.gnu.org>; Mon, 21 Sep 2020 10:50:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=TrwkT9tjBEqERHuWTrc1aLsILRkXyTC62aFkRibu8+o=; b=F+/xBetvUahC/AYNBOeJbQvK/JyJb0Q7zAaFgbqwPNXmI+fiptuAuSySKQSEDShcKa /HubOdt67P8FeS2wzBc2F0aP/WMZUO95czaOWtae8s0h37CRmkgnKUMrJDWsk2cP+wYr 5LdPu//+EFZx9AuQ4SwlMpNXOkbb5PvYvJe17TlSHn5xKwe4/MZb5yfMnGbaAbRy2/qv BWlDuJ6BSD9lFi9J1ETun3yOJ4RNvPP9rhe2RSI5VKSCWgfOOfLtNuaAFas5z3Vz7UBB hItP0VpkpqoNtU7nPuDUEhQVu3HHmD4QPCZVYwXr0idwBWfu1ryCrwNcIcG7aF9Bj/NK zX0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=TrwkT9tjBEqERHuWTrc1aLsILRkXyTC62aFkRibu8+o=; b=BKxyRzPVxpALmevYVlp84ww/9/6re22pI92IN2PuN28CdW+5OPOZsgfm9PTYuIb9M+ VJopMaU9OX5jj1keX5nsyL16WSgv08DPIzW7mjfL4OtNNPTUWHeFZ+aWqXbkSg9nff2D j8Pt7aGcvlu46zWYaByvJh192Zhglf4uMAzSVLpk0JyqBXhTG2vn91gAkcPVKp/vVBoJ O4euhNA5BkM3OmdphN8IDiO3i87GFqhImgSBBpxaozLLxkSKxlhsP6LqSgyhsWCVlMoa 5B6fAgVy6WydcypbbIi4d9oj4C8LyCiVvfogXBrNVjHrlwPsOHhHeZi+nkpORLX79Z5i /2Gg== X-Gm-Message-State: AOAM530Z+ETu5AyvTzZ4pV2+vl07ZqVNuaqtU+9TnhRg28J9OaW0MlHL Pxdqg1Z6/BS+cXQzrcdGMSU2WgkqxkWPpw== X-Google-Smtp-Source: ABdhPJxmOl+8SYxQQ/N/V1s90WO2i6qkvPL6vmHpjPsrmGw5gDt7EoifSxxb8Uoddj6kBYUWI1yyWQ== X-Received: by 2002:a19:703:: with SMTP id 3mr345694lfh.365.1600710597710; Mon, 21 Sep 2020 10:49:57 -0700 (PDT) Received: from [192.168.0.104] ([94.229.108.16]) by smtp.googlemail.com with ESMTPSA id l9sm2922800ljc.37.2020.09.21.10.49.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Sep 2020 10:49:56 -0700 (PDT) Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively To: =?UTF-8?Q?Mattias_Engdeg=c3=a5rd?= 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> <031C4910-1295-4724-8C01-BEFE84F2C25F@acm.org> From: Dmitry Gutov Message-ID: <2a95179c-32b5-a65e-7f30-ac8cc4871aef@yandex.ru> Date: Mon, 21 Sep 2020 20:49:56 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 43489 Cc: Lars Ingebrigtsen , 43489@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 21.09.2020 20:12, Mattias Engdegård wrote: >> "We don't move point because of XXX" might be useful info, might it not? > So one might think, but there's an opportunity cost. If the user understands what's going on (from context, behaviour etc) without a textual message, then that message is of negative value. In other words, the user would be better off without it. Could be. Although if we managed to come up with more reasonable messages, and keep the buffer position numbers in them, the result might be both friendlier and more helpful. Though admittedly most of the benefit will come in, again, debugging situations. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 22 10:32:23 2020 Received: (at 43489) by debbugs.gnu.org; 22 Sep 2020 14:32:23 +0000 Received: from localhost ([127.0.0.1]:32791 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKjLD-0008R7-0h for submit@debbugs.gnu.org; Tue, 22 Sep 2020 10:32:23 -0400 Received: from quimby.gnus.org ([95.216.78.240]:60614) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKjLA-0008Qt-L5 for 43489@debbugs.gnu.org; Tue, 22 Sep 2020 10:32:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=teSYUC55uPNnd4nd7QHl/547vBd66q4F183L2VJEbOk=; b=fy9cAe50ihXkdcE9xlyPeZnOpo fRAtZ0tFpnG7H8WSLF5XPNV/6uZ1+2NlTajaSe/sVuaz87o4TkI4/n/Ab/oSWCIuY2rTS7+ynknk+ VazVOEUYx8MndaD/2vPthXbpphKj3tDnKV+uAGmkUmtN0acN8xXWbfaUAuqWB8+dWqTM=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kKjL1-0003ZA-0s; Tue, 22 Sep 2020 16:32:14 +0200 From: Lars Ingebrigtsen To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively 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> <47564F1F-5826-43B1-A9F1-1F4440AF2A6A@acm.org> <87ft7bmbj9.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEX409L89/fiucr2 z4lVr/H///9iL0ZOAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+QJFg4fHOqm5t0AAAG2SURBVDjLbZKL teMgDEQlpQHEugDQcQHOYxtwDv3XtCOBHZK3+BPgRiNpMFFiItyaSFnfg0oqZmTGgreKsJZYOhAi PAUvJQDCkgbQVNKYFAdYDqlfQP3tCuRyxdclu1QAs+JpLQAFEE7fEVQjgpHkI0cewLv4BOkGEuV6 4RNwDhd49OGZUxWrCf1LISFznMi9Srg47jGYRCt+MirCnDP+STlsNYYxNWstEEZSTCVAGSBV1FCV vHcaB+GCE8BskrAWQYZaa0hFRMEUgNm9N6sZO+4KaoXF5ADXT68JwYKsLLspB9DU/vZ+nXTuLyvj zOnPoR3jhd1atzMZBjt4PDWIw30/NVsMOo4LvPbeATT2CzW6I3awU0PL5BP0Gxg9Ro79lgIQlzra MSNsB7mSEzWAbYL+fxDjAqiqtRV0lSjKVhCpRoSMiDz293BmSHGAYdaI04yvxs+hPQB87+zTSw+o 8MojXGRbQMlG6QJ9wGniBLOsc7ukvoCuQN2r7eq6n29wHG+pFTzb8wa9OpABmoPr0F3usrc11sVF XcBzBXUBkTyvUjIAtLZ+p3HgQQ5agOkLmsE3muwfrVOIdBoFJq8AAAAldEVYdGRhdGU6Y3JlYXRl ADIwMjAtMDktMjJUMTQ6MzE6MjgrMDA6MDDbH4FOAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTA5 LTIyVDE0OjMxOjI4KzAwOjAwqkI58gAAAABJRU5ErkJggg== X-Now-Playing: Hercules & Love Affair's _Hercules & Love Affair_: "Hercules Theme" Date: Tue, 22 Sep 2020 16:32:09 +0200 In-Reply-To: ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Mon, 21 Sep 2020 19:12:40 +0200") Message-ID: <87d02dj312.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Mattias Engdegård writes: > Here is a long shot. If we think that "End of buffer" is a good > message (I don't really) then what about > > "End of expression" > "End of subexpressions" Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43489 Cc: 43489@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > Here is a long shot. If we think that "End of buffer" is a good > message (I don't really) then what about > > "End of expression" > "End of subexpressions" Yeah, that makes sense to me. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 23 05:17:50 2020 Received: (at 43489) by debbugs.gnu.org; 23 Sep 2020 09:17:50 +0000 Received: from localhost ([127.0.0.1]:34536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL0uF-0000gl-DD for submit@debbugs.gnu.org; Wed, 23 Sep 2020 05:17:50 -0400 Received: from mail153c50.megamailservers.eu ([91.136.10.163]:41238 helo=mail50c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL0uC-0000gT-7i for 43489@debbugs.gnu.org; Wed, 23 Sep 2020 05:17:41 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1600852658; bh=YiFO0dVARZPPz02fju1+c+utr6tF7L9kqCJB0R4LjH4=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=HqhJPu8GVktYghFyGXxOqIfgSwNnYIuTX1qBtSQVEBWOHNTsScy6KGEoASs8TIHXQ CspfcBaRzITMxfeqn74dmS6kPjYP9Xwhy9yeKAr04mJ+o4xcRgsFmYiizYUBFd4Iau y7SOhi206yzLGHCA9d43NDxKBrNXi89NK08QY9k0= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-304ee655.032-75-73746f71.bbcust.telenor.se [85.230.78.48]) (authenticated bits=0) by mail50c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 08N9Hang021218; Wed, 23 Sep 2020 09:17:37 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Message-Id: Content-Type: multipart/mixed; boundary="Apple-Mail=_68A06E81-AFB5-4BF3-B361-CCF2CA1159A4" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively Date: Wed, 23 Sep 2020 11:17:35 +0200 In-Reply-To: <87d02dj312.fsf@gnus.org> To: Lars Ingebrigtsen 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> <47564F1F-5826-43B1-A9F1-1F4440AF2A6A@acm.org> <87ft7bmbj9.fsf@gnus.org> <87d02dj312.fsf@gnus.org> X-Mailer: Apple Mail (2.3445.104.15) X-CTCH-RefID: str=0001.0A782F1C.5F6B12B2.003E, 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-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=NoevjPVJ c=1 sm=1 tr=0 a=63Z2wlQ1NB3xHpgKFKE71g==:117 a=63Z2wlQ1NB3xHpgKFKE71g==:17 a=M51BFTxLslgA:10 a=OocQHUDgAAAA:8 a=JRwuhjd_G1tPwf8hF14A:9 a=CjuIK1q_8ugA:10 a=UhrNgycqYWA2tRdLRY8A:9 a=B2y7HmGcmWMA:10 a=xUZTl98r3Qw_uB5NK3jt:22 X-Origin-Country: SE X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 22 sep. 2020 kl. 16.32 skrev Lars Ingebrigtsen : > Yeah, that makes sense to me. Apologies for my indecision, but I'm not sure if they make sense to me. Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 43489 Cc: 43489@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --Apple-Mail=_68A06E81-AFB5-4BF3-B361-CCF2CA1159A4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 22 sep. 2020 kl. 16.32 skrev Lars Ingebrigtsen : > Yeah, that makes sense to me. Apologies for my indecision, but I'm not sure if they make sense to me. But my personal flaws should not impede progress. How about I push what = I've got (latest patch attached for reference) since we seem to agree = that it's an improvement over what's in master, and if then you or = anyone else want to further adjust the messages then I have no = objections. --Apple-Mail=_68A06E81-AFB5-4BF3-B361-CCF2CA1159A4 Content-Disposition: attachment; filename=0001-Don-t-signal-scan-error-when-moving-by-sexp-interact.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Don-t-signal-scan-error-when-moving-by-sexp-interact.patch" Content-Transfer-Encoding: quoted-printable =46rom=203249aeba659d636d6344a7ab0e3b1ecbb83da160=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Fri,=2018=20Sep=202020=2012:49:33=20+0200=0A= Subject:=20[PATCH]=20Don't=20signal=20scan-error=20when=20moving=20by=20= sexp=20interactively=0A=0A*=20lisp/emacs-lisp/lisp.el=20(forward-sexp,=20= backward-sexp,=20forward-list)=0A(backward-list,=20down-list,=20up-list,=20= mark-sexp,=20kill-sexp)=0A(backward-kill-sexp):=20Remove=20unsightly=20= scan-error=20when=20running=0Ainteractively=20and=20no=20further=20= movement=20by=20sexp=20can=20be=20made.=0A---=0A=20= lisp/emacs-lisp/lisp.el=20|=20134=20= ++++++++++++++++++++++++++--------------=0A=201=20file=20changed,=2089=20= insertions(+),=2045=20deletions(-)=0A=0Adiff=20--git=20= a/lisp/emacs-lisp/lisp.el=20b/lisp/emacs-lisp/lisp.el=0Aindex=20= ac4ba78897..f74243c890=20100644=0A---=20a/lisp/emacs-lisp/lisp.el=0A+++=20= b/lisp/emacs-lisp/lisp.el=0A@@=20-55,7=20+55,7=20@@=20= forward-sexp-function=0A=20=20=20"If=20non-nil,=20`forward-sexp'=20= delegates=20to=20this=20function.=0A=20Should=20take=20the=20same=20= arguments=20and=20behave=20similarly=20to=20`forward-sexp'.")=0A=20=0A= -(defun=20forward-sexp=20(&optional=20arg)=0A+(defun=20forward-sexp=20= (&optional=20arg=20noerror)=0A=20=20=20"Move=20forward=20across=20one=20= balanced=20expression=20(sexp).=0A=20With=20ARG,=20do=20it=20that=20many=20= times.=20=20Negative=20arg=20-N=20means=20move=0A=20backward=20across=20= N=20balanced=20expressions.=20=20This=20command=20assumes=0A@@=20-64,23=20= +64,31=20@@=20forward-sexp=0A=20If=20unable=20to=20move=20over=20a=20= sexp,=20signal=20`scan-error'=20with=20three=0A=20arguments:=20a=20= message,=20the=20start=20of=20the=20obstacle=20(usually=20a=0A=20= parenthesis=20or=20list=20marker=20of=20some=20kind),=20and=20end=20of=20= the=0A-obstacle."=0A-=20=20(interactive=20"^p")=0A-=20=20(or=20arg=20= (setq=20arg=201))=0A-=20=20(if=20forward-sexp-function=0A-=20=20=20=20=20= =20(funcall=20forward-sexp-function=20arg)=0A-=20=20=20=20(goto-char=20= (or=20(scan-sexps=20(point)=20arg)=20(buffer-end=20arg)))=0A-=20=20=20=20= (if=20(<=20arg=200)=20(backward-prefix-chars))))=0A-=0A-(defun=20= backward-sexp=20(&optional=20arg)=0A+obstacle.=20=20If=20NOERROR=20is=20= non-nil,=20as=20it=20is=20interactively,=0A+do=20not=20signal=20an=20= error."=0A+=20=20(interactive=20"^p\nd")=0A+=20=20(if=20noerror=0A+=20=20= =20=20=20=20(condition-case=20_=0A+=20=20=20=20=20=20=20=20=20=20= (forward-sexp=20arg=20nil)=0A+=20=20=20=20=20=20=20=20(scan-error=20= (user-error=20(if=20(>=20arg=200)=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= "No=20next=20sexp"=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20"No=20previous=20= sexp"))))=0A+=20=20=20=20(or=20arg=20(setq=20arg=201))=0A+=20=20=20=20= (if=20forward-sexp-function=0A+=20=20=20=20=20=20=20=20(funcall=20= forward-sexp-function=20arg)=0A+=20=20=20=20=20=20(goto-char=20(or=20= (scan-sexps=20(point)=20arg)=20(buffer-end=20arg)))=0A+=20=20=20=20=20=20= (if=20(<=20arg=200)=20(backward-prefix-chars)))))=0A+=0A+(defun=20= backward-sexp=20(&optional=20arg=20noerror)=0A=20=20=20"Move=20backward=20= across=20one=20balanced=20expression=20(sexp).=0A=20With=20ARG,=20do=20= it=20that=20many=20times.=20=20Negative=20arg=20-N=20means=0A=20move=20= forward=20across=20N=20balanced=20expressions.=0A=20This=20command=20= assumes=20point=20is=20not=20in=20a=20string=20or=20comment.=0A-Uses=20= `forward-sexp'=20to=20do=20the=20work."=0A-=20=20(interactive=20"^p")=0A= +Uses=20`forward-sexp'=20to=20do=20the=20work.=0A+If=20NOERROR=20is=20= non-nil,=20as=20it=20is=20interactively,=20do=20not=20signal=20an=20= error."=0A+=20=20(interactive=20"^p\nd")=0A=20=20=20(or=20arg=20(setq=20= arg=201))=0A-=20=20(forward-sexp=20(-=20arg)))=0A+=20=20(forward-sexp=20= (-=20arg)=20noerror))=0A=20=0A=20(defun=20mark-sexp=20(&optional=20arg=20= allow-extend)=0A=20=20=20"Set=20mark=20ARG=20sexps=20from=20point.=0A@@=20= -99,50=20+107,75=20@@=20mark-sexp=0A=20=09=20(set-mark=0A=20=09=20=20= (save-excursion=0A=20=09=20=20=20=20(goto-char=20(mark))=0A-=09=20=20=20=20= (forward-sexp=20arg)=0A+=20=20=20=20=20=20=20=20=20=20=20=20= (condition-case=20error=0A+=09=20=20=20=20=20=20=20=20(forward-sexp=20= arg)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20(scan-error=0A+=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20(user-error=20(if=20(equal=20(cadr=20= error)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20"Containing=20= expression=20ends=20prematurely")=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20"No=20more=20= sexp=20to=20select"=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20(cadr=20error)))))=0A=20=09=20=20=20=20= (point))))=0A=20=09(t=0A=20=09=20(push-mark=0A=20=09=20=20= (save-excursion=0A-=09=20=20=20=20(forward-sexp=20(prefix-numeric-value=20= arg))=0A+=20=20=20=20=20=20=20=20=20=20=20=20(condition-case=20error=0A+=09= =20=20=20=20=20=20=20=20(forward-sexp=20(prefix-numeric-value=20arg))=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20(scan-error=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(user-error=20(if=20(equal=20(cadr=20= error)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20"Containing=20= expression=20ends=20prematurely")=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20"No=20sexp=20to=20= select"=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(cadr=20error)))))=0A=20=09=20=20=20=20(point))=0A= =20=09=20=20nil=20t))))=0A=20=0A-(defun=20forward-list=20(&optional=20= arg)=0A+(defun=20forward-list=20(&optional=20arg=20noerror)=0A=20=20=20= "Move=20forward=20across=20one=20balanced=20group=20of=20parentheses.=0A=20= This=20command=20will=20also=20work=20on=20other=20parentheses-like=20= expressions=0A=20defined=20by=20the=20current=20language=20mode.=0A=20= With=20ARG,=20do=20it=20that=20many=20times.=0A=20Negative=20arg=20-N=20= means=20move=20backward=20across=20N=20groups=20of=20parentheses.=0A= -This=20command=20assumes=20point=20is=20not=20in=20a=20string=20or=20= comment."=0A-=20=20(interactive=20"^p")=0A-=20=20(or=20arg=20(setq=20arg=20= 1))=0A-=20=20(goto-char=20(or=20(scan-lists=20(point)=20arg=200)=20= (buffer-end=20arg))))=0A-=0A-(defun=20backward-list=20(&optional=20arg)=0A= +This=20command=20assumes=20point=20is=20not=20in=20a=20string=20or=20= comment.=0A+If=20NOERROR=20is=20non-nil,=20as=20it=20is=20interactively,=20= do=20not=20signal=20an=20error."=0A+=20=20(interactive=20"^p\nd")=0A+=20=20= (if=20noerror=0A+=20=20=20=20=20=20(condition-case=20_=0A+=20=20=20=20=20= =20=20=20=20=20(forward-list=20arg=20nil)=0A+=20=20=20=20=20=20=20=20= (scan-error=20(user-error=20(if=20(>=20arg=200)=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20"No=20next=20group"=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20"No=20= previous=20group"))))=0A+=20=20=20=20(or=20arg=20(setq=20arg=201))=0A+=20= =20=20=20(goto-char=20(or=20(scan-lists=20(point)=20arg=200)=20= (buffer-end=20arg)))))=0A+=0A+(defun=20backward-list=20(&optional=20arg=20= noerror)=0A=20=20=20"Move=20backward=20across=20one=20balanced=20group=20= of=20parentheses.=0A=20This=20command=20will=20also=20work=20on=20other=20= parentheses-like=20expressions=0A=20defined=20by=20the=20current=20= language=20mode.=0A=20With=20ARG,=20do=20it=20that=20many=20times.=0A=20= Negative=20arg=20-N=20means=20move=20forward=20across=20N=20groups=20of=20= parentheses.=0A-This=20command=20assumes=20point=20is=20not=20in=20a=20= string=20or=20comment."=0A-=20=20(interactive=20"^p")=0A+This=20command=20= assumes=20point=20is=20not=20in=20a=20string=20or=20comment.=0A+If=20= NOERROR=20is=20non-nil,=20as=20it=20is=20interactively,=20do=20not=20= signal=20an=20error."=0A+=20=20(interactive=20"^p\nd")=0A=20=20=20(or=20= arg=20(setq=20arg=201))=0A-=20=20(forward-list=20(-=20arg)))=0A+=20=20= (forward-list=20(-=20arg)=20noerror))=0A=20=0A-(defun=20down-list=20= (&optional=20arg)=0A+(defun=20down-list=20(&optional=20arg=20noerror)=0A=20= =20=20"Move=20forward=20down=20one=20level=20of=20parentheses.=0A=20This=20= command=20will=20also=20work=20on=20other=20parentheses-like=20= expressions=0A=20defined=20by=20the=20current=20language=20mode.=0A=20= With=20ARG,=20do=20this=20that=20many=20times.=0A=20A=20negative=20= argument=20means=20move=20backward=20but=20still=20go=20down=20a=20= level.=0A-This=20command=20assumes=20point=20is=20not=20in=20a=20string=20= or=20comment."=0A-=20=20(interactive=20"^p")=0A-=20=20(or=20arg=20(setq=20= arg=201))=0A-=20=20(let=20((inc=20(if=20(>=20arg=200)=201=20-1)))=0A-=20=20= =20=20(while=20(/=3D=20arg=200)=0A-=20=20=20=20=20=20(goto-char=20(or=20= (scan-lists=20(point)=20inc=20-1)=20(buffer-end=20arg)))=0A-=20=20=20=20=20= =20(setq=20arg=20(-=20arg=20inc)))))=0A+This=20command=20assumes=20point=20= is=20not=20in=20a=20string=20or=20comment.=0A+If=20NOERROR=20is=20= non-nil,=20as=20it=20is=20interactively,=20do=20not=20signal=20an=20= error."=0A+=20=20(interactive=20"^p\nd")=0A+=20=20(if=20noerror=0A+=20=20= =20=20=20=20(condition-case=20_=0A+=20=20=20=20=20=20=20=20=20=20= (down-list=20arg=20nil)=0A+=20=20=20=20=20=20=20=20(scan-error=20= (user-error=20"At=20bottom=20level")))=0A+=20=20=20=20(or=20arg=20(setq=20= arg=201))=0A+=20=20=20=20(let=20((inc=20(if=20(>=20arg=200)=201=20-1)))=0A= +=20=20=20=20=20=20(while=20(/=3D=20arg=200)=0A+=20=20=20=20=20=20=20=20= (goto-char=20(or=20(scan-lists=20(point)=20inc=20-1)=20(buffer-end=20= arg)))=0A+=20=20=20=20=20=20=20=20(setq=20arg=20(-=20arg=20inc))))))=0A=20= =0A=20(defun=20backward-up-list=20(&optional=20arg=20escape-strings=20= no-syntax-crossing)=0A=20=20=20"Move=20backward=20out=20of=20one=20level=20= of=20parentheses.=0A@@=20-229,26=20+262,37=20@@=20up-list=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(or=20(<=20inc=200)=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(forward-comment=20= 1))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(setf=20arg=20= (+=20arg=20inc)))=0A-=20=20=20=20=20=20=20=20=20=20=20=20(signal=20(car=20= err)=20(cdr=20err))))))=0A+=20=20=20=20=20=20=20=20=20=20=20=20(if=20= no-syntax-crossing=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20= Assume=20called=20interactively;=20don't=20signal=20an=20error.=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(user-error=20"At=20top=20= level")=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20(signal=20(car=20= err)=20(cdr=20err)))))))=0A=20=20=20=20=20=20=20(setq=20arg=20(-=20arg=20= inc)))))=0A=20=0A-(defun=20kill-sexp=20(&optional=20arg)=0A+(defun=20= kill-sexp=20(&optional=20arg=20noerror)=0A=20=20=20"Kill=20the=20sexp=20= (balanced=20expression)=20following=20point.=0A=20With=20ARG,=20kill=20= that=20many=20sexps=20after=20point.=0A=20Negative=20arg=20-N=20means=20= kill=20N=20sexps=20before=20point.=0A-This=20command=20assumes=20point=20= is=20not=20in=20a=20string=20or=20comment."=0A-=20=20(interactive=20"p")=0A= -=20=20(let=20((opoint=20(point)))=0A-=20=20=20=20(forward-sexp=20(or=20= arg=201))=0A-=20=20=20=20(kill-region=20opoint=20(point))))=0A-=0A= -(defun=20backward-kill-sexp=20(&optional=20arg)=0A+This=20command=20= assumes=20point=20is=20not=20in=20a=20string=20or=20comment.=0A+If=20= NOERROR=20is=20non-nil,=20as=20it=20is=20interactively,=20do=20not=20= signal=20an=20error."=0A+=20=20(interactive=20"p\nd")=0A+=20=20(if=20= noerror=0A+=20=20=20=20=20=20(condition-case=20_=0A+=20=20=20=20=20=20=20= =20=20=20(kill-sexp=20arg=20nil)=0A+=20=20=20=20=20=20=20=20(scan-error=20= (user-error=20(if=20(>=20arg=200)=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= "No=20next=20sexp"=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20"No=20previous=20= sexp"))))=0A+=20=20=20=20(let=20((opoint=20(point)))=0A+=20=20=20=20=20=20= (forward-sexp=20(or=20arg=201))=0A+=20=20=20=20=20=20(kill-region=20= opoint=20(point)))))=0A+=0A+(defun=20backward-kill-sexp=20(&optional=20= arg=20noerror)=0A=20=20=20"Kill=20the=20sexp=20(balanced=20expression)=20= preceding=20point.=0A=20With=20ARG,=20kill=20that=20many=20sexps=20= before=20point.=0A=20Negative=20arg=20-N=20means=20kill=20N=20sexps=20= after=20point.=0A-This=20command=20assumes=20point=20is=20not=20in=20a=20= string=20or=20comment."=0A-=20=20(interactive=20"p")=0A-=20=20(kill-sexp=20= (-=20(or=20arg=201))))=0A+This=20command=20assumes=20point=20is=20not=20= in=20a=20string=20or=20comment.=0A+If=20NOERROR=20is=20non-nil,=20as=20= it=20is=20interactively,=20do=20not=20signal=20an=20error."=0A+=20=20= (interactive=20"p\nd")=0A+=20=20(kill-sexp=20(-=20(or=20arg=201))=20= noerror))=0A=20=0A=20;;=20After=20Zmacs:=0A=20(defun=20= kill-backward-up-list=20(&optional=20arg)=0A--=20=0A2.21.1=20(Apple=20= Git-122.3)=0A=0A= --Apple-Mail=_68A06E81-AFB5-4BF3-B361-CCF2CA1159A4-- From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 23 09:40:16 2020 Received: (at 43489) by debbugs.gnu.org; 23 Sep 2020 13:40:16 +0000 Received: from localhost ([127.0.0.1]:34876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL50K-0003bC-H3 for submit@debbugs.gnu.org; Wed, 23 Sep 2020 09:40:16 -0400 Received: from quimby.gnus.org ([95.216.78.240]:44482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL50I-0003at-KP for 43489@debbugs.gnu.org; Wed, 23 Sep 2020 09:40:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=PeYhtR/q2lk3UCHpeKUeiNoNlEEoEyP3eYDl/KgUOF0=; b=rEBNbJccPeu5gxDR//f5zK5nUq aiAzkdoFkgtmzqstDlIj7KNC/FnZMD+J48azFzFcdDLj/YNREYzxMLbKiWldovZLlQbvyIK5ZXfVk RlFnzQ031zLAROHOJ1r9IAfeGsGMbv7NuFzJkMDe8NHsxpp//SRdcukGjaQ7WhPQJTlI=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kL506-0007zf-Jj; Wed, 23 Sep 2020 15:40:08 +0200 From: Lars Ingebrigtsen To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively 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> <47564F1F-5826-43B1-A9F1-1F4440AF2A6A@acm.org> <87ft7bmbj9.fsf@gnus.org> <87d02dj312.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAGFBMVEUpKCYfHRxIRjxR UEhAPjpqaWKEgnn///8ghV9sAAAAAWJLR0QHFmGI6wAAAAd0SU1FB+QJFwwgNtL7tjwAAAGISURB VDjLnZO/csMgDMaFCZlxfN4pNDuHTpm7dM+Z4wl66fs/QiXiJPhPlmoAW79In/hwAJpQvQT0FsDC BthVsgan9wFYxWkFe2Qv3TkAHZdEBsEUe4dfIbYNOgCTUrT8C90WUClXE1JaC9jJewaIa9UhJR8N pQraViYFboXbCgY4GY/oYOmS8azxzcuHvEUI2jbgiBhU1MjgKWNugThFSV5cO0Apctwhir/s/lNG 0VWex+vGvlJTl5dLh/vkNEkryv5h6UN78ucSeV0fkKdNIRf2Ki3yKjDw4YdBWMgr9D5MHQrIrSGQ vKeb0WkD+Dbo93zikpBfNw1wqhU0YGD3WzByRXA4iFRpO41c4RWNxPsCGAGAI66AOnoBWVotwUWA yiOtgSQ+gYZd4MBY2akF5Q4gr0G+gyg7tpbkOpW+duxytM1NVeAAxUzXHlBOLCUgaxu6FD40P3QM VM9/XWUfUphnoDQZIsL5JlWvJ9lZIhByPj4/JEUzmFs1Flc1eBPdO3CAf0bV/gPFW0REvhNm3gAA ACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMC0wOS0yM1QxMjozMjo1NCswMDowMPPAF2wAAAAldEVYdGRh dGU6bW9kaWZ5ADIwMjAtMDktMjNUMTI6MzI6NTQrMDA6MDCCna/QAAAAAElFTkSuQmCC X-Now-Playing: Herbert's _Bodily Functions_: "It's Only A Reprise" Date: Wed, 23 Sep 2020 15:40:01 +0200 In-Reply-To: ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Wed, 23 Sep 2020 11:17:35 +0200") Message-ID: <87eemsd32m.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Mattias Engdegård writes: > But my personal flaws should not impede progress. How about I push > what I've got (latest patch attached for reference) since we seem to > agree that it's an improvement over what's in master, and [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43489 Cc: 43489@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > But my personal flaws should not impede progress. How about I push > what I've got (latest patch attached for reference) since we seem to > agree that it's an improvement over what's in master, and if then you > or anyone else want to further adjust the messages then I have no > objections. Sure. The only thing is this: > -(defun backward-sexp (&optional arg) > +obstacle. If NOERROR is non-nil, as it is interactively, > +do not signal an error." > + (interactive "^p\nd") > + (if noerror > + (condition-case _ > + (forward-sexp arg nil) > + (scan-error (user-error (if (> arg 0) > + "No next sexp" > + "No previous sexp")))) The parameter is NOERROR, but now it does signal an error. :-) So perhaps the parameter should be USER-ERROR/TERSE-ERROR or something and the doc strings adjusted? --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 23 10:33:13 2020 Received: (at 43489) by debbugs.gnu.org; 23 Sep 2020 14:33:13 +0000 Received: from localhost ([127.0.0.1]:37421 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL5pZ-00069H-Ev for submit@debbugs.gnu.org; Wed, 23 Sep 2020 10:33:13 -0400 Received: from mail1447c50.megamailservers.eu ([91.136.14.47]:35950 helo=mail265c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL5pX-000693-QY for 43489@debbugs.gnu.org; Wed, 23 Sep 2020 10:33:12 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1600871585; bh=glsFGbW02HR6089GBbs3Fu8xS71JKDPjlmwf3n+NCaY=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=WIRWBp0N/6ta3kwCermNG2k8K5tK9c9dMeL9nVa10uzWfG4W8FKUS1qHVlXWfJjw1 CGlwF/WtD5P9USySnOoFGbOSNgC9hhLv3WVnlRcMmsAap+GcV0HmXn14sNOJ/JlUBS KTxcFl7nK94oD8YRTbUSFb0tzyj7pfsya0wDITlI= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-304ee655.032-75-73746f71.bbcust.telenor.se [85.230.78.48]) (authenticated bits=0) by mail265c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 08NEX3Wk003906; Wed, 23 Sep 2020 14:33:04 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <87eemsd32m.fsf@gnus.org> Date: Wed, 23 Sep 2020 16:33:02 +0200 Content-Transfer-Encoding: 7bit Message-Id: 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> <47564F1F-5826-43B1-A9F1-1F4440AF2A6A@acm.org> <87ft7bmbj9.fsf@gnus.org> <87d02dj312.fsf@gnus.org> <87eemsd32m.fsf@gnus.org> To: Lars Ingebrigtsen X-Mailer: Apple Mail (2.3445.104.15) X-CTCH-RefID: str=0001.0A782F21.5F6B5CA0.0095, 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-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=D5w51cZj c=1 sm=1 tr=0 a=63Z2wlQ1NB3xHpgKFKE71g==:117 a=63Z2wlQ1NB3xHpgKFKE71g==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=OocQHUDgAAAA:8 a=gEb9Sdy-AFMNCv8fHskA:9 a=CjuIK1q_8ugA:10 a=3fbLLLLNgwQA:10 a=xUZTl98r3Qw_uB5NK3jt:22 X-Origin-Country: SE X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 23 sep. 2020 kl. 15.40 skrev Lars Ingebrigtsen : > The parameter is NOERROR, but now it does signal an error. :-) > > So perhaps the parameter should be USER-ERROR/TERSE-ERROR or something > and the doc strings adjusted? Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 43489 Cc: 43489@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 23 sep. 2020 kl. 15.40 skrev Lars Ingebrigtsen : > The parameter is NOERROR, but now it does signal an error. :-) > > So perhaps the parameter should be USER-ERROR/TERSE-ERROR or something > and the doc strings adjusted? Good catch, thank you! The pushed change uses USER-ERROR. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 23 10:46:03 2020 Received: (at 43489) by debbugs.gnu.org; 23 Sep 2020 14:46:03 +0000 Received: from localhost ([127.0.0.1]:37437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL61z-0006Zm-FX for submit@debbugs.gnu.org; Wed, 23 Sep 2020 10:46:03 -0400 Received: from mail-il1-f175.google.com ([209.85.166.175]:39662) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL61v-0006Yy-5f for 43489@debbugs.gnu.org; Wed, 23 Sep 2020 10:46:02 -0400 Received: by mail-il1-f175.google.com with SMTP id s88so21080776ilb.6 for <43489@debbugs.gnu.org>; Wed, 23 Sep 2020 07:45:59 -0700 (PDT) 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=NoNVxwHTGVvDCtbFAHOAqny2W7kTnXqWNCfNQE3A3bI=; b=UEjfNAovNBSOx2Y6Rk6Ywt7cqV33x/ta4rzL7CmTCjPc2prf5JzqjhGt7yG4v7i15B GFC52W5vojLJwyClrbGZtBWPCJQgxqev4BLU7pp9Nq6EW9Ta3rEFXgyvARUVttnNmdw8 FDxznxGfzaFh10Wsh2xX6XXfTofnXXA6hFC3s3FNOo0P6k9IuQMCp8m5y4b0uEMWNocE DxTRlkJnrGVGBD7scE/3HpoZ5A7YZ4DG/mn+S01MnQ0r4cvNk4S/F+4ckfhLVrpeFwcd jkbU0+KhaPce3ELtRUUEHMmNydFX/3BzMOV/qweu52qrP+sMpWvjUWH4TAXawLcagWbU jb+Q== 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=NoNVxwHTGVvDCtbFAHOAqny2W7kTnXqWNCfNQE3A3bI=; b=R33an2ypUIoxe9Bqod8y17sPVSHIfPzhr1/asa/LIJpATs4ByUwd8QTpXuPfIu3ALW eiPLf+yBCTLjWP9vsQfZ17nmt3JNhEibLWRY4/aPU8zW0lsmEsfvYjtM3CN4REfsARHY LGMSmP4aVYZwxnjRh20A82rIsc7zUt9VhSIuONM1o7PXSFIcC7pKnpTh60MEi1TpXyrs 2ESt5jCshXzOPc+fIIHIIialQdfR8Nxw8VPPfr51RAOYiROyMeQIDpDxRHyluxrU6XcT LKGO7BV8c/kr1myB/zUnK4rSgOsoWxD8vdQKwevGyXqLoe5tgfTisS+1ie/nRhZhNAFt uCfw== X-Gm-Message-State: AOAM533LgbyuJ/eT01Jf72KotoftQcC6M/oJDMEHQb/yfJgGlIDj6KXI LG6o2uzbyopwT3cxXNtNdrykk8hDP1XXeCJpF7Q= X-Google-Smtp-Source: ABdhPJxTyMtLNWjT+7u6rUYv/A5g/+wYe0lisFq7oFBjYrrHgDwJwulp3voaIh9VKVY2Aij4Py5UrbztLWZ2gVaYji0= X-Received: by 2002:a92:bb0c:: with SMTP id w12mr71049ili.199.1600872353443; Wed, 23 Sep 2020 07:45:53 -0700 (PDT) MIME-Version: 1.0 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> <47564F1F-5826-43B1-A9F1-1F4440AF2A6A@acm.org> <87ft7bmbj9.fsf@gnus.org> <87d02dj312.fsf@gnus.org> <87eemsd32m.fsf@gnus.org> In-Reply-To: From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Wed, 23 Sep 2020 15:45:41 +0100 Message-ID: Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively To: =?UTF-8?Q?Mattias_Engdeg=C3=A5rd?= , Stefan Monnier Content-Type: multipart/alternative; boundary="000000000000f533b905affc230a" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43489 Cc: Lars Ingebrigtsen , 43489@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000f533b905affc230a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I must say that while this makes some sense at the UI level to me, resignalling errors is a bad practice all around. Not only does it convolute the code, but errors should have, in all situations, I guess even in interactive ones, as much stack as they can. I think the correct fix here is to change the way that the error is *printed*. In the end that was the original motivation behind the bug report! In CL this is easy enough to do with the PRINT-OBJECTgeneric function. That print function would print the alternate message in this particular interactive context. I think Emacs has recently gained the means to do something similar to PRINT-OBJECT, has it not? I seem to remember Stefan Monnier telling me so. If it has not, and we do decide to go this route, I'd just nitpick that the parameter name should be INTERACTIVE or RESIGNAL-ERROR. So that unsuspecting programs calles won't expect the error to have the properties of the scan-error object if they pass non-nil in the parameter. Jo=C3=A3o On Wed, Sep 23, 2020 at 3:34 PM Mattias Engdeg=C3=A5rd w= rote: > 23 sep. 2020 kl. 15.40 skrev Lars Ingebrigtsen : > > > The parameter is NOERROR, but now it does signal an error. :-) > > > > So perhaps the parameter should be USER-ERROR/TERSE-ERROR or something > > and the doc strings adjusted? > > Good catch, thank you! The pushed change uses USER-ERROR. > > > > > --=20 Jo=C3=A3o T=C3=A1vora --000000000000f533b905affc230a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I must say that while this makes some sense at the UI= level
to me, resignalling errors is a bad practice all around.= =C2=A0 Not only
does it convolute the code, but errors should hav= e, in all situations,
I guess even in interactive ones, as much = stack as they can.

I think the correct = fix here is to change the way that the error
is *printed*.=C2=A0 = In the end that was the original motivation behind
the bug r= eport!=C2=A0 In CL this is easy enough to do with the
PRINT-= OBJECTgeneric function.=C2=A0 That print function would=C2=A0 print
the alternate message in this particular interactive context. I
think Emacs has recently gained the means to do something=C2=A0=
similar to PRINT-OBJECT, has it not?=C2=A0 I seem to rememb= er
Stefan Monnier telling me so.

If= it has not, and we do decide to go this route, I'd just nitpick
<= div>that the parameter name should be INTERACTIVE or
RESIGNA= L-ERROR.=C2=A0 So that unsuspecting programs calles
won'= t expect the error to have the properties of the scan-error
= object if they pass non-nil in the parameter.

Jo= =C3=A3o





On Wed, Sep 23, 2020 at 3:34 PM Mattias Engdeg=C3=A5rd <mattiase@acm.org> wrote:
23 sep. 2020 kl. 15.40 skrev Lars Ing= ebrigtsen <larsi@gnu= s.org>:

> The parameter is NOERROR, but now it does signal an error.=C2=A0 :-) >
> So perhaps the parameter should be USER-ERROR/TERSE-ERROR or something=
> and the doc strings adjusted?

Good catch, thank you! The pushed change uses USER-ERROR.






--
Jo=C3=A3o T=C3=A1vora
--000000000000f533b905affc230a-- From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 23 12:24:24 2020 Received: (at 43489-done) by debbugs.gnu.org; 23 Sep 2020 16:24:24 +0000 Received: from localhost ([127.0.0.1]:37632 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL7Z9-0001aG-Q1 for submit@debbugs.gnu.org; Wed, 23 Sep 2020 12:24:24 -0400 Received: from mail229c50.megamailservers.eu ([91.136.10.239]:40614 helo=mail36c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL7Z6-0001a1-SL for 43489-done@debbugs.gnu.org; Wed, 23 Sep 2020 12:24:22 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1600878258; bh=sq/CwD2dYhakFyCl1rn/nH7I76+Za7tY7diUjM9MAhc=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=n94w+T9P7MW/QX+IQAPRcVQHoyWvgrx6C6HmEW+ysCRIzLPprsQYtArmISgBlQqiL 9wzypyoO0Rdmhk60arXUFjXxbR15QCRFiYHHBu+mm/v2oUkzpS/JvH1Kd1j4qdZ8i0 l2XxkPMcwyWxYxY22kSjXP6xJrQZZHqCOagSSo94= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-304ee655.032-75-73746f71.bbcust.telenor.se [85.230.78.48]) (authenticated bits=0) by mail36c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 08NGOFWF006796; Wed, 23 Sep 2020 16:24:16 +0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Wed, 23 Sep 2020 18:24:14 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <23809679-C345-4780-94FF-3CDF8AEC0787@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> <47564F1F-5826-43B1-A9F1-1F4440AF2A6A@acm.org> <87ft7bmbj9.fsf@gnus.org> <87d02dj312.fsf@gnus.org> <87eemsd32m.fsf@gnus.org> To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= X-Mailer: Apple Mail (2.3445.104.15) X-CTCH-RefID: str=0001.0A782F1F.5F6B76B2.0060, 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-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=PeiBeRpd c=1 sm=1 tr=0 a=63Z2wlQ1NB3xHpgKFKE71g==:117 a=63Z2wlQ1NB3xHpgKFKE71g==:17 a=IkcTkHD0fZMA:10 a=M51BFTxLslgA:10 a=pGLkceISAAAA:8 a=upVxkC_4nboOE1xaihAA:9 a=QEXdDO2ut3YA:10 X-Origin-Country: SE X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 23 sep. 2020 kl. 16.45 skrev João Távora : > If it has not, and we do decide to go this route, I'd just nitpick > that the parameter name should be INTERACTIVE or > RESIGNAL-ERROR. Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 43489-done Cc: 43489-done@debbugs.gnu.org, Lars Ingebrigtsen , Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 23 sep. 2020 kl. 16.45 skrev Jo=C3=A3o T=C3=A1vora = : > If it has not, and we do decide to go this route, I'd just nitpick > that the parameter name should be INTERACTIVE or=20 > RESIGNAL-ERROR. Thank you! INTERACTIVE is indeed a better parameter name; now renamed. I'm not very interested in the exact mechanism used for actually = displaying the messages to the user. As you have no doubt grown weary = hearing by now, I would have preferred there not being any to show! The = employed method (user-error) seemed to be simple and workable. That it = uses the error-signalling mechanism is coincidental. This bug can probably be closed now. Further improvements will of course = still be possible. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 23 12:37:56 2020 Received: (at 43489-done) by debbugs.gnu.org; 23 Sep 2020 16:37:56 +0000 Received: from localhost ([127.0.0.1]:37647 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL7mF-00023e-QI for submit@debbugs.gnu.org; Wed, 23 Sep 2020 12:37:56 -0400 Received: from mail-io1-f49.google.com ([209.85.166.49]:42943) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL7mE-00023K-46 for 43489-done@debbugs.gnu.org; Wed, 23 Sep 2020 12:37:54 -0400 Received: by mail-io1-f49.google.com with SMTP id u6so94015iow.9 for <43489-done@debbugs.gnu.org>; Wed, 23 Sep 2020 09:37:54 -0700 (PDT) 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=qWKg/Ks4PX9kCuIrHBz9WYPBdQV4IY6K9YweXQa6Vng=; b=XnA6PnSKeISGyOEA3ZrpFbKxRb8gB7RRfvIZANeq5OhOS0rx6hrD1I0k0zbs0yWrAX kYJkLyxFs9Re3DIi7GcwWwJgIPzJX8ZjHk+0x3q+w3KK07zURocfA0tmaboOSAlcSp3+ Y+0LGBSnLqV8rmPAj/F6eIeNTMCvkGuGskbVxbj5r2Gc2EJUKn37QKY9z/vAt81aSbsa 7WHq+dssEXA8oOBTW54KE6XY2pDSRC6/epMnFud6hflp2VmV25KoKCFtj2zlQUxpwHh7 bTA8/E4akIaC0+KPZ6lbLVwKcXYiB2koEr9zjvt2qrMOK3ofq2ihfgjxhgq3qd+U5TQ+ 6P7w== 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=qWKg/Ks4PX9kCuIrHBz9WYPBdQV4IY6K9YweXQa6Vng=; b=NoWdtMO+vNk7R7Z/DS1yMbPjwV9LRwUOkqOGKVU4nqiX9PkYJTO87BOsJuLsc8TA4C 3zIpnM3UF9KznOBC9oQZqUVbB6ouk5PZNS0/dj294XgtFDRn5IeQqt/1ariT84R36agX ggAOvtTKq7NkswPptMRhp32za+JdBLbReJCHYjLmg3vkV8xyNqbrdk9Y7P8UbflaYWJz UYU7k4Ggfl0fQQ8faPrh6scKou6F6ApzgXl1e126Vkz63Go/IJsfJvf4Cs4TZtyuHzxh B2/TghbutHLh8wikVOS8PiOZkrOmficIfkkH3iRJfPqW92oQVjQNsZ/qcv03Cv38N7sT syxw== X-Gm-Message-State: AOAM530qqXclPMitTeCM7VTX5dT8uVn8Eab9IL7w83uXpjw5VMn5DwW+ knW7VUh/QyTWxXQVmROVHol2PDBd0uXI32gHaRo= X-Google-Smtp-Source: ABdhPJztJVolCl+H5dFVJaqa3B1dCXiKVtmWDTD9lOdAIUTBs42EBgS8xD+XYgLG+3q//LTcKdG3vc16TAmPcvGqeMY= X-Received: by 2002:a05:6638:14c8:: with SMTP id l8mr222754jak.136.1600879068454; Wed, 23 Sep 2020 09:37:48 -0700 (PDT) MIME-Version: 1.0 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> <47564F1F-5826-43B1-A9F1-1F4440AF2A6A@acm.org> <87ft7bmbj9.fsf@gnus.org> <87d02dj312.fsf@gnus.org> <87eemsd32m.fsf@gnus.org> <23809679-C345-4780-94FF-3CDF8AEC0787@acm.org> In-Reply-To: <23809679-C345-4780-94FF-3CDF8AEC0787@acm.org> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Wed, 23 Sep 2020 17:37:37 +0100 Message-ID: Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively To: =?UTF-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: multipart/alternative; boundary="00000000000034215205affdb434" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43489-done Cc: 43489-done@debbugs.gnu.org, Lars Ingebrigtsen , Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000034215205affdb434 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > That it uses the error-signalling mechanism is coincidental. Yes, but it is also unfortunate, as it makes debugging e.g. forward-sexp-function or scan-sexps harder. That is a side effect of this bug fix that I assert shouldn't have come along in the bargain. Jo=C3=A3o --00000000000034215205affdb434 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> That it uses the error-signalli= ng mechanism is coincidental.

Yes, but it is also = unfortunate, as it makes debugging e.g.
forward-sexp-function= or scan-sexps harder.=C2=A0 That is
a side effect of this b= ug fix that I assert shouldn't have
come along in the ba= rgain.

Jo=C3=A3o
--00000000000034215205affdb434-- From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 24 11:50:30 2020 Received: (at 43489-done) by debbugs.gnu.org; 24 Sep 2020 15:50:30 +0000 Received: from localhost ([127.0.0.1]:41407 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLTVu-0008UH-H0 for submit@debbugs.gnu.org; Thu, 24 Sep 2020 11:50:30 -0400 Received: from mail1450c50.megamailservers.eu ([91.136.14.50]:56588 helo=mail265c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLTVs-0008U2-2r for 43489-done@debbugs.gnu.org; Thu, 24 Sep 2020 11:50:29 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1600962621; bh=5Hykm+3bmm1cSRYwhdNs3IsmIroH3xYMWmfEEB+qdAU=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=Z68/vRd+YkTHebFXMKl7QlYTujwYQ2gLyixrEBq9hlNF+GG48oFNmnOoXYxCcaMri 4AKfIVjn0o+TQHr9g+NX1j0lulqynmXg7L3trnEb+LggQvaz/tDbPY6vR3ruWohNPY dnyo1dkHIG5O1Uevv0V/Pu4uJAVWVONfMSfNJI2I= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-304ee655.032-75-73746f71.bbcust.telenor.se [85.230.78.48]) (authenticated bits=0) by mail265c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 08OFoI9Q022562; Thu, 24 Sep 2020 15:50:20 +0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Thu, 24 Sep 2020 17:50:17 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: 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> <47564F1F-5826-43B1-A9F1-1F4440AF2A6A@acm.org> <87ft7bmbj9.fsf@gnus.org> <87d02dj312.fsf@gnus.org> <87eemsd32m.fsf@gnus.org> <23809679-C345-4780-94FF-3CDF8AEC0787@acm.org> To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= X-Mailer: Apple Mail (2.3445.104.15) X-CTCH-RefID: str=0001.0A782F1B.5F6CC03D.0034, 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-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=D5w51cZj c=1 sm=1 tr=0 a=63Z2wlQ1NB3xHpgKFKE71g==:117 a=63Z2wlQ1NB3xHpgKFKE71g==:17 a=IkcTkHD0fZMA:10 a=M51BFTxLslgA:10 a=pGLkceISAAAA:8 a=Ub3I2n24RdPE-sNPAqQA:9 a=QEXdDO2ut3YA:10 X-Origin-Country: SE X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 23 sep. 2020 kl. 18.37 skrev João Távora : > Yes, but it is also unfortunate, as it makes debugging e.g. > forward-sexp-function or scan-sexps harder. That is > a side effect of this bug fix that I assert shouldn't have > come along in the bar [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.3 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 43489-done Cc: 43489-done@debbugs.gnu.org, Lars Ingebrigtsen , Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 23 sep. 2020 kl. 18.37 skrev Jo=C3=A3o T=C3=A1vora = : > Yes, but it is also unfortunate, as it makes debugging e.g. > forward-sexp-function or scan-sexps harder. That is=20 > a side effect of this bug fix that I assert shouldn't have=20 > come along in the bargain. Sorry to hear that, but perhaps it's not quite that grave? After all, = there's nothing unusual about commands that use lower-level functions in = their implementation and need to catch errors raised by those functions. Let's hope the person debugging isn't too much bothered by typing M-: = (forward-sexp) instead of C-M-f, don't you think? From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 24 11:58:58 2020 Received: (at 43489-done) by debbugs.gnu.org; 24 Sep 2020 15:58:58 +0000 Received: from localhost ([127.0.0.1]:41421 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLTe6-0000FL-1O for submit@debbugs.gnu.org; Thu, 24 Sep 2020 11:58:58 -0400 Received: from mail-io1-f53.google.com ([209.85.166.53]:40083) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLTe4-0000F9-FK for 43489-done@debbugs.gnu.org; Thu, 24 Sep 2020 11:58:56 -0400 Received: by mail-io1-f53.google.com with SMTP id j2so3832180ioj.7 for <43489-done@debbugs.gnu.org>; Thu, 24 Sep 2020 08:58:56 -0700 (PDT) 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=t8+NWtxaCbGFQ9CSnFNeAiVYxWKlcZxb7LpAe5qXtO8=; b=uPCq04jwJkCAW6muK3GgGfstaWU5vxHp00cqkLCIohshQ4kTsTsXVZNnMRWp/2e3zJ x9pEsw2cpAh2mbW7tOExWVwHSdUBWYyUxfk3/urlHDit+PUUTu6iuMAqq0kMKxF4c7tC jTaVYDun4MLFnLl3omO7vMejZ7S9as1Pm3gjCN6N15gqI/XQcwGv0n+VVP7HyTx2Jox0 u/8e/CbDjW+5LkQZmBSZGF1w7zFwS+tWNFy7qMEPeELGaokfJDHi0FeykpIO8ZfCjvew zDyv1jzfOuo6vWFksFbsqhTZQnFqrE9v4d0HW/lneHylEJOQtk9JVCXu8RvWK9HyTT01 uANA== 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=t8+NWtxaCbGFQ9CSnFNeAiVYxWKlcZxb7LpAe5qXtO8=; b=ISEg5xwMeSkNXsxaRwqyS+m2g8CRAC+BDFSO5RgLvB8ByjCWSE6RYzaMMcewnIxVSs D6jRs3LthWcppk9iJDc2bVt0+oI17xAgxb5d8o0gjme6MEEgzVaO65rgjl03pM1IeNUY sKZLcFMkOaVQTcolwBRTRm4sAL1dOoIAqqZqeUXVdNKc4xrgb0sbfoD9Y2VEMrYj5UMJ DYyT4LubNYEsj/2XwqtWXhK9HDW0u3utb8plqilBZ5VnYj/GHKTT9Fd9f3hhXNfuNw81 CDDKOaJ+EwaCOlgxawAd4Mak8eFBvafd6OKl54JW8oJvIxCQG/aDkMs5PzpqJS6EOzPD hSng== X-Gm-Message-State: AOAM530aBre+fpdMBYhmILfUF2DNbpycjsyeR5f4YvApL+DFnzzYNspK O9HiSm3Z7PPVV3pw5dGpBaPw48eWyQmchd8i8CQ= X-Google-Smtp-Source: ABdhPJzlO6pwZe+gEge0a3DIDAyup3JjCwC9ofHALqPUJOKa1ZGKT0/ucIOhx1g4j0noEp+29zdV15NUHgg8JtmD6ng= X-Received: by 2002:a05:6602:2f88:: with SMTP id u8mr50342iow.175.1600963130540; Thu, 24 Sep 2020 08:58:50 -0700 (PDT) MIME-Version: 1.0 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> <47564F1F-5826-43B1-A9F1-1F4440AF2A6A@acm.org> <87ft7bmbj9.fsf@gnus.org> <87d02dj312.fsf@gnus.org> <87eemsd32m.fsf@gnus.org> <23809679-C345-4780-94FF-3CDF8AEC0787@acm.org> In-Reply-To: From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Thu, 24 Sep 2020 16:58:36 +0100 Message-ID: Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively To: =?UTF-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: multipart/alternative; boundary="000000000000b1c79905b0114675" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43489-done Cc: 43489-done@debbugs.gnu.org, Lars Ingebrigtsen , Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000b1c79905b0114675 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Sep 24, 2020 at 4:50 PM Mattias Engdeg=C3=A5rd w= rote: > Let's hope the person debugging isn't too much bothered by typing M-: (forward-sexp) instead of C-M-f, don't you think Sure, just a modest +600% increase in keys typed :-) > Tthere's nothing unusual about commands that use > lower-level functions in their implementation and need to > catch errors raised by those functions. I disagree Mattias. I think swallowing errors is bad, generally. Swallowing errors because you wanted to change the way they're textually represented is worse. It's fixing the problem in the wrong place, simple as that. Simply because by fixing the problem it creates a new one, however small you deem it. These solutions never satisfy me. But I personally hope _not_ to be terribly bitten by this. After all, most of elec-pair.el is already done, and quite stable, so I haven't been messing with this stuff for a while now. Which reminds me... Maybe you could just use condition-case-unless-debug. Then it will be just textually ugly but not functionally so. Jo=C3=A3o --000000000000b1c79905b0114675 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Sep 24, 2020 at 4:50 PM= Mattias Engdeg=C3=A5rd <mattiase@ac= m.org> wrote:

> Let's hope the person debugging isn= 9;t too much bothered by typing M-: (forward-sexp) instead of C-M-f, don= 9;t you think

Sure, just a modest +600% increase in keys typed :-)

> Tt= here's nothing unusual about commands that use
> lower-level func= tions in their implementation and need to
> catch errors raised by th= ose functions.

I disagree Mattias.=C2=A0 I think swallowing errors is bad, genera= lly.
Swallowing errors because you wanted t= o change the way
they're textually repr= esented is worse. It's fixing the problem
in the wrong place, simple as that. Simply because by
fixing the problem it creates a new one, however small
you deem it. These solutions never satisfy m= e.

But I personally hope _not_ to be terribly bitten by this. After all,
most of elec-pair.el is already done, and quite= stable, so I haven't
been messing= with this stuff for a while now.=C2=A0

Which rem= inds me...=C2=A0 Maybe you could just use
condition-case-unless-debug.=C2=A0 Then it will be
just textually ugly but not functionally so.

Jo=C3=A3o
<= /div>




--000000000000b1c79905b0114675-- From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 24 13:32:47 2020 Received: (at 43489-done) by debbugs.gnu.org; 24 Sep 2020 17:32:47 +0000 Received: from localhost ([127.0.0.1]:41568 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLV6t-0002ee-Mq for submit@debbugs.gnu.org; Thu, 24 Sep 2020 13:32:47 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:57488) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLV6r-0002eR-Ug for 43489-done@debbugs.gnu.org; Thu, 24 Sep 2020 13:32:47 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C3BC144078B; Thu, 24 Sep 2020 13:32:39 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 5BEAB440713; Thu, 24 Sep 2020 13:32:38 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1600968758; bh=3RNoXrBmb1qkFfgGe2GYhmUJpBxRnakooDKih8PtQT0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=juawSloNXS/AVTjZc/J0d+YvUSRUYgv5GincgkxcBXkOycGYjXkoWcz+SmXoQT894 /rW45Sm3l3oV9UP4Vh+eIn5K/Ibv5I0k4bHD8tVbBizuFLyjni2hbf0+FFCx6ZIiN3 VfFV4RUMPGq3N4Q8fLrSNv8avKin24xlK3oy/TXxlPyKHpymYXlBMhklPzONHsfxcN km7rA5E6fS247RXolVB0C+KWaPOGzLfOthb1aMmrIlpwMoYKc21fAyhm9VCLI5rSuG n07cX6U4IXUvEn89KOrBTZ+SHW5cxtJBS/ZsqQeXa+1N+XS313chU0oYdw8DxnGJOY Y7yZGchfnfblA== Received: from alfajor (unknown [45.72.232.131]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 1D7771204E8; Thu, 24 Sep 2020 13:32:38 -0400 (EDT) From: Stefan Monnier To: =?windows-1252?B?Sm/jbyBU4XZvcmE=?= Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively Message-ID: 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> <47564F1F-5826-43B1-A9F1-1F4440AF2A6A@acm.org> <87ft7bmbj9.fsf@gnus.org> <87d02dj312.fsf@gnus.org> <87eemsd32m.fsf@gnus.org> <23809679-C345-4780-94FF-3CDF8AEC0787@acm.org> Date: Thu, 24 Sep 2020 13:32:37 -0400 In-Reply-To: (=?windows-1252?Q?=22Jo=E3o_T=E1vora=22's?= message of "Thu, 24 Sep 2020 16:58:36 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.058 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43489-done Cc: Mattias =?windows-1252?Q?Engdeg=E5rd?= , Lars Ingebrigtsen , 43489-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > I disagree Mattias. I think swallowing errors is bad, generally. Agreed, BUT the reason Matthias did it this way is that the error we get currently from `scan-sexp` can't be turned into a good error message without knowing that it was triggered during `forward-sexp`. I think the right way to fix it is indeed not to catch&reraise the error, but instead to: A) improve the way errors are printed. B) change scan-sexp so its errors can be used to generate a good error message without having to know whether it occurred while running forward-sexp or up-list. I hoped this case would be a good opportunity to do (A), but sadly this needs (B) to happen first and this one seemed less straightforward. Help very welcome on this one. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 24 15:23:28 2020 Received: (at 43489-done) by debbugs.gnu.org; 24 Sep 2020 19:23:28 +0000 Received: from localhost ([127.0.0.1]:41766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLWpz-0007SD-Nm for submit@debbugs.gnu.org; Thu, 24 Sep 2020 15:23:27 -0400 Received: from mail-wm1-f45.google.com ([209.85.128.45]:37807) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLWpw-0007S0-M8 for 43489-done@debbugs.gnu.org; Thu, 24 Sep 2020 15:23:26 -0400 Received: by mail-wm1-f45.google.com with SMTP id a9so252765wmm.2 for <43489-done@debbugs.gnu.org>; Thu, 24 Sep 2020 12:23:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=arspU0K0Gee0mKaj3mm9CVAIh+RqrHsxm9LczoeHUIw=; b=V4LK0R7onXZErvlvy6jsilPW2UWWaI0yG2hLuw5CGfAkMyA+Y/3tD/qFwDLsNfDBnB z7QSxDl7KfMjnW1kUQgKg21W66etKgicV/OGB68E/0nTgjqy5HpUEJzWAq364ouE6voL 49l1RL88EdXpR7YFSBZp9vVnA1O3doGrQrsteIBiJZO1aAYJCoIEjIQlf9N9MVzoLfkz Dr8Tjtq8yExkexMuRO/u8x4ERfXULxsRn0cNky3hh99zVVPQ5dxTEBO1JYfAeEg7ovZf IHVIMsh++y1EVs7AiCezggivan0XeC9RksaZtuRHC1X94Zq8VnaNq2sn0XxdI5885oH5 6TaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=arspU0K0Gee0mKaj3mm9CVAIh+RqrHsxm9LczoeHUIw=; b=ALwICHRbUfcoBW8UoXp19HembERjnSom//VREv8/GGKYbA4vHZB46NUTOJTZZgGs/6 i+lIXYTNBwol9Hj5iYf4zByGWVY4HkxaZOv/hp19EUMiV7ZjI1XijM/mkdjFEqb8dEfQ dmSn6TaYtfrDfgVFZs0U0w0FLB5Ix+MyYdC7BfHzmaZ54PrD1gX1wN04qqwHV5J6rgxe zVvp6IKCtCAeMgORYvKTTifIGQj3OmPQ7vAAxKIAYI9DUWGNDmLczJqWk0vQ8lw0yRfl KCyRs3jp30RSAJIMNhz59hhEz1Cxezr442diT4ST/1vvOBn1RNa1T+yC/XMKmt2g4ANR CGbA== X-Gm-Message-State: AOAM5316hkyoqeSmTlRQoQgTvolw3sWwbufkJphOxbcEx8AfbBOhi7tc ITzDVs8PFiGBDSUxH5hI5mgJzcO5c1g= X-Google-Smtp-Source: ABdhPJxsoTB4cTiJ02Kgr5i4Pzhb869/NQRATTleMgtDTH13xqE0Mi7bkIhTwMr8qq0Ly+ZwZt9StQ== X-Received: by 2002:a1c:7508:: with SMTP id o8mr157567wmc.127.1600975398413; Thu, 24 Sep 2020 12:23:18 -0700 (PDT) Received: from krug ([89.180.155.69]) by smtp.gmail.com with ESMTPSA id w7sm108198wrm.92.2020.09.24.12.23.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Sep 2020 12:23:17 -0700 (PDT) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Stefan Monnier Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively 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> <47564F1F-5826-43B1-A9F1-1F4440AF2A6A@acm.org> <87ft7bmbj9.fsf@gnus.org> <87d02dj312.fsf@gnus.org> <87eemsd32m.fsf@gnus.org> <23809679-C345-4780-94FF-3CDF8AEC0787@acm.org> Date: Thu, 24 Sep 2020 20:23:15 +0100 In-Reply-To: (Stefan Monnier's message of "Thu, 24 Sep 2020 13:32:37 -0400") Message-ID: <87lfgzm124.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43489-done Cc: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= , Lars Ingebrigtsen , 43489-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Monnier writes: >> I disagree Mattias. I think swallowing errors is bad, generally. > > Agreed, BUT the reason Matthias did it this way is that the error we get > currently from `scan-sexp` can't be turned into a good error message > without knowing that it was triggered during `forward-sexp`. I don't understand. The point about not swallowing errors is that we don't want to turn them into anything else. We don't want to change the nature of the thing, merely dress it up so it looks less crude in certain contexts, the reponse to an interactive request by the user being one of them. In fact, I think this falls right into the use-case for (called-interactively-p 'interactive) The only known proper use of `interactive' for KIND is in deciding whether to display a helpful message, or how to display it.=20=20 So my idea is would be to find out where errors are printed, use cl-prin1 in that spot and then if write a cl-print-object method specificallly for scan-error that consults called-interactively-p in the advised manner. Or something equivalent if cl-print-object is loaded too late or something > I think the right way to fix it is indeed not to catch&reraise the > error, but instead to: > A) improve the way errors are printed. > B) change scan-sexp so its errors can be used to generate a good error > message without having to know whether it occurred while running > forward-sexp or up-list. > > I hoped this case would be a good opportunity to do (A), but sadly this > needs (B) to happen first and this one seemed less straightforward. > Help very welcome on this one. I don't see why scan-sexp needs to be changed. I think we just need to know where errors are printed to messages when debug-on-error is nil and dispatch on the error type there. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 28 13:05:37 2020 Received: (at 43489-done) by debbugs.gnu.org; 28 Sep 2020 17:05:37 +0000 Received: from localhost ([127.0.0.1]:53876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMwan-0002yg-AQ for submit@debbugs.gnu.org; Mon, 28 Sep 2020 13:05:37 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:27401) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMwal-0002yU-JE for 43489-done@debbugs.gnu.org; Mon, 28 Sep 2020 13:05:36 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 34660441331; Mon, 28 Sep 2020 13:05:30 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id F1EDB44132E; Mon, 28 Sep 2020 13:05:28 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1601312728; bh=G5Un/6xsvBJAga+BBE9rOeogAg1lw4Rr7/qyfJrph20=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=mPXcTbkWDOjSU0DRgRBdA/EBY//HF5daIyvz57L23CVDDJNBLlxApTVhTr4f3G6kN CyeRpwLIofbV2FMzWuGFOmI9ABKi6XmI40SvUgEXu4qsSxTRQGD/z5zgrHxJ/7s/1V mGATMHoA6+oFLiV7NG8i/fi5oZOX/uaqo/MOQOpjzyFvXRFQ5kuwx9Ofk+4U1csjmP xe23t1vnlr4qVqgc5KNiPWopmUFTszBRQdVExDejPeALjllHcLy/yE/yjw9aBJ4H4b QlOdm2Vk+3iTu/9ZUtnkpOp40DSuujAreqjIW40fWa7oX1uRx0mN+MqA3kgi5qxFS4 gp+PlwV2uyFGg== Received: from alfajor (unknown [45.72.232.131]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B03E112051F; Mon, 28 Sep 2020 13:05:28 -0400 (EDT) From: Stefan Monnier To: =?windows-1252?B?Sm/jbyBU4XZvcmE=?= Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively Message-ID: References: <64C7CB3A-36F2-4988-9FF9-B99115C9ED13@acm.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> <47564F1F-5826-43B1-A9F1-1F4440AF2A6A@acm.org> <87ft7bmbj9.fsf@gnus.org> <87d02dj312.fsf@gnus.org> <87eemsd32m.fsf@gnus.org> <23809679-C345-4780-94FF-3CDF8AEC0787@acm.org> <87lfgzm124.fsf@gmail.com> Date: Mon, 28 Sep 2020 13:05:27 -0400 In-Reply-To: <87lfgzm124.fsf@gmail.com> (=?windows-1252?Q?=22Jo=E3o_T=E1vo?= =?windows-1252?Q?ra=22's?= message of "Thu, 24 Sep 2020 20:23:15 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.057 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43489-done Cc: Mattias =?windows-1252?Q?Engdeg=E5rd?= , Lars Ingebrigtsen , 43489-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >>> I disagree Mattias. I think swallowing errors is bad, generally. >> >> Agreed, BUT the reason Matthias did it this way is that the error we get >> currently from `scan-sexp` can't be turned into a good error message >> without knowing that it was triggered during `forward-sexp`. > > I don't understand. The point about not swallowing errors is that we > don't want to turn them into anything else. By "turning into" I'm referring to the job of `print-object` done in the command-loop when it catches an unhandled error. > I don't see why scan-sexp needs to be changed. Because the error objects it throws give information that is difficult/impossible to turn into good error messages. For example, when doing an up-list, `scan-sexp` may signal the error object: (scan-error "Unbalanced parentheses" 5010 1) even tho there is no unbalanced paren in the buffer. Instead, the error is that we were not within a set of parens when we started. Stefan From unknown Sat Jun 21 10:39:46 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 27 Oct 2020 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator