From unknown Tue Aug 19 12:49:10 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#18764 <18764@debbugs.gnu.org> To: bug#18764 <18764@debbugs.gnu.org> Subject: Status: 24.4; electric-indent in *scratch* signals an error Reply-To: bug#18764 <18764@debbugs.gnu.org> Date: Tue, 19 Aug 2025 19:49:10 +0000 retitle 18764 24.4; electric-indent in *scratch* signals an error reassign 18764 emacs submitter 18764 Eli Zaretskii severity 18764 normal tag 18764 confirmed patch fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 18 10:59:58 2014 Received: (at submit) by debbugs.gnu.org; 18 Oct 2014 14:59:58 +0000 Received: from localhost ([127.0.0.1]:48578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XfVU4-0007E8-VB for submit@debbugs.gnu.org; Sat, 18 Oct 2014 10:59:57 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40983) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XfVU1-0007Dz-SL for submit@debbugs.gnu.org; Sat, 18 Oct 2014 10:59:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XfVTr-0005XF-Kt for submit@debbugs.gnu.org; Sat, 18 Oct 2014 10:59:53 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:40897) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XfVTr-0005X9-IS for submit@debbugs.gnu.org; Sat, 18 Oct 2014 10:59:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XfVTj-0003mu-VD for bug-gnu-emacs@gnu.org; Sat, 18 Oct 2014 10:59:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XfVTc-0005Tq-72 for bug-gnu-emacs@gnu.org; Sat, 18 Oct 2014 10:59:35 -0400 Received: from mtaout25.012.net.il ([80.179.55.181]:42359) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XfVTb-0005Si-Q0 for bug-gnu-emacs@gnu.org; Sat, 18 Oct 2014 10:59:28 -0400 Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0NDN00P00A214N00@mtaout25.012.net.il> for bug-gnu-emacs@gnu.org; Sat, 18 Oct 2014 17:54:45 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NDN00NL8AR8WT30@mtaout25.012.net.il> for bug-gnu-emacs@gnu.org; Sat, 18 Oct 2014 17:54:44 +0300 (IDT) Date: Sat, 18 Oct 2014 17:59:12 +0300 From: Eli Zaretskii Subject: 24.4; electric-indent in *scratch* signals an error X-012-Sender: halo1@inter.net.il To: bug-gnu-emacs@gnu.org Message-id: <83a94te85b.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii 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: -5.0 (-----) In "emacs -Q": 1) Insert the following long sequence of left parens followed by a somewhat shorter sequence of right parens: ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((())))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) 2) Put cursor after the last right parenthesis, and type RET 3) Emacs signals an error: lisp-indent-line: Wrong type argument: number-or-marker-p, nil Here's the Lisp backtrace: Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) calculate-lisp-indent() lisp-indent-line() indent-according-to-mode() electric-indent-post-self-insert-function() self-insert-command(1) newline(nil 1) funcall-interactively(newline nil 1) call-interactively(newline nil nil) command-execute(newline) In GNU Emacs 24.4.1 (i686-pc-mingw32) of 2014-10-17 on HOME-C4E4A596F7 Windowing system distributor `Microsoft Corp.', version 5.1.2600 Configured using: `configure --prefix=/d/usr' Important settings: value of $LANG: ENU locale-coding-system: cp1255 Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( C-/ ) C-/ ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) C-/ ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) C-/ ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ( ( ( ( ( ( ( ( ( ( ( ( ( ) ) ) ) ) ) ) ) ) ) ) C-/ ) C-/ ) C-/ ) C-y C-/ M-x r e p o r t - e m Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Undo! [4 times] Mark set Undo! [3 times] Mark set [2 times] lisp-indent-line: Wrong type argument: number-or-marker-p, nil Undo! Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp w32-common-fns disp-table w32-win w32-vars tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process w32notify w32 multi-tty emacs) Memory information: ((conses 8 74585 7049) (symbols 32 17521 0) (miscs 32 45 339) (strings 16 10814 3613) (string-bytes 1 269937) (vectors 8 9552) (vector-slots 4 385033 4696) (floats 8 58 351) (intervals 28 279 94) (buffers 508 11)) From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 14 22:34:44 2018 Received: (at 18764) by debbugs.gnu.org; 15 Jun 2018 02:34:44 +0000 Received: from localhost ([127.0.0.1]:48736 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fTeZY-0000j9-Ah for submit@debbugs.gnu.org; Thu, 14 Jun 2018 22:34:44 -0400 Received: from mail-io0-f178.google.com ([209.85.223.178]:42383) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fTeZX-0000im-0I; Thu, 14 Jun 2018 22:34:43 -0400 Received: by mail-io0-f178.google.com with SMTP id r24-v6so9323772ioh.9; Thu, 14 Jun 2018 19:34:42 -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; bh=IJFeI+u97lrM0kvRrJ+79uA2OjK3WrUpkaRPf3bEv+8=; b=veYtoUNUY6msnOZ2DWtDQAFGHa9TZKiRjpbIiTp0uaaVcfYA49hPfGz1+3r7v836mj BOO4FOjj1sz1YDm2cZcHcx4r4uEC1cH0ajAV1NDJbL5gfmDwC6rmu1UAiDTeo39drK5K q2XoBP7y24Eu89QqtdzXnC0sfV3NiGKMTaBR4nn1+HU/PskxI34iKhqEoo7UE7AEvv/w CwYVDcsRvimFzzcGPitOezkX6PoEUKwrBaczCVxRkpYEJgurdXpJJDuvU0vNLcrHBLRy LzZSkgYcZHIWyL+EVdVpKMTNfB/zu1KILkIRm6tyDwIqOe+iq0GpuZ9gm1t0TYGSUzFS W6AQ== 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; bh=IJFeI+u97lrM0kvRrJ+79uA2OjK3WrUpkaRPf3bEv+8=; b=tLjGWY8yqt2/2ki5Em+SYDLESl6yiRkCllKvZ/bw27b3PIhhnJZ6htEdBNr039x0Xp r4wYCh1IyUrxn0ku0u5tfM+/N4w0Bwoa5tT9HCrn4fjobWuZelfZ9I30ftimp+8PQnF3 jqeAt0tIE7VfFwcyMyioEPbSzkyIH+ZJ583MtbxZfPi24+SApdN0dQ9FT+NLcsarZ+jO N8Xjfyr7rV8ebx0jzGk7Tu5tcWDsfBfjRDhv97QmxKCfiXPm+qXwY5qDB7E+14KcqlXQ Nawrnc0VlC3M7g6eS7shFnV7t7wItmUr6PyXDVFaQ9J7cYR83ITPKcrONPIuojGh62Ii 4Xmg== X-Gm-Message-State: APt69E244Phuz2cT7sk7U3wU6zTM88hueIuvzI0ASw14wk9Rrdk3S1RY s+sa+Jv8+KqjE2WUoL387jL0dQ== X-Google-Smtp-Source: ADUXVKLoy0dKKb+uUDbjtQpvfvI0d03luCzMVeekOgHHghljYupuPrcGgaRffYna4SkQO/E694Gfmg== X-Received: by 2002:a6b:c741:: with SMTP id x62-v6mr4326222iof.99.1529030077401; Thu, 14 Jun 2018 19:34:37 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id v200-v6sm386324ita.43.2018.06.14.19.34.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Jun 2018 19:34:36 -0700 (PDT) From: Noam Postavsky To: Eli Zaretskii Subject: Re: bug#18764: 24.4; electric-indent in *scratch* signals an error References: <83a94te85b.fsf@gnu.org> Date: Thu, 14 Jun 2018 22:34:35 -0400 In-Reply-To: <83a94te85b.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 18 Oct 2014 17:59:12 +0300") Message-ID: <8736xowzes.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18764 Cc: 18764@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 (-) tags 18764 + confirmed found 18764 26.1 quit Eli Zaretskii writes: > In "emacs -Q": > > 1) Insert the following long sequence of left parens followed by a somewhat > shorter sequence of right parens: Specifically, the sequence of left parens must be more than 100, to hit this limit: static void scan_sexps_forward(...) {... struct level levelstart[100]; struct level *curlevel = levelstart; struct level *endlevel = levelstart + 100; ... case Sopen: ... if (++curlevel == endlevel) curlevel--; /* error ("Nesting too deep for parser"); */ and a sequence of 100 close parens so that the curlevel stack will be completely popped: case Sclose: ... if (curlevel != levelstart) curlevel--; In this case parse-partial-sexp will have the right depth, but incorrectly have nil for element 2 "character address of start of last complete sexp terminated." Not sure exactly what to do about this though. Maybe parse-partial-sexp should (optionally?) signal an error when the curlevel stack overflows? From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 16 07:30:54 2018 Received: (at 18764) by debbugs.gnu.org; 16 Jun 2018 11:30:54 +0000 Received: from localhost ([127.0.0.1]:51058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fU9Px-0004NQ-NF for submit@debbugs.gnu.org; Sat, 16 Jun 2018 07:30:54 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41753) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fU9Pw-0004GV-8L for 18764@debbugs.gnu.org; Sat, 16 Jun 2018 07:30:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fU9Pm-0008Mu-1Q for 18764@debbugs.gnu.org; Sat, 16 Jun 2018 07:30:47 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35602) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fU9Pl-0008Mj-Tk; Sat, 16 Jun 2018 07:30:41 -0400 Received: from [176.228.60.248] (port=3234 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fU9Pl-0002k8-6H; Sat, 16 Jun 2018 07:30:41 -0400 Date: Sat, 16 Jun 2018 14:30:32 +0300 Message-Id: <83tvq3ynmv.fsf@gnu.org> From: Eli Zaretskii To: Noam Postavsky In-reply-to: <8736xowzes.fsf@gmail.com> (message from Noam Postavsky on Thu, 14 Jun 2018 22:34:35 -0400) Subject: Re: bug#18764: 24.4; electric-indent in *scratch* signals an error References: <83a94te85b.fsf@gnu.org> <8736xowzes.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 18764 Cc: 18764@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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Noam Postavsky > Cc: 18764@debbugs.gnu.org > Date: Thu, 14 Jun 2018 22:34:35 -0400 > > Not sure exactly what to do about this though. Maybe parse-partial-sexp > should (optionally?) signal an error when the curlevel stack overflows? Why do we produce an error instead of just inserting the character? From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 16 09:48:27 2018 Received: (at 18764) by debbugs.gnu.org; 16 Jun 2018 13:48:27 +0000 Received: from localhost ([127.0.0.1]:51130 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fUBZ5-0000Dx-7j for submit@debbugs.gnu.org; Sat, 16 Jun 2018 09:48:27 -0400 Received: from mail-it0-f44.google.com ([209.85.214.44]:36247) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fUBZ3-0000Dh-M6 for 18764@debbugs.gnu.org; Sat, 16 Jun 2018 09:48:25 -0400 Received: by mail-it0-f44.google.com with SMTP id j135-v6so6446801itj.1 for <18764@debbugs.gnu.org>; Sat, 16 Jun 2018 06:48:25 -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; bh=U3wsQ9VYp2sVqYj5Ms7XoilNM/cd+ePWm+9uohuzhnc=; b=rI4jpEss2CuaRkKomtJl0WxMl4M45dbY270jG2q+jWMhbiUZAkn1I9A73vr+ASQZvN 2Pdq5asY6Fx1LMq9NSg2z6F3oLev1G+7hCRhxkwLeTbKeJTmSet7FxU73Bm5PPiq6xpC qTQeCoGNXFg8z9ql7i5kVB2bLihKcPqdTg5HmknV2MAaV1le5mDxY9miHSoCeXujrOGw LXZ7qta3zHl6457eKFFExj4nK44dD9IIkHM4qCYaeTAJEzf1BCDbwoht0AiLIaUTQqEk VfKNcRGbavSe9/s8yYdoktwtH16rb87edKTnOBWgZ8eKSCVAtMRZkI1uK33fBMuVN/mW 27dg== 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; bh=U3wsQ9VYp2sVqYj5Ms7XoilNM/cd+ePWm+9uohuzhnc=; b=Xob6wMoAUj9+tj2DSSAoK3pYwJZBy5Ap7uyduGsBAq6prpdXKZ3ZUTZtO/aSR35skS hdl8AFMJ0Qh7hOa6IL0tiA2+/l+iNW6XJQYkGxCMqny3m00Jiv0JZJXRa2N72J9OsfRI i3Ns3TIDo0Fe0/ufaa45XjvZ2cpO5+5u+VYgUM53iOndmAeEzaYO9P3UWs6L4Xpsg6l0 pG70mRmDcyfToeF/QxhhFp73ltk5rhILTF7UEMQ5qIY89pxxvzUTCOtccy3Gj7ThqGje 6/IPT0pVk+HC3EvuE7HydCt42rDpFdVsL+yVYsdYgejznT061o1sLT70vTcHQQBH6wZX ZwfA== X-Gm-Message-State: APt69E2xYNhbZ14AfE4/qgkvGdZu4D07sar/4MA5xKKundwXak2xtCtX ASH7m75vNqTRyDvAHduPzdkTgQ== X-Google-Smtp-Source: ADUXVKLaryiXyKgyX7I6F1OO8NKjW3MUmEzVnOXP4miEi+mtI8tDV0F+Lgof3HgiGBs6XaMBLupNsQ== X-Received: by 2002:a24:154c:: with SMTP id 73-v6mr4786925itq.51.1529156899885; Sat, 16 Jun 2018 06:48:19 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id h81-v6sm3340672ith.2.2018.06.16.06.48.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 16 Jun 2018 06:48:19 -0700 (PDT) From: Noam Postavsky To: Eli Zaretskii Subject: Re: bug#18764: 24.4; electric-indent in *scratch* signals an error References: <83a94te85b.fsf@gnu.org> <8736xowzes.fsf@gmail.com> <83tvq3ynmv.fsf@gnu.org> Date: Sat, 16 Jun 2018 09:48:18 -0400 In-Reply-To: <83tvq3ynmv.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 16 Jun 2018 14:30:32 +0300") Message-ID: <87d0wqvo4d.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18764 Cc: 18764@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 (-) Eli Zaretskii writes: >> From: Noam Postavsky >> Cc: 18764@debbugs.gnu.org >> Date: Thu, 14 Jun 2018 22:34:35 -0400 >> >> Not sure exactly what to do about this though. Maybe parse-partial-sexp >> should (optionally?) signal an error when the curlevel stack overflows? > > Why do we produce an error instead of just inserting the character? I don't quite follow; the newline character has already been inserted as far as I can tell. Then we signal an error while trying to indent. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 16 11:03:53 2018 Received: (at 18764) by debbugs.gnu.org; 16 Jun 2018 15:03:53 +0000 Received: from localhost ([127.0.0.1]:51782 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fUCk5-0004CR-Fq for submit@debbugs.gnu.org; Sat, 16 Jun 2018 11:03:53 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39133) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fUCk4-0004CF-66 for 18764@debbugs.gnu.org; Sat, 16 Jun 2018 11:03:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fUCjv-0001Yq-TX for 18764@debbugs.gnu.org; Sat, 16 Jun 2018 11:03:47 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUCjv-0001Yj-Q9; Sat, 16 Jun 2018 11:03:43 -0400 Received: from [176.228.60.248] (port=3730 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fUCjv-0000G0-7K; Sat, 16 Jun 2018 11:03:43 -0400 Date: Sat, 16 Jun 2018 18:03:35 +0300 Message-Id: <83muvuzsc8.fsf@gnu.org> From: Eli Zaretskii To: Noam Postavsky In-reply-to: <87d0wqvo4d.fsf@gmail.com> (message from Noam Postavsky on Sat, 16 Jun 2018 09:48:18 -0400) Subject: Re: bug#18764: 24.4; electric-indent in *scratch* signals an error References: <83a94te85b.fsf@gnu.org> <8736xowzes.fsf@gmail.com> <83tvq3ynmv.fsf@gnu.org> <87d0wqvo4d.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 18764 Cc: 18764@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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Noam Postavsky > Cc: 18764@debbugs.gnu.org > Date: Sat, 16 Jun 2018 09:48:18 -0400 > > > Why do we produce an error instead of just inserting the character? > > I don't quite follow; the newline character has already been inserted as > far as I can tell. Then we signal an error while trying to indent. Then let me rephrase: why are we signaling an error instead of silently doing nothing? IOW, if something cannot be indented, let's leave it unindented. Does that make sense? From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 16 19:13:38 2018 Received: (at 18764) by debbugs.gnu.org; 16 Jun 2018 23:13:38 +0000 Received: from localhost ([127.0.0.1]:52291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fUKO1-0004Uf-P1 for submit@debbugs.gnu.org; Sat, 16 Jun 2018 19:13:37 -0400 Received: from mail-it0-f53.google.com ([209.85.214.53]:39742) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fUKO0-0004UQ-0b for 18764@debbugs.gnu.org; Sat, 16 Jun 2018 19:13:36 -0400 Received: by mail-it0-f53.google.com with SMTP id p185-v6so7416212itp.4 for <18764@debbugs.gnu.org>; Sat, 16 Jun 2018 16:13:36 -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; bh=nx3J5iXcGQe5DhdUgRPJvhhMkvEVdDbG01yGrOeO4q4=; b=efJG+YeG6MnQnEEAsH2kqjk8JLY+whVGBDi3SCiKounBgogt7viFsCrOFehm8x1SXX 2ODTUkWSowC7DRjibXy28EnCoYrbuZxkXp7vs5fLPvin3tcN7KlkbGC0jHslEeSaLOCk qjoX7Mc5EoeyJy2KFqH6yUicbshK+AgtGmrFHM6vWduW8NDZeaWQ/Gf55xC31Rj1m3rv xL++0N4DsdoLYjxiyDwEPWNIOebzmoGYAfq23MnnAqq+Bv5CEoMf8tOv9GBTu7Nvzjqx eIc2J6lq9WrYrIQLZmhUiQ6BdGH+Dg3R/rAisFry4yF+FQFCwHQV5GqoKfLA6qOG32YW hrcg== 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; bh=nx3J5iXcGQe5DhdUgRPJvhhMkvEVdDbG01yGrOeO4q4=; b=gDz/PXU6auBZzkRQa3bIJBTnUy6x1y5wrZ9ngmq01OHe+Yt4mRIsstd8VflUuvjTiH qKvXjMwa/h0PcT4jtk8LTZvjYN/EILT0GrGv2sORKlLseki3l/2JsoUypdl6futqjijT g93nkVpyIA08V7yOrPKacbKOWyzNeqyMTj2A+mBwENTQa0kPr9fhmMbxf7uG1dxil1/1 fhTyK4USs4prI6BUU2bE7UoHhImsFBRhRR3WL7NXtDQu2MCPa7HzHx2k0qfkzE1XUqlI i0enwTykgAnRb8IeJs+NmZ+K1rQqFJKXs7/F4WicxMDr43QCJ+EeA6/u4BOyQe3wNFf/ D3jg== X-Gm-Message-State: APt69E2PVJo5b6IFC1AXd9X/dzi6Msl8kqsQr4sA4CxRCbiwIm01TNGH SY/IIXs2chQpHxFeMaIPzVJIzzv5 X-Google-Smtp-Source: ADUXVKI/yzSw/9j/jbJ/YRBALmCwNGqrSGmpYWqJTUyYpOkCuwCiqOw+iM6Ipe1cDd+MfNT/VRM55A== X-Received: by 2002:a02:a198:: with SMTP id n24-v6mr5570549jah.61.1529190810476; Sat, 16 Jun 2018 16:13:30 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id z85-v6sm3741714ita.1.2018.06.16.16.13.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 16 Jun 2018 16:13:30 -0700 (PDT) From: Noam Postavsky To: Eli Zaretskii Subject: Re: bug#18764: 24.4; electric-indent in *scratch* signals an error References: <83a94te85b.fsf@gnu.org> <8736xowzes.fsf@gmail.com> <83tvq3ynmv.fsf@gnu.org> <87d0wqvo4d.fsf@gmail.com> <83muvuzsc8.fsf@gnu.org> Date: Sat, 16 Jun 2018 19:13:29 -0400 In-Reply-To: <83muvuzsc8.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 16 Jun 2018 18:03:35 +0300") Message-ID: <87lgbetjdy.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 18764 Cc: 18764@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 (-) Eli Zaretskii writes: > Then let me rephrase: why are we signaling an error instead of > silently doing nothing? IOW, if something cannot be indented, let's > leave it unindented. Does that make sense? So just suppress the errors? Worries me a bit that some future problems could be harder to find because of that. --- i/lisp/electric.el +++ w/lisp/electric.el @@ -262,6 +262,7 @@ electric-indent-post-self-insert-function (unless (eq act 'do-indent) (nth 8 (syntax-ppss)))))))) ;; For newline, we want to reindent both lines and basically behave like ;; reindent-then-newline-and-indent (whose code we hence copied). + (ignore-errors (let ((at-newline (<= pos (line-beginning-position)))) (when at-newline (let ((before (copy-marker (1- pos) t))) @@ -285,7 +286,7 @@ electric-indent-post-self-insert-function (delete-horizontal-space t))))) (unless (and electric-indent-inhibit (not at-newline)) - (indent-according-to-mode)))))) + (indent-according-to-mode))))))) From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 16 23:48:46 2018 Received: (at 18764) by debbugs.gnu.org; 17 Jun 2018 03:48:46 +0000 Received: from localhost ([127.0.0.1]:52430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fUOgI-0006Fh-1i for submit@debbugs.gnu.org; Sat, 16 Jun 2018 23:48:46 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fUOgG-0006FU-3Z for 18764@debbugs.gnu.org; Sat, 16 Jun 2018 23:48:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fUOg6-0005LQ-5S for 18764@debbugs.gnu.org; Sat, 16 Jun 2018 23:48:39 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44741) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUOg6-0005LC-1Q; Sat, 16 Jun 2018 23:48:34 -0400 Received: from [176.228.60.248] (port=4697 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fUOg4-00055n-SE; Sat, 16 Jun 2018 23:48:33 -0400 Date: Sun, 17 Jun 2018 06:48:26 +0300 Message-Id: <83vaaixed1.fsf@gnu.org> From: Eli Zaretskii To: Noam Postavsky In-reply-to: <87lgbetjdy.fsf@gmail.com> (message from Noam Postavsky on Sat, 16 Jun 2018 19:13:29 -0400) Subject: Re: bug#18764: 24.4; electric-indent in *scratch* signals an error References: <83a94te85b.fsf@gnu.org> <8736xowzes.fsf@gmail.com> <83tvq3ynmv.fsf@gnu.org> <87d0wqvo4d.fsf@gmail.com> <83muvuzsc8.fsf@gnu.org> <87lgbetjdy.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 18764 Cc: 18764@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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Noam Postavsky > Cc: 18764@debbugs.gnu.org > Date: Sat, 16 Jun 2018 19:13:29 -0400 > > Eli Zaretskii writes: > > > Then let me rephrase: why are we signaling an error instead of > > silently doing nothing? IOW, if something cannot be indented, let's > > leave it unindented. Does that make sense? > > So just suppress the errors? Yes. > Worries me a bit that some future problems could be harder to find > because of that. I submit that any errors in code that tries to indent should be suppressed, as they are not relevant to what the user wanted. If those errors are important in other contexts, they will pop up there, and can then decide what to do with them. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 18 05:33:45 2018 Received: (at 18764) by debbugs.gnu.org; 18 Jun 2018 09:33:45 +0000 Received: from localhost ([127.0.0.1]:54400 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fUqXh-0000Se-3P for submit@debbugs.gnu.org; Mon, 18 Jun 2018 05:33:45 -0400 Received: from mail-wm0-f45.google.com ([74.125.82.45]:51504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fUqXf-0000ST-GE for 18764@debbugs.gnu.org; Mon, 18 Jun 2018 05:33:43 -0400 Received: by mail-wm0-f45.google.com with SMTP id r15-v6so12880478wmc.1 for <18764@debbugs.gnu.org>; Mon, 18 Jun 2018 02:33:43 -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=hOGAcdd38CyUyp3LLT1jaC+Lkm6A57JkL4/ze7pJfTA=; b=a6FYaj7hcA30rFbapEfmYfNeVhJA0MNNr3OOvh7iFNQMhJIgz/V9fJoQV+vLbvP2m/ 9F46JyhJqcEPPiL5otdZfDhU8WuoO/7CdyVsfZHenQ2VlHVQ+w8dh86R0UBxLBI8o7Cv ONYiWzM5RM39oZF9hx1sa5vykafZeXOgEitmOIaeI777qEh1Yi85hi0Vzp5BuWnrbkvo qNhrAjeo7qWM8agjFqwIjrxTNpZPNW7hgetFOOHdva8oGTlwWnHA01GIrBlkUQexhyaO rdC7WLF8/jQoj8LSsWJ42PyFyM3/h4JkKNa6Ki5b5jRGQE1n2nFSKEbkTDACYvru2vHY pIpw== 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=hOGAcdd38CyUyp3LLT1jaC+Lkm6A57JkL4/ze7pJfTA=; b=ph+tY4nqvCEChteL1ogZcBN7V+TFsYcErUD0WSjD0ujLCJ/xKHP27KnIrsd3TmWlpa 0CWQb2C94KrXMg4kn8adzfbpl8W+ij+3lIfVjxTrwTPaubQOrz7JxfVe5ak324eM5DOj MeBh25ZX6uG8hkPGj1FnGfKGKS+pq9iK7lUNMAi2QqnSOzH+hPPCfCr6inhvgZmmFqfQ dctUc3H8P+cIp9rFOyncMKB+5Z8py/LwH9cSQhkAsV4n5owsydNhF9E3T1T9c72u3wdH UIzqY76ZNJ9+vwWp6DoTlUWNW6wLQuWxjsG1zK8HsTR/cLcbDhXGwgMegEywOKVf8F6j DwvA== X-Gm-Message-State: APt69E1Gabsfht+tZ8MFc5LQxqCck2XF1Q/mxUyfBjtRGJ3M++obFPkQ PG9jhtrSAPpoynjoBcmTKiF1JgAo X-Google-Smtp-Source: ADUXVKLzgAl+bE1iRa1UmZwFpPRBjNi+h2decXWxBLgZQme48M18sW7X9zY9gO4y4rVe3RkqLV7WUg== X-Received: by 2002:a1c:b49:: with SMTP id 70-v6mr7369171wml.5.1529314417577; Mon, 18 Jun 2018 02:33:37 -0700 (PDT) Received: from [192.168.1.3] ([185.105.174.23]) by smtp.googlemail.com with ESMTPSA id z83-v6sm8482369wmb.8.2018.06.18.02.33.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Jun 2018 02:33:36 -0700 (PDT) Subject: Re: bug#18764: 24.4; electric-indent in *scratch* signals an error To: Eli Zaretskii , Noam Postavsky References: <83a94te85b.fsf@gnu.org> <8736xowzes.fsf@gmail.com> <83tvq3ynmv.fsf@gnu.org> <87d0wqvo4d.fsf@gmail.com> <83muvuzsc8.fsf@gnu.org> <87lgbetjdy.fsf@gmail.com> <83vaaixed1.fsf@gnu.org> From: Dmitry Gutov Message-ID: <772680b2-622b-6b67-3eb6-9baa02bd3621@yandex.ru> Date: Mon, 18 Jun 2018 12:33:34 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <83vaaixed1.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 18764 Cc: 18764@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 6/17/18 6:48 AM, Eli Zaretskii wrote: > I submit that any errors in code that tries to indent should be > suppressed, as they are not relevant to what the user wanted. If > those errors are important in other contexts, they will pop up there, > and can then decide what to do with them. That's going to make user complaints like "why it doesn't indent" or "it doesn't indent right" harder to debug and address. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 18 11:15:26 2018 Received: (at 18764) by debbugs.gnu.org; 18 Jun 2018 15:15:26 +0000 Received: from localhost ([127.0.0.1]:55149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fUvsM-00060L-Es for submit@debbugs.gnu.org; Mon, 18 Jun 2018 11:15:26 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33614) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fUvsL-000607-Et for 18764@debbugs.gnu.org; Mon, 18 Jun 2018 11:15:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fUvsC-0004UV-V5 for 18764@debbugs.gnu.org; Mon, 18 Jun 2018 11:15:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39978) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUvsC-0004UO-Ia; Mon, 18 Jun 2018 11:15:16 -0400 Received: from [176.228.60.248] (port=4447 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fUvsB-0002jc-Uo; Mon, 18 Jun 2018 11:15:16 -0400 Date: Mon, 18 Jun 2018 18:15:15 +0300 Message-Id: <83602gt9bw.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-reply-to: <772680b2-622b-6b67-3eb6-9baa02bd3621@yandex.ru> (message from Dmitry Gutov on Mon, 18 Jun 2018 12:33:34 +0300) Subject: Re: bug#18764: 24.4; electric-indent in *scratch* signals an error References: <83a94te85b.fsf@gnu.org> <8736xowzes.fsf@gmail.com> <83tvq3ynmv.fsf@gnu.org> <87d0wqvo4d.fsf@gmail.com> <83muvuzsc8.fsf@gnu.org> <87lgbetjdy.fsf@gmail.com> <83vaaixed1.fsf@gnu.org> <772680b2-622b-6b67-3eb6-9baa02bd3621@yandex.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 18764 Cc: npostavs@gmail.com, 18764@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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > Cc: 18764@debbugs.gnu.org > From: Dmitry Gutov > Date: Mon, 18 Jun 2018 12:33:34 +0300 > > On 6/17/18 6:48 AM, Eli Zaretskii wrote: > > > I submit that any errors in code that tries to indent should be > > suppressed, as they are not relevant to what the user wanted. If > > those errors are important in other contexts, they will pop up there, > > and can then decide what to do with them. > > That's going to make user complaints like "why it doesn't indent" or "it > doesn't indent right" harder to debug and address. IMO, this is a lesser evil. And if it turns out to be a real problem, we could always add a variable to control whether such errors are silently ignored. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 20 20:19:26 2018 Received: (at 18764) by debbugs.gnu.org; 21 Jun 2018 00:19:26 +0000 Received: from localhost ([127.0.0.1]:58088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fVnJu-0002Bf-1x for submit@debbugs.gnu.org; Wed, 20 Jun 2018 20:19:26 -0400 Received: from mail-it0-f51.google.com ([209.85.214.51]:54592) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fVnJr-0002Ao-Ef; Wed, 20 Jun 2018 20:19:23 -0400 Received: by mail-it0-f51.google.com with SMTP id 76-v6so2192560itx.4; Wed, 20 Jun 2018 17:19:23 -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; bh=Q2Re/iEG/1NJXA4EZb4H5waOwTDk1sh1//QZOOXTO5A=; b=p5lALNpXg3MLwdxT5Mv045cLm7u/DtmjqqNhtr2HuJiu3nwR2AQocqotwevaVonVP4 DACdNY0A7826aFmEOKpPdEA7Gi/jOJXtEys0H3Cx9Y6ofy6GOPfgw2xWSiohJK9nJUol EFwBMCI4uf5OYwceCrs9S4pA4OePugm96Vj/xzvU9b9/ugH04n6rwre7FUkm5YpilI58 XaLRUMKtBBAiFF8uayIXiGlln0ZinYNldd+7QanFQdC90lcNvDP7TOH1VAPjmBxiHWP7 aLF2NVLMed9EncwS/O6m0+nhNUkFd5EI9XYyQb+c5l+mNbcI58QSgnDCKeM81wxLkZy0 /W8g== 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; bh=Q2Re/iEG/1NJXA4EZb4H5waOwTDk1sh1//QZOOXTO5A=; b=srX8f0rkTBapBMOqKQfBm5oN2ooqzTEUZrhFSyRPS9I+LYjeV5ItLntMHdwbSjs6hl trQzKHoBfNE5urTaRVz5h3fd4z3xPuLWyHII4+rpny3jUu+hC5qGWjURbuZRwXYHFonn LaozptB8Bsk4RfOXlaoQR7PYJCYpe9wReKIcudN44iBFon+mWSr7mskbBSWOP253x+M6 H+k6pIXfACjPib0+J4fjZ3Tsho5IIiZJkoa+oNQCPzsRv87kPRJenfduT2UGAmSCDyy9 zsQVdb7h90CDJLCPPKmBNVYRs5zhnKwgoEatKVLrH7ym9azsPXjbZLnVyL47d5KCgsHJ Th3Q== X-Gm-Message-State: APt69E1pLmueqoCIhKiO/agwFfS3yVYcPkcf5V0sbf5S1Ijkphk3FkYU SJJv9TUmjJ4eiufmZWHVboQViA== X-Google-Smtp-Source: ADUXVKLW1k6Ovnm+W1k3tFfhFla5Q7vfvhmVgVEm8nqTmGh+svqgs1NrFEdJe6GsQzFVzQvE2a0wFQ== X-Received: by 2002:a24:470b:: with SMTP id t11-v6mr3485341itb.26.1529540358065; Wed, 20 Jun 2018 17:19:18 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id 63-v6sm1714464ioz.71.2018.06.20.17.19.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Jun 2018 17:19:17 -0700 (PDT) From: Noam Postavsky To: Eli Zaretskii Subject: Re: bug#18764: 24.4; electric-indent in *scratch* signals an error References: <83a94te85b.fsf@gnu.org> <8736xowzes.fsf@gmail.com> <83tvq3ynmv.fsf@gnu.org> <87d0wqvo4d.fsf@gmail.com> <83muvuzsc8.fsf@gnu.org> <87lgbetjdy.fsf@gmail.com> <83vaaixed1.fsf@gnu.org> <772680b2-622b-6b67-3eb6-9baa02bd3621@yandex.ru> <83602gt9bw.fsf@gnu.org> Date: Wed, 20 Jun 2018 20:19:16 -0400 In-Reply-To: <83602gt9bw.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 18 Jun 2018 18:15:15 +0300") Message-ID: <87zhzpq9dn.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18764 Cc: 18764@debbugs.gnu.org, Dmitry Gutov 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 (-) --=-=-= Content-Type: text/plain tags 18764 + patch quit Eli Zaretskii writes: >> That's going to make user complaints like "why it doesn't indent" or "it >> doesn't indent right" harder to debug and address. > > IMO, this is a lesser evil. And if it turns out to be a real problem, > we could always add a variable to control whether such errors are > silently ignored. We can be a little more discriminating than my initial blanket `ignore-errors', see commit message in the attached patch: --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=v2-0001-Suppress-indent-errors-during-electric-indentatio.patch Content-Description: patch >From 4aa45c829f8be801f626d169ac412185e5c9c509 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Wed, 20 Jun 2018 20:12:23 -0400 Subject: [PATCH v2] Suppress indent errors during electric indentation (Bug#18764) * lisp/electric.el (electric-indent-post-self-insert-function): Suppress errors from indent code, but don't suppress errors from elsewhere in this function. That way, if trouble is encountered with electric indent "not working", the error should be reproducible by calling indent directly (as is the case for Bug#18764), or else it's from the electric indent code and will be reported normally. --- lisp/electric.el | 59 ++++++++++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 25 deletions(-) diff --git a/lisp/electric.el b/lisp/electric.el index c00e7c00a5..7a998c0ff3 100644 --- a/lisp/electric.el +++ b/lisp/electric.el @@ -260,32 +260,41 @@ electric-indent-post-self-insert-function (or (memq act '(nil no-indent)) ;; In a string or comment. (unless (eq act 'do-indent) (nth 8 (syntax-ppss)))))))) - ;; For newline, we want to reindent both lines and basically behave like - ;; reindent-then-newline-and-indent (whose code we hence copied). - (let ((at-newline (<= pos (line-beginning-position)))) - (when at-newline - (let ((before (copy-marker (1- pos) t))) - (save-excursion - (unless (or (memq indent-line-function - electric-indent-functions-without-reindent) - electric-indent-inhibit) - ;; Don't reindent the previous line if the indentation function - ;; is not a real one. + ;; If we error during indent, give up, but don't suppress errors + ;; from elsewhere in *this* function (Bug#18764). + (catch 'indent-error + ;; For newline, we want to reindent both lines and basically + ;; behave like reindent-then-newline-and-indent (whose code we + ;; hence copied). + (let ((at-newline (<= pos (line-beginning-position)))) + (when at-newline + (let ((before (copy-marker (1- pos) t))) + (save-excursion + (unless (or (memq indent-line-function + electric-indent-functions-without-reindent) + electric-indent-inhibit) + ;; Don't reindent the previous line if the + ;; indentation function is not a real one. + (goto-char before) + (condition-case () + (indent-according-to-mode) + ((debug error) (throw 'indent-error nil)))) + ;; We are at EOL before the call to + ;; `indent-according-to-mode', and after it we usually + ;; are as well, but not always. We tried to address + ;; it with `save-excursion' but that uses a normal + ;; marker whereas we need `move after insertion', so + ;; we do the save/restore by hand. (goto-char before) - (indent-according-to-mode)) - ;; We are at EOL before the call to indent-according-to-mode, and - ;; after it we usually are as well, but not always. We tried to - ;; address it with `save-excursion' but that uses a normal marker - ;; whereas we need `move after insertion', so we do the - ;; save/restore by hand. - (goto-char before) - (when (eolp) - ;; Remove the trailing whitespace after indentation because - ;; indentation may (re)introduce the whitespace. - (delete-horizontal-space t))))) - (unless (and electric-indent-inhibit - (not at-newline)) - (indent-according-to-mode)))))) + (when (eolp) + ;; Remove the trailing whitespace after indentation because + ;; indentation may (re)introduce the whitespace. + (delete-horizontal-space t))))) + (unless (and electric-indent-inhibit + (not at-newline)) + (condition-case () + (indent-according-to-mode) + ((debug error) (throw 'indent-error nil))))))))) (put 'electric-indent-post-self-insert-function 'priority 60) -- 2.11.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 21 10:39:11 2018 Received: (at 18764) by debbugs.gnu.org; 21 Jun 2018 14:39:11 +0000 Received: from localhost ([127.0.0.1]:59253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fW0jv-0001cZ-8a for submit@debbugs.gnu.org; Thu, 21 Jun 2018 10:39:11 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43567) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fW0jt-0001cK-Kc for 18764@debbugs.gnu.org; Thu, 21 Jun 2018 10:39:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fW0jl-0004n0-4b for 18764@debbugs.gnu.org; Thu, 21 Jun 2018 10:39:04 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48855) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fW0jl-0004ms-0h; Thu, 21 Jun 2018 10:39:01 -0400 Received: from [176.228.60.248] (port=1460 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fW0jk-00015t-2f; Thu, 21 Jun 2018 10:39:00 -0400 Date: Thu, 21 Jun 2018 17:39:06 +0300 Message-Id: <83wousqk51.fsf@gnu.org> From: Eli Zaretskii To: Noam Postavsky In-reply-to: <87zhzpq9dn.fsf@gmail.com> (message from Noam Postavsky on Wed, 20 Jun 2018 20:19:16 -0400) Subject: Re: bug#18764: 24.4; electric-indent in *scratch* signals an error References: <83a94te85b.fsf@gnu.org> <8736xowzes.fsf@gmail.com> <83tvq3ynmv.fsf@gnu.org> <87d0wqvo4d.fsf@gmail.com> <83muvuzsc8.fsf@gnu.org> <87lgbetjdy.fsf@gmail.com> <83vaaixed1.fsf@gnu.org> <772680b2-622b-6b67-3eb6-9baa02bd3621@yandex.ru> <83602gt9bw.fsf@gnu.org> <87zhzpq9dn.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 18764 Cc: 18764@debbugs.gnu.org, dgutov@yandex.ru 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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Noam Postavsky > Cc: Dmitry Gutov , 18764@debbugs.gnu.org > Date: Wed, 20 Jun 2018 20:19:16 -0400 > > >> That's going to make user complaints like "why it doesn't indent" or "it > >> doesn't indent right" harder to debug and address. > > > > IMO, this is a lesser evil. And if it turns out to be a real problem, > > we could always add a variable to control whether such errors are > > silently ignored. > > We can be a little more discriminating than my initial blanket > `ignore-errors', see commit message in the attached patch: Fine with me, but I'd prefer a comment in the code explaining why we catch errors here. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 23 21:40:37 2018 Received: (at 18764) by debbugs.gnu.org; 24 Jun 2018 01:40:37 +0000 Received: from localhost ([127.0.0.1]:33561 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fWu16-0008G2-Ic for submit@debbugs.gnu.org; Sat, 23 Jun 2018 21:40:36 -0400 Received: from mail-io0-f175.google.com ([209.85.223.175]:33708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fWu13-0008Fo-LW for 18764@debbugs.gnu.org; Sat, 23 Jun 2018 21:40:34 -0400 Received: by mail-io0-f175.google.com with SMTP id d185-v6so9394006ioe.0 for <18764@debbugs.gnu.org>; Sat, 23 Jun 2018 18:40:33 -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; bh=PAAbO1ZMUn7xHM99qI2wSZM/A90SXAaDendZjXfp0ME=; b=n0v+rVoDa/UUGwG665XRb58yWPMB4Pzxm7fczIJTYvrRVOAH9/9mT44TWxfexSx2pk D+hVLUObPK20cHCgi+PwGv7YjhUsyWAeY2Ev65OniGoO6ai/z/I3awEft9wHl6aDklhK zKwIWMIgfJagCCLthbfK6dG7LIVYwGgZu50Vsh0WBstkDX91CDduByfWKKgQvf0y1nm0 pfsywpliTvDF645RatwpOtUoplVJxWkEmwefvygkRsJqtOcBZ2UbrWhigUFfOLNijPWI aSOweQWbU2IWskIy9zDJLljHtjzTqEsiL+10qmEOjEq5F4SPRMoj3eqVcT0L9P+TueL6 3VtA== 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; bh=PAAbO1ZMUn7xHM99qI2wSZM/A90SXAaDendZjXfp0ME=; b=PuKh2+mepvnhilXQ50YNVth0rZxwPpr1m8ZJvBTksMxp3UtBfSv/r+Uj3VNNSKYac0 0vdo1Zm4lRI/RFjY+H1s9w9wUPVVeeDsC8CQwNAJktTJOS/myScx6TTxhyBEyP/85AAo k7mBcTcSrOlHSCzIZa/DZecFs/4XcdryG9LbNtaheb7bzJhljrLFuQrjjhHcCEV/2bpj VGUCrH3hnC2eHBhK2P2cx5uuzHdvgTNq9HiJ2PxBprRdMGaHQ6/YncnL5CV7CrBq3rUM qWxmcxeb64Dhww0AEM7NP+YAIRlAIJ234dYdRWeG73uygPZ0xlvDMExfXov33iRNT19J 0tig== X-Gm-Message-State: APt69E2yHh1mhMGoA2CXfxHneGidHWOusWzZb/nEgd+rhQ0VoFKhwpQ8 Ywt1fmCOV7DqSiD4heavt0M= X-Google-Smtp-Source: AAOMgpc0wTkVpyV2ROg+VScJ3lS5/vWfL1WzWAO/Za/KAqexfXJA2QRid9crz9LMVqm9XTWknCkVvw== X-Received: by 2002:a6b:9944:: with SMTP id b65-v6mr5957055ioe.199.1529804428143; Sat, 23 Jun 2018 18:40:28 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id m3-v6sm4725427ioc.70.2018.06.23.18.40.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 23 Jun 2018 18:40:26 -0700 (PDT) From: Noam Postavsky To: Eli Zaretskii Subject: Re: bug#18764: 24.4; electric-indent in *scratch* signals an error References: <83a94te85b.fsf@gnu.org> <8736xowzes.fsf@gmail.com> <83tvq3ynmv.fsf@gnu.org> <87d0wqvo4d.fsf@gmail.com> <83muvuzsc8.fsf@gnu.org> <87lgbetjdy.fsf@gmail.com> <83vaaixed1.fsf@gnu.org> <772680b2-622b-6b67-3eb6-9baa02bd3621@yandex.ru> <83602gt9bw.fsf@gnu.org> <87zhzpq9dn.fsf@gmail.com> <83wousqk51.fsf@gnu.org> Date: Sat, 23 Jun 2018 21:40:25 -0400 In-Reply-To: <83wousqk51.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 21 Jun 2018 17:39:06 +0300") Message-ID: <8736xdq7w6.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18764 Cc: dgutov@yandex.ru, 18764@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 (-) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> We can be a little more discriminating than my initial blanket >> `ignore-errors', see commit message in the attached patch: > > Fine with me, but I'd prefer a comment in the code explaining why we > catch errors here. I added some more explanation in the comment over the `catch', and remembered to use condition-case-unless-debug. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=v3-0001-Suppress-indent-errors-during-electric-indentatio.patch Content-Description: patch >From 5daa803e6e00445570f66116f7ec4681cfdccb92 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Wed, 20 Jun 2018 20:12:23 -0400 Subject: [PATCH v3] Suppress indent errors during electric indentation (Bug#18764) * lisp/electric.el (electric-indent-post-self-insert-function): Suppress errors from indent code, but don't suppress errors from elsewhere in this function. That way, if trouble is encountered with electric indent "not working", the error should be reproducible by calling indent directly (as is the case for Bug#18764), or else it's from the electric indent code and will be reported normally. --- lisp/electric.el | 61 +++++++++++++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/lisp/electric.el b/lisp/electric.el index c00e7c00a5..a45faf2dbb 100644 --- a/lisp/electric.el +++ b/lisp/electric.el @@ -260,32 +260,43 @@ electric-indent-post-self-insert-function (or (memq act '(nil no-indent)) ;; In a string or comment. (unless (eq act 'do-indent) (nth 8 (syntax-ppss)))))))) - ;; For newline, we want to reindent both lines and basically behave like - ;; reindent-then-newline-and-indent (whose code we hence copied). - (let ((at-newline (<= pos (line-beginning-position)))) - (when at-newline - (let ((before (copy-marker (1- pos) t))) - (save-excursion - (unless (or (memq indent-line-function - electric-indent-functions-without-reindent) - electric-indent-inhibit) - ;; Don't reindent the previous line if the indentation function - ;; is not a real one. + ;; If we error during indent, silently give up since this is an + ;; automatic action that the user didn't explicitly request. + ;; But we don't want to suppress errors from elsewhere in *this* + ;; function, hence the `condition-case' and `throw' (Bug#18764). + (catch 'indent-error + ;; For newline, we want to reindent both lines and basically + ;; behave like reindent-then-newline-and-indent (whose code we + ;; hence copied). + (let ((at-newline (<= pos (line-beginning-position)))) + (when at-newline + (let ((before (copy-marker (1- pos) t))) + (save-excursion + (unless (or (memq indent-line-function + electric-indent-functions-without-reindent) + electric-indent-inhibit) + ;; Don't reindent the previous line if the + ;; indentation function is not a real one. + (goto-char before) + (condition-case-unless-debug () + (indent-according-to-mode) + (error (throw 'indent-error nil)))) + ;; We are at EOL before the call to + ;; `indent-according-to-mode', and after it we usually + ;; are as well, but not always. We tried to address + ;; it with `save-excursion' but that uses a normal + ;; marker whereas we need `move after insertion', so + ;; we do the save/restore by hand. (goto-char before) - (indent-according-to-mode)) - ;; We are at EOL before the call to indent-according-to-mode, and - ;; after it we usually are as well, but not always. We tried to - ;; address it with `save-excursion' but that uses a normal marker - ;; whereas we need `move after insertion', so we do the - ;; save/restore by hand. - (goto-char before) - (when (eolp) - ;; Remove the trailing whitespace after indentation because - ;; indentation may (re)introduce the whitespace. - (delete-horizontal-space t))))) - (unless (and electric-indent-inhibit - (not at-newline)) - (indent-according-to-mode)))))) + (when (eolp) + ;; Remove the trailing whitespace after indentation because + ;; indentation may (re)introduce the whitespace. + (delete-horizontal-space t))))) + (unless (and electric-indent-inhibit + (not at-newline)) + (condition-case-unless-debug () + (indent-according-to-mode) + (error (throw 'indent-error nil))))))))) (put 'electric-indent-post-self-insert-function 'priority 60) -- 2.11.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 24 10:53:17 2018 Received: (at 18764) by debbugs.gnu.org; 24 Jun 2018 14:53:17 +0000 Received: from localhost ([127.0.0.1]:34028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fX6OD-0007Xa-0E for submit@debbugs.gnu.org; Sun, 24 Jun 2018 10:53:17 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60863) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fX6O8-0007XJ-Bz for 18764@debbugs.gnu.org; Sun, 24 Jun 2018 10:53:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fX6O2-0001Tc-G4 for 18764@debbugs.gnu.org; Sun, 24 Jun 2018 10:53:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54856) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fX6Nu-0001M3-9F; Sun, 24 Jun 2018 10:52:58 -0400 Received: from [176.228.60.248] (port=1164 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fX6Nt-0001Te-MM; Sun, 24 Jun 2018 10:52:58 -0400 Date: Sun, 24 Jun 2018 17:52:55 +0300 Message-Id: <83bmc0tewo.fsf@gnu.org> From: Eli Zaretskii To: Noam Postavsky In-reply-to: <8736xdq7w6.fsf@gmail.com> (message from Noam Postavsky on Sat, 23 Jun 2018 21:40:25 -0400) Subject: Re: bug#18764: 24.4; electric-indent in *scratch* signals an error References: <83a94te85b.fsf@gnu.org> <8736xowzes.fsf@gmail.com> <83tvq3ynmv.fsf@gnu.org> <87d0wqvo4d.fsf@gmail.com> <83muvuzsc8.fsf@gnu.org> <87lgbetjdy.fsf@gmail.com> <83vaaixed1.fsf@gnu.org> <772680b2-622b-6b67-3eb6-9baa02bd3621@yandex.ru> <83602gt9bw.fsf@gnu.org> <87zhzpq9dn.fsf@gmail.com> <83wousqk51.fsf@gnu.org> <8736xdq7w6.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 18764 Cc: dgutov@yandex.ru, 18764@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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Noam Postavsky > Cc: 18764@debbugs.gnu.org, dgutov@yandex.ru > Date: Sat, 23 Jun 2018 21:40:25 -0400 > > > Fine with me, but I'd prefer a comment in the code explaining why we > > catch errors here. > > I added some more explanation in the comment over the `catch', and > remembered to use condition-case-unless-debug. LGTM, thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 25 19:21:07 2018 Received: (at 18764) by debbugs.gnu.org; 25 Jun 2018 23:21:07 +0000 Received: from localhost ([127.0.0.1]:35414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fXanD-0002Jk-GK for submit@debbugs.gnu.org; Mon, 25 Jun 2018 19:21:07 -0400 Received: from mail-it0-f42.google.com ([209.85.214.42]:33049) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fXanB-0002Io-76; Mon, 25 Jun 2018 19:21:05 -0400 Received: by mail-it0-f42.google.com with SMTP id k17-v6so13658422ita.0; Mon, 25 Jun 2018 16:21:05 -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; bh=TfhtxGKFDq7VCNa6+4dQAXHBzCrJo/uClcy/655NWzA=; b=e9MDCdAuRL7fF4nAtQfqRk5mrCYMu3Jhj9v0sVyMcc9wQhNfmPDKw96fYo6IPF0bGB a53v/VpAqvXj9b4aOJUS1ftqqsiGTcPBp9wrbONCKscO0xN0scBQH2YOSSVBaeaRN2pz JA91c6tPQP9MpKEDF59vxqvevjGJ5S09YybVyNWUDDlwYfC7WOZ0xxpItbtQ0sKCI8zH fXb35HyjCj4YcQOnNY9edBrQRqkeL1yCRRnYnjBx7NUWgs45xObegn8mUu5R9PoLz0bf P5dhXyhrX8CCJ057PSlK5Pl1iFAwat063tCDVcZdd5Ji/7/vM5oSLntzEfO3WooNuz0K GFmg== 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; bh=TfhtxGKFDq7VCNa6+4dQAXHBzCrJo/uClcy/655NWzA=; b=dkMYTyTirvt85BURCzhLVeqlhowyG/SY1+jjRgjKspccboYWSPapH4Bz/wcxcHZty/ C2VyZ5LnY+PEPjlisw4+kDJKapsN6cHMHBAT+z+ezfS7ZM0Y3lA8HDkZbAtXdMRY6pkW zRnw01WiDvEzmxr3izFYXwaFrEZka4HsereQ5O1nSW9s2IgY4EAQACFD/AbuGqA9eDoL 89jqqrjf2PwJS0p9/axg7IM2eI3aHuL8Jx/9DhE8MlTjSeoBDdIs42Vvx/5l7lAwY1OA dYEDSLee6SSzshtabSMtM1bME/A8X8DrvUGDXPGDeMNMTOiM64JGYjypvsuHIxZRPqX/ W/oQ== X-Gm-Message-State: APt69E3M6Js8hsB03dBnTc60hv82eJypBK0h7IetxIvf2Zh0fzq4WbyO fSFGVWOOHkuIxBUkqIVMSdB6sA== X-Google-Smtp-Source: AAOMgpeTZrdXnG++kBiAE2xjAAIwO5dBO+Qa9tPkFYg+PYHtgefoUXSx0Co/IYcoaCyaDHLNKJVzSQ== X-Received: by 2002:a02:565a:: with SMTP id o87-v6mr11918066jab.81.1529968859495; Mon, 25 Jun 2018 16:20:59 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id j12-v6sm245476itb.26.2018.06.25.16.20.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jun 2018 16:20:58 -0700 (PDT) From: Noam Postavsky To: Eli Zaretskii Subject: Re: bug#18764: 24.4; electric-indent in *scratch* signals an error References: <83a94te85b.fsf@gnu.org> <8736xowzes.fsf@gmail.com> <83tvq3ynmv.fsf@gnu.org> <87d0wqvo4d.fsf@gmail.com> <83muvuzsc8.fsf@gnu.org> <87lgbetjdy.fsf@gmail.com> <83vaaixed1.fsf@gnu.org> <772680b2-622b-6b67-3eb6-9baa02bd3621@yandex.ru> <83602gt9bw.fsf@gnu.org> <87zhzpq9dn.fsf@gmail.com> <83wousqk51.fsf@gnu.org> <8736xdq7w6.fsf@gmail.com> <83bmc0tewo.fsf@gnu.org> Date: Mon, 25 Jun 2018 19:20:56 -0400 In-Reply-To: <83bmc0tewo.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 24 Jun 2018 17:52:55 +0300") Message-ID: <87o9fypi5j.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18764 Cc: 18764@debbugs.gnu.org, dgutov@yandex.ru 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 (-) tags 18764 fixed close 18764 27.1 quit Eli Zaretskii writes: >> From: Noam Postavsky >> Cc: 18764@debbugs.gnu.org, dgutov@yandex.ru >> Date: Sat, 23 Jun 2018 21:40:25 -0400 >> >> > Fine with me, but I'd prefer a comment in the code explaining why we >> > catch errors here. >> >> I added some more explanation in the comment over the `catch', and >> remembered to use condition-case-unless-debug. > > LGTM, thanks. Pushed to master. [1: c71fb6b0cd]: 2018-06-25 19:18:55 -0400 Suppress indent errors during electric indentation (Bug#18764) https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=c71fb6b0cdb7043e2828a6843496ab20f4577cbb From unknown Tue Aug 19 12:49:10 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, 24 Jul 2018 11:24:07 +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