From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lele Gaifax Newsgroups: gmane.emacs.devel Subject: Weird behaviour in current Emacs master Date: Fri, 18 Apr 2014 20:55:29 +0200 Organization: Nautilus Entertainments Message-ID: <87k3amqxge.fsf@nautilus.nautilus> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1397847364 26483 80.91.229.3 (18 Apr 2014 18:56:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Apr 2014 18:56:04 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 18 20:55:57 2014 Return-path: Envelope-to: ged-emacs-devel@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 1WbDx6-0002mZ-Pq for ged-emacs-devel@m.gmane.org; Fri, 18 Apr 2014 20:55:57 +0200 Original-Received: from localhost ([::1]:39371 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WbDx6-0008FG-GD for ged-emacs-devel@m.gmane.org; Fri, 18 Apr 2014 14:55:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38382) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WbDwz-00083v-8r for emacs-devel@gnu.org; Fri, 18 Apr 2014 14:55:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WbDwu-0005xE-BK for emacs-devel@gnu.org; Fri, 18 Apr 2014 14:55:49 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:40873) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WbDwu-0005ws-0I for emacs-devel@gnu.org; Fri, 18 Apr 2014 14:55:44 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WbDwr-0002PH-Td for emacs-devel@gnu.org; Fri, 18 Apr 2014 20:55:41 +0200 Original-Received: from 151.62.6.184 ([151.62.6.184]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 18 Apr 2014 20:55:41 +0200 Original-Received: from lele by 151.62.6.184 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 18 Apr 2014 20:55:41 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 72 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 151.62.6.184 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) Cancel-Lock: sha1:ZfXhi2ym9oUg7B8Df3GrXW+y9lk= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:171491 Archived-At: Hi all, today I spent a few hours investigating a very strange behaviour I got with current Emacs trunk, that I will try to explain. Some context: at work I have an Ubuntu desktop, where I use the https://launchpad.net/~ubuntu-elisp/+archive/ppa Emacs package, rebuilt every day from the master repository. This morning I did update the system because I planned to upgrade it in the evening to the just released 14.04 version, so I got latest Emacs and used it. In the afternoon, editing a very simple HTML snippet, the strange thing happened. I was able to replicate it with the following very simple code in the buffer, where "^" is the "point": ^
When I insert "", the last char (that is, ">"), triggers the strange thing: in my case it immediately jumps to the eye because I have hl-line-mode active, so the remaining part of the buffer is highlighted, that is, from the end of the second line to the end of the third line, including the "" text: effectively, a C-a brings the cursor on the first column of the second line, a C-e brings it to the end of the third line! I first tried to recompile Emacs by myself, with the very same results. Then I discovered that it must be something in the minor modes that my configuration activates, because "emacs -Q" does not exhibit the problem. Gosh... :-( Back at home, I was pleased to find that my installation there was working without problems and thankfully I compiled it just a five days ago, so I restarted the investigation. I pulled and recompiled latest version and effectively the problem appeared. While writing this post I then tried to bisect the problem and eventually identified it with the following changeset: commit 00cbdba426ab08964ee8eae14a890945df33b595 Author: Eli Zaretskii Date: Mon Apr 14 18:32:27 2014 +0300 Fix bidirectional redisplay when deletion creates a paragraph start. src/insdel.c (invalidate_buffer_caches): When deleting or replacing text, invalidate the bidi_paragraph_cache upto and including the preceding newline. The buffer is in html-mode major mode, and this is the list of activated minor modes: Enabled minor modes: Auto-Composition Auto-Compression Auto-Encryption Auto-Fill Auto-Insert Column-Number Electric-Indent Electric-Pair File-Name-Shadow Flyspell Font-Lock Global-Auto-Complete Global-Font-Lock Hl-Line Jabber-Activity Line-Number Mouse-Wheel Shell-Dirtrack Show-Paren Subword Transient-Mark Whitespace Whitespace-Cleanup Winner Yas Yas-Global Apparently, neither html-mode nor hl-line-mode are involved, because the problem happens also in fundamental-mode with the latter minor disabled. Is there anything I can do to help you understand what's going wrong? I could try "bisecting" the activation of all those minor modes... but maybe you have some better hint on how to proceed. Thank you in advance for any advice, ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. lele@metapensiero.it | -- Fortunato Depero, 1929.