Subject: Re: bug#45091: 27.1; M-x org-table-paste-rectangle

From: João Távora <[email-masked]>
Date: Tue, 08 Dec 2020 17:02:13 +0000

João Távora <[email-masked]> writes:

> I'll keep investigating: I still don't know which marker the message
> is referring to.  It could be antiblink's marker, but it could be
> anything else.
>
> João

I've now reproduced after setting

  (setq jit-lock-antiblink-grace nil)

Which turns off the antiblink feature _almost_ entirely.  I've also been
able to reproduce it from the command line via:

    ~/Source/Emacs/emacs-27/src/emacs -Q ~/tmp/taks-file.latex                         \
      --eval "(progn                                                                   \
               (require 'org)                                                          \
               (require 'org-table)                                                    \
               (orgtbl-mode)                                                           \
               (remove-hook 'post-command-hook                                         \
                            'jit-lock--antiblink-post-command t))"

Which _completely_ turns off the antiblink feature.

It doesn't need a window system, -nw is fine to reproduce.

This was with a fresh build of the Emacs 27.1 tag.

It's hard to reproduce sometimes, but iterating the undo/paste rectangle
cycle eventually gets one there.  It has to be done on the very same
file that Tak Kunihiro posted.  Sometimes I mess the file slightly (in
ways that I can't tell) and it doesn't happen again.

Tak Kunihiro, what is in your opinion the deciding character of these
files? I.e. what did you change from the first file (where I couldn't
reproduce) to the second?

I'm quite lost as to why this happens, of course, but it seems it's
always coming from syntax-ppss.  When I evaluate that definition (rather
than compiling), I get more clues:

Debugger entered--Lisp error: (error "Marker does not point anywhere")
  >(#<marker in no buffer> 2919)
  (and old-pos (> old-pos pos))
  (if (and old-pos (> old-pos pos)) (setq old-pos nil))
  (let* ((cell (syntax-ppss--data)) (ppss-last (car cell)) (ppss-cache (cdr cell)) (old-ppss (cdr ppss-last)) (old-pos (car pps$
  (progn (set-syntax-table (or syntax-ppss-table (syntax-table))) (let* ((cell (syntax-ppss--data)) (ppss-last (car cell)) (pps$
  (unwind-protect (progn (set-syntax-table (or syntax-ppss-table (syntax-table))) (let* ((cell (syntax-ppss--data)) (ppss-last $
  (let ((table (syntax-table)) (buffer (current-buffer))) (unwind-protect (progn (set-syntax-table (or syntax-ppss-table (synta$
  syntax-ppss()

I'll keep looking a bit, but at this point it doesn't seem to have
anything to do with the antiblink feature.  I might be wrong, but I
think that only shows up first in the messages buffer because it's
unlucky enough to be one of the first users of syntax-ppss after a
command.

João