Stefan Monnier wrote: >> I get crashes in org-mode when I do things in a region with invisible >> text. I have not made any simple test case, but from my testing I can see >> this: > >> - There is something strange with the display in org-mode an items content >> is hidden. You can position point after the three dots ... If you do that >> and check (current-column) you get 0. > >> - In code if you in org-mode do > >> (while (my-invisible-p (point)) >> (forward-line 1)) > >> until point is on a visible char and there insert an overlay with an >> after-string it crashes. > > Please make the "insert an overlay with an > after-string" more precise, e.g. actual Elisp code. It looks similar to this, I have not tested if propertize is involved: (setq ovl-str (concat "before" (propertize "txt" 'face 'highlight-popup) "after")) (overlay-put ovl 'after-string ovl-str) (overlay-put ovl 'display "") See also the attached file. The crash happens in tabkey2-overlay-message if you let it take the path avoided right under the comment: ;; Fix-me: Emacs bug workaround (if nil ;;(tabkey2-invisible-p (1- (point))) > Also, does it happen with any Org-mode buffer, or is the > contents/setup important? It does not seem to be dependent on the buffers content. > Finally, please provide a backtrace. Sorry, it is compiled with debug info, but there is no backtrace. It just crashes and MS offers to examine the crash. (This is on w32 xp.) > Stefan PS: The attached file implements a way to handle Tab for completion.