From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Andreas_R=c3=b6hler?= Newsgroups: gmane.emacs.devel Subject: Re: Problems with syntax-ppss: Was [... Apply `comment-depth' text properties when calling `back_comment'.] Date: Sat, 12 Mar 2016 21:19:54 +0100 Message-ID: <56E479EA.5010306@online.de> References: <20160308200753.GC6269@acm.fritz.box> <20160309104900.GA3948@acm.fritz.box> <20160309141930.GC3948@acm.fritz.box> <20160309193758.GH3948@acm.fritz.box> <20160310130156.GA4831@acm.fritz.box> <56E27355.4000707@online.de> <20160311120808.GA2888@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1457813937 6142 80.91.229.3 (12 Mar 2016 20:18:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 12 Mar 2016 20:18:57 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 12 21:18:47 2016 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 1aepzq-0006Jm-Rc for ged-emacs-devel@m.gmane.org; Sat, 12 Mar 2016 21:18:47 +0100 Original-Received: from localhost ([::1]:33276 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aepzm-00088r-NE for ged-emacs-devel@m.gmane.org; Sat, 12 Mar 2016 15:18:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aepzj-00088c-4t for emacs-devel@gnu.org; Sat, 12 Mar 2016 15:18:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aepzf-0007Qo-VE for emacs-devel@gnu.org; Sat, 12 Mar 2016 15:18:39 -0500 Original-Received: from mout.kundenserver.de ([217.72.192.75]:63181) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aepzf-0007Q7-Lj for emacs-devel@gnu.org; Sat, 12 Mar 2016 15:18:35 -0500 Original-Received: from [192.168.178.35] ([77.12.31.77]) by mrelayeu.kundenserver.de (mreue104) with ESMTPSA (Nemesis) id 0M4HbP-1Zow3o3SE7-00rqiG; Sat, 12 Mar 2016 21:18:31 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Icedove/38.5.0 In-Reply-To: <20160311120808.GA2888@acm.fritz.box> X-Provags-ID: V03:K0:frBHoOwOBOvfKF1XYi0qjBaOkpOuLkhHOL8yZNBwUbNZ75AnURz nMxJF5R5PmWZs0KVRQd0PwLgieGGL+yCURujEoMtftGMCQSKjVNfRUubZhG5S2+841W9I57 WoKEzsX2Lfryxa9NQ2WsoqHWHJ4ZBcTLnEIGAX2KygiWEMfzyxkb7BM+qxN/Ko5qPwo+sH+ ky9VBoyQE64XqCmgBpCqg== X-UI-Out-Filterresults: notjunk:1;V01:K0:bgCaDbizSno=:6azFyRQN3re71/2JRtmlbR sG2+yVxHGgf5E/OhGZES2x0WPE7fyrnbazdJ4UYau1mD4mZs80RURn6nqCz9ciLXFcmuAKc1j vralf2fA1TB0BPXsh3R0+cwH31jUfzd7Fo0cOdZ4NboEgFcboCGMAwjBO5UoGPVSzuUK+LxPy sr981r7lDFrGQnSJSFMfhhX3VtUaOsMG6oxhATeUF0w1aqs+ZTVcnjmMyFrwaSuREAIaKQGg1 MCvppo6biW6K4ISRvoLzy/QrLyinqhGy0HousNsNs7JrLudEXU5VzcIjtz+hBtG1kxIO06lMc BlY+gV1IrqjmnAXPKzOCcePW89HDqQYqrdBcIUNDHPcHGXzZ7HXj0+Mds2o4JTHW55kn2+d2C w/NDxztEhrRc3SZMOu9HJwq6WNDwiJFGdpvulYU4lpjbyWa/JY0gXKBEIcCCVyMCNOUb9pzxd z1ee8v+3CSkUUk5DqUKrbAn6HUKGX+102pJ5G+aX+Gbnq2VU5BbFo4OS+VUu5nSoQlaeDSk4B BmXXNIpQlEGsCxvx+NV8egy+vp0pO0991UVeALj2rdhU3SNwu3L77ZN//90FgU/AvraK5cMG7 qZgbj6jcy7zwR1Mjj45qM4LVnsXVhny73X3eA++gawKKXRj3qg0qwTNgPkAkipeebHuHFivME LGZkVoc8+/PqvfHFtx/6/2IDD8teELCKStyPN5ODQymumSHIDmIYTd1EX5YBj9C63lG1PyGSS bmhbnhYLKBnHS+wV X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.72.192.75 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:201549 Archived-At: On 11.03.2016 13:08, Alan Mackenzie wrote: > Hello, Andreas. > > On Fri, Mar 11, 2016 at 08:27:17AM +0100, Andreas Röhler wrote: > >>> Well, given that syntax-ppss is not suitable for fixing back_comment, >>> the alternatives are not fixing it, substantially amending syntax-ppss, >>> using my new code, or fixing it some other way. I really think it >>> should be fixed. You don't want syntax-ppss to be changed. Do you have >>> an idea for an "other way"? >> There is neither a need nor a way to fix syntax-ppss : Determining >> syntax must check from beginning of buffer, as parse-partial-sexp does. >> parse-partial-sexp is in C, it's fast. > parse-partial-sexp starts scanning from where you ask it to, optionally > starting with a parse state returned by a previous invocation. Although > it's fast, it's not all that fast when repeatedly run over large > portions of a large buffer. This is what syntax-ppss was intended to > solve. > > The position syntax-ppss notionally starts scanning from is > indeterminate. Sometimes it's the beginning of buffer, sometimes it's > the beginning of the visible portion of the buffer, sometimes it's some > former beginning of visible portion. > > Its documentation is confused, too. The entry in the elisp manual says > "beginning of buffer". The doc string string says "point-min". > > I disagree about the need to fix syntax-ppss - medium level functions > should be rigorous and determinate. > > Needed or not: it's impossible. The idea of a cache WRT to comments can't work. Every insert may start a new multiline-comment at pos 1. How a cache will detect that? The results of syntax-ppss are hardly predictable.