From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stefan-W. Hahn" Newsgroups: gmane.emacs.devel Subject: Re: Sudden jumping point in buffer. Probably a bug? Date: Thu, 31 Dec 2015 14:04:18 +0100 Organization: -no organization- Message-ID: <20151231130418.GA16388@scotty.home> References: <20151118183555.GI5776@scotty.home> <83a8qb9m81.fsf@gnu.org> <564CCA00.6030907@yandex.ru> <20151124190722.GA13848@scotty.home> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: ger.gmane.org 1451567097 5618 80.91.229.3 (31 Dec 2015 13:04:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Dec 2015 13:04:57 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Gutov , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 31 14:04:48 2015 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 1aEcuO-0001X5-Fq for ged-emacs-devel@m.gmane.org; Thu, 31 Dec 2015 14:04:48 +0100 Original-Received: from localhost ([::1]:55725 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aEcuK-0007F1-Ia for ged-emacs-devel@m.gmane.org; Thu, 31 Dec 2015 08:04:44 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39768) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aEcu6-0007Eg-T9 for emacs-devel@gnu.org; Thu, 31 Dec 2015 08:04:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aEcu5-0004P9-U1 for emacs-devel@gnu.org; Thu, 31 Dec 2015 08:04:30 -0500 Original-Received: from mout.kundenserver.de ([217.72.192.74]:58131) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aEcu1-0004Nr-Mz; Thu, 31 Dec 2015 08:04:25 -0500 Original-Received: from scotty.home ([92.193.53.38]) by mrelayeu.kundenserver.de (mreue103) with ESMTPSA (Nemesis) id 0MK4If-1aDFK61SJ3-001VV4; Thu, 31 Dec 2015 14:04:23 +0100 Original-Received: from scotty.home (hs@localhost [127.0.0.1]) by scotty.home (8.14.4/8.14.4/Debian-4) with ESMTP id tBVD4JxO004690 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 31 Dec 2015 14:04:19 +0100 Original-Received: (from hs@localhost) by scotty.home (8.14.4/8.14.4/Submit) id tBVD4IC8004688; Thu, 31 Dec 2015 14:04:18 +0100 X-Authentication-Warning: scotty.home: hs set sender to stefan.hahn@s-hahn.de using -f Content-Disposition: inline In-Reply-To: <20151124190722.GA13848@scotty.home> X-Mailer: Mutt http://www.mutt.org/ X-Editor: GNU Emacs http://www.gnu.org/ X-Accept-Language: de en X-Location: Europe, Germany, Wolfenbuettel X-GPG-Public-Key: gpg --keyserver pool.sks-keyservers.net --recv-keys 7A948D9CB5F0706D X-GPG-Fingerprint: 0x7A948D9CB5F0706D / 270E F64C 748A E880 9CB7 3D9B 7A94 8D9C B5F0 706D User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.98.7 at scotty X-Virus-Status: Clean X-Provags-ID: V03:K0:G/cWVrbfgjstHjq8YKU13rD/wCfGRXbtHVFJMiGuPan+vMU7Y6Z sOgqeWd6E5k/QSaa9OvNpVhv2CG2VVBqfb3axX1MkHLthsnR9e21uiJxYFRnhHbSUotblpD AXNlfBjawkjzO641+fVTYYJ8ATiQH9VkLTPb0+NhznJJ1uyZKbXaaRcMfCRAeQDTs0lW/Ca hVEx2xeGJcdtBin6XAIcA== X-UI-Out-Filterresults: notjunk:1;V01:K0:GcLVRxffrYI=:4Af+00qqboYv9f0dPGaARt Oh+4rA5NVW6ouq9cXBcA1lpoJUeApt7CtDZvpbkQT2iYxTnfTfRaPHjDRPfQdiFSB7uAjXpRu 4JD1ZfVwbvE49OQcf+6VzEml7EmLq5QA5CyfHqwMzXsJ39saWRhz+HjNQ7EQarw6PmMfKyXti Rh6nwhuR8l5sLdUVRGHaDVnaYFrQhFnuenGDgP447zJg2DayM9J3iOq3+0yJLgIeJQyUNE3qp v9Kw7xuY4GgwsN9iAJj7Cfs22QIfgDOI/oeBaLkeW2StE1DwZKEVIbb0hhoxzN7jPamoSXtRn liEmJHtucLZtn6WmeshmKSP7DW/uxmospADEHPi4EF2rI8ajxsb7103+5aHNnr2w+wce64uzy 8EY4OqCq4eaOR9oTaKPl3h5ut1PDnzCsuJleG8S33xTggXcUNWeGPDIQc4UbsdfZFMZtNe+uY /KCCzkYPEyiVCteTeI3CjxdjjYIOc73HjwBs8b8bpQP95st664o21xxl3+mtUCZfLzGgzXvmT yBDAr2xhMRx7qY4L4bYg9sghc8IJ1rISMX2wj5Z5kKIz9L8Hjl0TNWQDGTVYAH843/JzcD9gd dWF84GG+DjUXRMDXbzCewhhncZ8eVXm5LNQ4nvsBArszla2yjiJUz2qkI0V4xdg/KzK6xymwK 0x00fcat1DsjtsMqlEFSGUVRMI1D/KvaPs1bZjAZ2U8EXn9Eh5twY3SLt1hd18LRoyWI= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.72.192.74 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:197253 Archived-At: Mail von Stefan-W. Hahn, Tue, 24 Nov 2015 at 20:07:22 +0100: Hello, > > >>I'm using emacs as 64 bit compiled on windows 7/64 and linux 64 bit. Since > > >>quite a while I have the problem that, while typing, the cursor (point) is > > >>sometimes suddenly jumping to another position in buffer. > > > > > >Does this happen in "emacs -Q"? If not, look for a deviant timer or a > > I tried this and it doesn't happen. But this does not say anthing because it > is not reproducible anyway. after trying to catch the problem with debugging outputs at several positions I think I have found the cause: I wrapped post-command-hook first, but these hook functions seem innocent. But I observed in *Message* an "auto save" message every time the cursor was jumping. So I wrapped auto-save-hook which is set to '(semanticdb-save-all-db-idle tramp-set-auto-save-file-modes) in my case. With this I found that the cursor was jumping inside semanticdb-save-all-db-idle. While investigating I found that the same problem was already described in Bug#15045. If this is again the place where the problem happens, then it is obvious why it is not reproducible so easy. Together with commit 599ca626d760215b090012c69c749d391cfd6fbe Author: Stefan Monnier Date: Wed Mar 25 09:47:12 2015 -0400 `save-excursion' does not save&restore the mark any more it seems to have another side effects after the change of save-excursion behaviour. To test it I will try following change in semantic-throw-on-input: diff --git a/lisp/cedet/semantic/fw.el b/lisp/cedet/semantic/fw.el index d8ba6f2..cf1327f 100644 --- a/lisp/cedet/semantic/fw.el +++ b/lisp/cedet/semantic/fw.el @@ -392,7 +392,7 @@ semantic-throw-on-input ;; Timers might run during accept-process-output. ;; If they redisplay, point must be where the user ;; expects. (Bug#15045) - (save-excursion + (save-mark-and-excursion (goto-char semantic--on-input-start-marker) (accept-process-output))))) (throw semantic-current-input-throw-symbol ,from))) With kind regards, Stefan -- Stefan-W. Hahn It is easy to make things. It is hard to make things simple.