Skip to content

consult-focus-lines can't get the full file back after revert-buffer-quick #1329

Description

@zealotrush

The bug could be reproduced in emacs -Q with a plain text file.

  1. Create a text file with a few lines, e.g.,

    foo
    bar
    foobar

  2. M-x consult-focus-lines, type foo, press RET. Now the buffer only shows the matching lines, and a FOCUS indicator shows in the mode line.

  3. M-x revert-buffer-quick (C-x x g). The FOCUS indicator disappears.

  4. Try to bring back the original content by either C-u M-x consult-focus-lines or M-x consult-focus-lines and press RET right away. Neither does anything.

The only way I found to get the original content back is to kill the buffer and reopen the file.

A few more notes.

  • It also happens with .org files.
  • I could not reproduce it with a .md file. In that case, revert-buffer-quick restores the original content immediately.

Environment

  • emacs -Q, Emacs 32.0.50
  • Consult 3.7 (3a2441d)
  • macOS Tahoe 26.6.2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions