From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#28280: Maximally unhelpful diagnostic message. Date: Sun, 17 Sep 2017 22:35:44 -0700 Organization: UCLA Computer Science Department Message-ID: <914cb27e-1120-398b-b4ea-bc35dc37fe40@cs.ucla.edu> References: <20170829184140.GA4339@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------4DE993FF701D32FAAA2107D2" X-Trace: blaine.gmane.org 1505712971 26303 195.159.176.226 (18 Sep 2017 05:36:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 18 Sep 2017 05:36:11 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 Cc: 28280@debbugs.gnu.org To: John Wiegley Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 18 07:36:07 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dtoiy-0006bz-Sq for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Sep 2017 07:36:05 +0200 Original-Received: from localhost ([::1]:34750 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtoj6-0007bl-7j for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Sep 2017 01:36:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38293) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtoiz-0007bR-KH for bug-gnu-emacs@gnu.org; Mon, 18 Sep 2017 01:36:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dtoiw-0005ZS-HM for bug-gnu-emacs@gnu.org; Mon, 18 Sep 2017 01:36:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36809) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dtoiw-0005ZO-D4 for bug-gnu-emacs@gnu.org; Mon, 18 Sep 2017 01:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dtoiw-00051N-1L for bug-gnu-emacs@gnu.org; Mon, 18 Sep 2017 01:36:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <20170829184140.GA4339@ACM> Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Sep 2017 05:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28280 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28280-submit@debbugs.gnu.org id=B28280.150571295319287 (code B ref 28280); Mon, 18 Sep 2017 05:36:01 +0000 Original-Received: (at 28280) by debbugs.gnu.org; 18 Sep 2017 05:35:53 +0000 Original-Received: from localhost ([127.0.0.1]:45490 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dtoim-000510-NT for submit@debbugs.gnu.org; Mon, 18 Sep 2017 01:35:52 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:56002) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dtoil-00050o-JJ for 28280@debbugs.gnu.org; Mon, 18 Sep 2017 01:35:52 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 0C3EA162FE0; Sun, 17 Sep 2017 22:35:46 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ziFJpBq0q8nY; Sun, 17 Sep 2017 22:35:45 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 2AECD162FE1; Sun, 17 Sep 2017 22:35:45 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 2hHjWrQVD-53; Sun, 17 Sep 2017 22:35:45 -0700 (PDT) Original-Received: from [192.168.1.9] (unknown [47.154.18.85]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 06BE1162FE0; Sun, 17 Sep 2017 22:35:45 -0700 (PDT) Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:137046 Archived-At: This is a multi-part message in MIME format. --------------4DE993FF701D32FAAA2107D2 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit > GM> A few seconds grep suggests this is due to the code in newline, added ~ 3 > GM> years ago in 62ee8b1 ("Add assertions to try and help catch bug#18913"). > GM> The complete lack of progress in that report since then suggests it may be > GM> time to remove/downgrade those assertions. > > Agreed. Make sense, so I installed the attached into emacs-26. --------------4DE993FF701D32FAAA2107D2 Content-Type: text/x-patch; name="0001-Remove-old-cl-assert-calls-in-newline.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Remove-old-cl-assert-calls-in-newline.patch" >From 81b3261b0324137b7c8c05353227673f18264849 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 17 Sep 2017 22:32:31 -0700 Subject: [PATCH] Remove old cl-assert calls in 'newline' * lisp/simple.el (newline): Remove cl-assert calls that didn't seem to be helping us debug Bug#18913, and that caused problems as reported in Bug#28280. Suggested by Glenn Morris (Bug#28280#8). --- lisp/simple.el | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index 1ffe181..4e42fd5 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -434,10 +434,6 @@ newline ;; Do the rest in post-self-insert-hook, because we want to do it ;; *before* other functions on that hook. (lambda () - ;; We are not going to insert any newlines if arg is - ;; non-positive. - (or (and (numberp arg) (<= arg 0)) - (cl-assert (eq ?\n (char-before)))) ;; Mark the newline(s) `hard'. (if use-hard-newlines (set-hard-newline-properties @@ -456,25 +452,22 @@ newline ;; starts a page. (or was-page-start (move-to-left-margin nil t))))) - (unwind-protect - (if (not interactive) - ;; FIXME: For non-interactive uses, many calls actually - ;; just want (insert "\n"), so maybe we should do just - ;; that, so as to avoid the risk of filling or running - ;; abbrevs unexpectedly. - (let ((post-self-insert-hook (list postproc))) - (self-insert-command arg)) - (unwind-protect - (progn - (add-hook 'post-self-insert-hook postproc nil t) - (self-insert-command arg)) - ;; We first used let-binding to protect the hook, but that - ;; was naive since add-hook affects the symbol-default - ;; value of the variable, whereas the let-binding might - ;; only protect the buffer-local value. - (remove-hook 'post-self-insert-hook postproc t))) - (cl-assert (not (member postproc post-self-insert-hook))) - (cl-assert (not (member postproc (default-value 'post-self-insert-hook)))))) + (if (not interactive) + ;; FIXME: For non-interactive uses, many calls actually + ;; just want (insert "\n"), so maybe we should do just + ;; that, so as to avoid the risk of filling or running + ;; abbrevs unexpectedly. + (let ((post-self-insert-hook (list postproc))) + (self-insert-command arg)) + (unwind-protect + (progn + (add-hook 'post-self-insert-hook postproc nil t) + (self-insert-command arg)) + ;; We first used let-binding to protect the hook, but that + ;; was naive since add-hook affects the symbol-default + ;; value of the variable, whereas the let-binding might + ;; only protect the buffer-local value. + (remove-hook 'post-self-insert-hook postproc t)))) nil) (defun set-hard-newline-properties (from to) -- 2.7.4 --------------4DE993FF701D32FAAA2107D2--