emacs-evil / evil

The extensible vi layer for Emacs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

evil-complete-previous freeze emacs in org mode table

aidancz opened this issue · comments

Issue type

  • Bug report

Environment

Emacs version: GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8)
Operating System: Arch Linux (6.4.9-arch1-1)
Evil version: Evil version 1.15.0
Evil installation type: melpa
Graphical/Terminal: both
Tested in a make emacs session (see CONTRIBUTING.md): Yes(terminal)

Reproduction steps

  • Start Emacs
  • open a file abc.org with contents:
https://www.gnu.org/software/emacs/manual/html_node/emacs/Mode-Line.html

-UUU: @**-   F2  UTF-8-demo.txt   Top   (1,0)     <N>   (Text s-/ WS Wrap)

| string | meaning                                  | note                                                                 |
|--------+------------------------------------------+----------------------------------------------------------------------|
| -      | input method                             |                                                                      |
| UUU    | coding system (keyboard terminal buffer) | (U utf-8-unix)                                                       |
| :      | end-of-line convention                   | (: LF) (/ CR) (\ CRLF)                                               |
| @      | emacsclient                              |                                                                      |
| **     | buffer status                            | (-- unmodified) (** modified) (%% read-only) (%* read-only_modified) |
| -      | default-directory                        | (- local) (@ remote)                                                 |
| F2     | frame name                               | (F2 the-2nd-frame)                                                   |
| UTF    |                                          |                                                                      |
  • move cursor to last line after "UTF", enter insert mode, hit "C-p"

  • the text becomes "UTF-8-UNIX" and emacs completely freezes

I am unable to reproduce this issue. One thing you could try to do is execute M-x toggle-debug-on-quit RET, follow your reproduction steps and press C-g when Emacs is frozen to have the debugger with a backtrace show up which might say something about what the cause is.

@axelf4

My bad, the reproduction steps are

  1. Open a file abc.org with contents:
https://www.gnu.org/software/emacs/manual/html_node/emacs/Mode-Line.html

-UUU: @**-   F2  UTF-8-demo.txt   Top   (1,0)     <N>   (Text s-/ WS Wrap)

| string | meaning                                  | note                                                                 |
|--------+------------------------------------------+----------------------------------------------------------------------|
| -      | input method                             |                                                                      |
| UUU    | coding system (keyboard terminal buffer) | (U utf-8-unix)                                                       |
| :      | end-of-line convention                   | (: LF) (/ CR) (\ CRLF)                                               |
| @      | emacsclient                              |                                                                      |
| **     | buffer status                            | (-- unmodified) (** modified) (%% read-only) (%* read-only_modified) |
| -      | default-directory                        | (- local) (@ remote)                                                 |
| F2     | frame name                               | (F2 the-2nd-frame)                                                   |
|        |                                          |                                                                      |
  1. Move cursor to last line, column 2 (below "F"), press "i" to enter insert mode, insert "UTF" and press "C-p"

I tried this many times, about eight times out of ten reproduced this issue

And the debugger shows:

Debugger entered--Lisp error: (quit)
  plist-put((:begin 1276 :end 1276 :type org :tblfm nil :contents-begin 1276 :contents-end 1401 :value nil :post-blank 1 :post-affiliated 1276) :mode nil)
  org-element--current-element(1401 element nil nil)
  org-element--parse-to(1288)
  org-element-at-point()
  org-at-table-p()
  org-self-insert-command(1)
  funcall-interactively(org-self-insert-command 1)
  call-interactively(org-self-insert-command nil nil)
  command-execute(org-self-insert-command)

I observe freezing only when, after following your steps, I try to insert any character after the first | on the last line. That said, it also occurs when I start Emacs with emacs -Q without Evil and execute M-x dabbrev-expand RET instead of C-p. As the issue is unrelated to Evil mode, please raise it on the Org mode issue tracker instead.

please raise it on the Org mode issue tracker instead

Not Org mode either. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=65451

Didn't expect this bug to be like this, many thanks!