X-Loop: help-debbugs@HIDDEN Subject: bug#41676: 27.0.91; js-beginning-of-defun doesn't handle ES2015 class and arrow functions Resent-From: Brian Leung <bkleung89@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 02 Jun 2020 22:07:01 +0000 Resent-Message-ID: <handler.41676.B.159113559321510 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 41676 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 41676 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.159113559321510 (code B ref -1); Tue, 02 Jun 2020 22:07:01 +0000 Received: (at submit) by debbugs.gnu.org; 2 Jun 2020 22:06:33 +0000 Received: from localhost ([127.0.0.1]:41216 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1jgF3J-0005ar-Dk for submit <at> debbugs.gnu.org; Tue, 02 Jun 2020 18:06:33 -0400 Received: from lists.gnu.org ([209.51.188.17]:49730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <bkleung89@HIDDEN>) id 1jgF3H-0005ak-W0 for submit <at> debbugs.gnu.org; Tue, 02 Jun 2020 18:06:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50244) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <bkleung89@HIDDEN>) id 1jgF3H-00036n-SH for bug-gnu-emacs@HIDDEN; Tue, 02 Jun 2020 18:06:31 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]:35241) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <bkleung89@HIDDEN>) id 1jgF3H-0005dA-4R for bug-gnu-emacs@HIDDEN; Tue, 02 Jun 2020 18:06:31 -0400 Received: by mail-ej1-x633.google.com with SMTP id y13so7590eju.2 for <bug-gnu-emacs@HIDDEN>; Tue, 02 Jun 2020 15:06:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=BIfGOwuvGrzn2SIx1h3lrLNPjM6LJkcCQ8+VkqxUFYI=; b=rCyMbZD8+3daoq1IM31Ifxq2AsNGPpri/x56G6XKLEDvDhu7uun/6RTbBM9NhqDZ6r RR3iAmhi77A8cKLvbttFYrrjan71iaJs1uprHmCgo/4n8C8YYwEWjH1gp4zipWQWuIW5 fFnTJoxiXRxpkzWhQJc/7oXfJnllpkY4v4Feq/cPGckgAQ/0JMD+N+nRM9+BAoTv0++2 dvIMJhlR7pUWvDy6do0+o1/FJGIneaPOUVpt+V0Tfp205OR7jVMxruysM74q+SWKZFUi e5P+RnMGT5pOnc+yFdYJ3jrXDpnOhewdU8cTYr7u99S806VrjebkPiQPjUHAXXgzVrl/ 9+Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=BIfGOwuvGrzn2SIx1h3lrLNPjM6LJkcCQ8+VkqxUFYI=; b=E7cMH5YFLXLeBPhAQMFBouGtTEA88DZ4dNjdzLQEJV7zOO92CBAHaWNFUxAt+pOFC2 F/TB8gGZCgRgbbLsv0zMUGVjq2SGaHd4D91rN4tKly+xWWNqQKawPMNB3luBQptsgRk+ xZH/+eo2dA/JFA4VKE8DWQGulcbuqG3U1V5SzT2Hbhb0dOueQhVnKAgzJsT82H0AIBgA tAmDaRxTNrhcvNGqBfCxBVY6laP+pALoQ4wuVrXbxU+j5asOEJbqy4ln2oes/VhTcYRx i9t8l17o/QHZdheDHQ5gdTpZpmAnRWuSa9R963E4pzyQulAJxIDsuys3OErXx93bzDEw HEbw== X-Gm-Message-State: AOAM533sLGCMZz2XVyRGPqKFNSs5l61Vsvkf2sEzrbLRI50IEm/qXjnQ YvcP3UpHa/XpTuYnGqIu+5MQOnjv+XpIWacM5Y0QkLBT X-Google-Smtp-Source: ABdhPJyylrR+AhsJB0qLYM8N6ZignhK5pJ4TJ0C9b1Ng+gCVlx9elkDAkPKGUXIx0l/KGtbg+5xsG1RsdBuvRNydZ80= X-Received: by 2002:a17:907:10d1:: with SMTP id rv17mr20855925ejb.51.1591135588621; Tue, 02 Jun 2020 15:06:28 -0700 (PDT) MIME-Version: 1.0 From: Brian Leung <bkleung89@HIDDEN> Date: Tue, 2 Jun 2020 15:05:52 -0700 Message-ID: <CAAc=MEzkr0ik9aczrxk0dGGOR8fs3M33uf07vymX+w=BEy0L8w@HIDDEN> Content-Type: multipart/alternative; boundary="0000000000008ca1f305a7211f3a" Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=bkleung89@HIDDEN; helo=mail-ej1-x633.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: 0.9 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.1 (--) --0000000000008ca1f305a7211f3a Content-Type: text/plain; charset="UTF-8" In the following ES2015 file: import * as React from "react"; import { render } from "react-dom"; import SearchParams from "./SearchParams"; class Abc extends React.Component {} const App = () => { return ( <div> <h1 id="5">Hi</h1> </div> ); }; function abc(x) { return 42; } const def = () => { return 1; }; render(<App />, document.getElementById("root")); If you start at the end and use M-: js-beginning-of-defun repeatedly (necessary since in bug #41469 it's clear that beginning-of-defun-function is c-beginning-of-defun), point stops at the ES5 function declaration of abc and then at the imports section, skipping the arrow functions and the class declaration. In GNU Emacs 27.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20) Windowing system distributor 'The X.Org Foundation', version 11.0.12008000 System Description: NixOS 20.09 (Nightingale) --0000000000008ca1f305a7211f3a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">In the following ES2015 file:<br><br>import * as React fro= m "react";<br>import { render } from "react-dom";<br>im= port SearchParams from "./SearchParams";<br><br>class Abc extends= React.Component {}<br><br>const App =3D () =3D> {<br>=C2=A0 return (<br= >=C2=A0 =C2=A0 <div><br>=C2=A0 =C2=A0 =C2=A0 <h1 id=3D"5"= ;>Hi</h1><br>=C2=A0 =C2=A0 </div><br>=C2=A0 );<br>};<br><br>= function abc(x) {<br>=C2=A0 return 42;<br>}<br><br>const def =3D () =3D>= {<br>=C2=A0 return 1;<br>};<br><br>render(<App />, document.getEleme= ntById("root"));<br><br><br><br>If you start at the end and use M= -: js-beginning-of-defun repeatedly<br>(necessary since in bug #41469 it= 9;s clear that<br>beginning-of-defun-function is c-beginning-of-defun), poi= nt stops at the<br>ES5 function declaration of abc and then at the imports = section,<br>skipping the arrow functions and the class declaration.<br><br>= In GNU Emacs 27.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20)<b= r>Windowing system distributor 'The X.Org Foundation', version 11.0= .12008000<br>System Description: NixOS 20.09 (Nightingale)<br></div> --0000000000008ca1f305a7211f3a--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Brian Leung <bkleung89@HIDDEN> Subject: bug#41676: Acknowledgement (27.0.91; js-beginning-of-defun doesn't handle ES2015 class and arrow functions) Message-ID: <handler.41676.B.159113559321510.ack <at> debbugs.gnu.org> References: <CAAc=MEzkr0ik9aczrxk0dGGOR8fs3M33uf07vymX+w=BEy0L8w@HIDDEN> X-Gnu-PR-Message: ack 41676 X-Gnu-PR-Package: emacs Reply-To: 41676 <at> debbugs.gnu.org Date: Tue, 02 Jun 2020 22:07:01 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 41676 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 41676: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D41676 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
Received: (at control) by debbugs.gnu.org; 8 May 2022 12:38:18 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 08 08:38:18 2022 Received: from localhost ([127.0.0.1]:53632 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1nngB0-0002Lr-84 for submit <at> debbugs.gnu.org; Sun, 08 May 2022 08:38:18 -0400 Received: from quimby.gnus.org ([95.216.78.240]:58816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <larsi@HIDDEN>) id 1nngAz-0002Lb-E2 for control <at> debbugs.gnu.org; Sun, 08 May 2022 08:38:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ChgXUY6DOS5mqC6HH611N7rPzmb3FMau/gfV6n8vKXU=; b=rr6E2NQGQ7IyfQbCaNKkJCECcc t9TFbff2Oci7OGDpuoJ+W5QfQggU6d55rF5piK3KRO8E4lJIOCnuZE+Q9kZE5l7Pd1G6AZRFmNOZ9 aNqN7kwQQICSWteYMuRaz9V2Bf3KnrZEi3Bsl5VdsYgunnyXyV+1qZORV00DAzkDPw9g=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <larsi@HIDDEN>) id 1nngAr-0008UD-Ku for control <at> debbugs.gnu.org; Sun, 08 May 2022 14:38:11 +0200 Date: Sun, 08 May 2022 14:38:08 +0200 Message-Id: <87zgjsgpxr.fsf@HIDDEN> To: control <at> debbugs.gnu.org From: Lars Ingebrigtsen <larsi@HIDDEN> Subject: control message for bug #28448 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: forcemerge 28448 41676 quit 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: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) forcemerge 28448 41676 quit
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.