From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#18913: 24.4.51; point going back to bol after every insertion Date: Fri, 31 Oct 2014 16:27:34 -0400 Message-ID: References: <87ioj1sr0y.fsf@yahoo.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1414789050 19275 80.91.229.3 (31 Oct 2014 20:57:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 31 Oct 2014 20:57:30 +0000 (UTC) Cc: 18913@debbugs.gnu.org To: Nicolas Richard Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 31 21:57:23 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XkJG3-0007ii-OO for geb-bug-gnu-emacs@m.gmane.org; Fri, 31 Oct 2014 21:57:19 +0100 Original-Received: from localhost ([::1]:43571 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XkJAh-0005T0-Sk for geb-bug-gnu-emacs@m.gmane.org; Fri, 31 Oct 2014 16:51:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XkInq-0001mq-Nw for bug-gnu-emacs@gnu.org; Fri, 31 Oct 2014 16:28:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XkInj-0005FX-8l for bug-gnu-emacs@gnu.org; Fri, 31 Oct 2014 16:28:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46908) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XkIni-0005FM-Um for bug-gnu-emacs@gnu.org; Fri, 31 Oct 2014 16:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XkIni-0007C2-Fx for bug-gnu-emacs@gnu.org; Fri, 31 Oct 2014 16:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 Oct 2014 20:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18913 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18913-submit@debbugs.gnu.org id=B18913.141478726427623 (code B ref 18913); Fri, 31 Oct 2014 20:28:02 +0000 Original-Received: (at 18913) by debbugs.gnu.org; 31 Oct 2014 20:27:44 +0000 Original-Received: from localhost ([127.0.0.1]:44121 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XkInP-0007BL-BV for submit@debbugs.gnu.org; Fri, 31 Oct 2014 16:27:43 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:6301) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XkInN-0007B8-6l for 18913@debbugs.gnu.org; Fri, 31 Oct 2014 16:27:41 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvAMAOatTlRFpY87/2dsb2JhbABcgw6DYoZ+yDmDGgQCAoEcFwEBfIQDAQEDAVYjBQsLNBIUGA0kiEsJy3IBAQEBAQEEAQEBAR6RCAeESwWyIIFvhBQhgnoBAQE X-IPAS-Result: AvAMAOatTlRFpY87/2dsb2JhbABcgw6DYoZ+yDmDGgQCAoEcFwEBfIQDAQEDAVYjBQsLNBIUGA0kiEsJy3IBAQEBAQEEAQEBAR6RCAeESwWyIIFvhBQhgnoBAQE X-IronPort-AV: E=Sophos;i="5.04,797,1406606400"; d="scan'208";a="95698092" Original-Received: from 69-165-143-59.dsl.teksavvy.com (HELO pastel.home) ([69.165.143.59]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 31 Oct 2014 16:27:35 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id F2AA162BA; Fri, 31 Oct 2014 16:27:34 -0400 (EDT) In-Reply-To: <87ioj1sr0y.fsf@yahoo.fr> (Nicolas Richard's message of "Thu, 30 Oct 2014 13:03:57 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:95332 > I found myself in the situation where cursor would go to bol after every > character I would insert. Could you rebuild with the patch below (and run with debug-on-error enabled) and see if you can get those asserts to trigger, which would give us some information about how/when this happens. Stefan === modified file 'lisp/simple.el' --- lisp/simple.el 2014-08-18 15:20:27 +0000 +++ lisp/simple.el 2014-10-31 20:25:11 +0000 @@ -28,6 +28,8 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) + (declare-function widget-convert "wid-edit" (type &rest args)) (declare-function shell-mode "shell" ()) @@ -428,6 +430,7 @@ ;; 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 @@ -441,7 +444,9 @@ ;; 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)))) + (remove-hook 'post-self-insert-hook postproc))) + (cl-assert (not (member postproc post-self-insert-hook))) + (cl-assert (not (member postproc (default-value 'post-self-insert-hook)))))) nil) (defun set-hard-newline-properties (from to)