unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#22983: syntax-ppss returns wrong result.
@ 2016-03-11 15:15 Alan Mackenzie
  2016-03-11 20:31 ` Dmitry Gutov
                   ` (3 more replies)
  0 siblings, 4 replies; 65+ messages in thread
From: Alan Mackenzie @ 2016-03-11 15:15 UTC (permalink / raw)
  To: 22983

Hello, Emacs.

The fundamental contract in syntax-ppss is that (syntax-ppss POS)
returns the same value as (parse-partial-sexp (point-min) POS) (with the
exception of elements 2 and 6).  This is currently not always the case.

In the master branch, emacs -Q and visit xdisp.c with C-x C-f.  Follow
this recipe:

    M-: (syntax-ppss-flush-cache 1)
    M-: (setq ppss-0 (syntax-ppss 40000))
    M-<
    C-s #include " <CR>
    M->
    C-x n n
    M-: (setq ppss-1 (syntax-ppss 40000))
    M-: (setq parse (parse-partial-sexp (point-min) 40000))

At this point, `ppss-1' and `parse' should match (apart from elements 2
and 6).  What we actually have is:

    ppss-1: (2 39992 nil nil nil nil 2 nil nil (39975 39992))
    parse:  (0 nil 15674 34 nil nil 0 nil 15675 nil)

.

-- 
Alan Mackenzie (Nuremberg, Germany).





^ permalink raw reply	[flat|nested] 65+ messages in thread

end of thread, other threads:[~2017-10-04 20:07 UTC | newest]

Thread overview: 65+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-11 15:15 bug#22983: syntax-ppss returns wrong result Alan Mackenzie
2016-03-11 20:31 ` Dmitry Gutov
2016-03-11 21:24   ` Alan Mackenzie
2016-03-11 21:35     ` Dmitry Gutov
2016-03-11 22:15       ` Alan Mackenzie
2016-03-11 22:38         ` Dmitry Gutov
2016-03-13 17:37           ` Stefan Monnier
2016-03-13 18:57             ` Alan Mackenzie
2016-03-14  0:47               ` Dmitry Gutov
2016-03-14  1:04                 ` Drew Adams
2016-04-03 22:55                   ` John Wiegley
2016-03-14  1:49               ` Stefan Monnier
2016-03-13 17:32     ` Stefan Monnier
2016-03-13 18:52 ` Andreas Röhler
2016-03-13 18:56   ` Dmitry Gutov
2016-03-18  0:49 ` Dmitry Gutov
2016-03-19 12:27   ` Alan Mackenzie
2016-03-19 18:47     ` Dmitry Gutov
2016-03-27  0:51       ` John Wiegley
2016-03-27  1:14         ` Dmitry Gutov
2016-04-03 22:58           ` John Wiegley
2016-04-03 23:15             ` Dmitry Gutov
2017-09-02 13:12               ` Eli Zaretskii
2017-09-02 17:40                 ` Alan Mackenzie
2017-09-02 17:53                   ` Eli Zaretskii
2017-09-03 20:44                   ` John Wiegley
2017-09-04 23:34                   ` Dmitry Gutov
2017-09-05  6:57                     ` Andreas Röhler
2017-09-05 12:28                     ` John Wiegley
2017-09-07 20:45                       ` Alan Mackenzie
2017-09-08 16:04                         ` Andreas Röhler
2017-09-10 18:26                           ` Alan Mackenzie
2017-09-09  9:44                         ` Dmitry Gutov
2017-09-09 10:20                           ` Alan Mackenzie
2017-09-09 12:18                             ` Dmitry Gutov
2017-09-10 11:42                               ` Alan Mackenzie
2017-09-10 11:36                           ` bug#22983: [ Patch ] " Alan Mackenzie
2017-09-10 22:53                             ` Stefan Monnier
2017-09-10 23:36                               ` Dmitry Gutov
2017-09-11 11:10                                 ` Stefan Monnier
2017-09-12  0:11                                   ` Dmitry Gutov
2017-09-12 22:12                                     ` Richard Stallman
2017-09-11 19:42                               ` Alan Mackenzie
2017-09-11 20:20                                 ` Stefan Monnier
2017-09-11  0:11                             ` Dmitry Gutov
2017-09-11 20:12                               ` Alan Mackenzie
2017-09-12  0:24                                 ` Dmitry Gutov
2017-09-17 10:29                                   ` Alan Mackenzie
2017-09-17 23:43                                     ` Dmitry Gutov
2017-09-18 19:08                                       ` Alan Mackenzie
2017-09-19  0:02                                         ` Dmitry Gutov
2017-09-19 20:47                                           ` Alan Mackenzie
2017-09-22 14:09                                             ` Dmitry Gutov
2017-09-24 11:26                                               ` Alan Mackenzie
2017-09-25 23:53                                                 ` Dmitry Gutov
2017-10-01 16:36                                                   ` Alan Mackenzie
2017-10-04 20:07                                                 ` Johan Bockgård
2017-09-17 11:12                             ` Philipp Stephani
2017-09-19 20:50                               ` Alan Mackenzie
2017-09-07 17:56                     ` Alan Mackenzie
2017-09-07 20:36                       ` Dmitry Gutov
2016-03-19 23:16     ` Vitalie Spinu
2016-03-19 23:00   ` Vitalie Spinu
2016-03-19 23:20     ` Dmitry Gutov
     [not found] ` <mailman.7307.1457709188.843.bug-gnu-emacs@gnu.org>
2017-10-01 16:31   ` Alan Mackenzie

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).