Emacs 26.1, Windows 10 (64 bit)

I open file trace.log. User occur to find text. Save occur buffer to file NXS_ETH.txt. Do some manipulations. See screenshots. But I can't edit EDITABLE file.

Here steps: enter image description here

Save occur buffer to file: enter image description here

enter image description here

File is EDITABLE (not read-only).

enter image description here

Remove Face and text properties: enter image description here enter image description here

I press "a" but char "a" not show in buffer. I get message on minibuffer:

a is undefined

What is this?

enter image description here

To fix this I reopen file NXS_ETH.txt and then success edit buffer.

Why I can't input any text after save occur buffer to the file?

  • @Drew As I said the file is NOT read only. I also try C-x C-q but it not help. Only M-x text-mode is fixed problem. – a_subscriber Feb 7 '19 at 15:15

The occur buffer is in occur mode. This mode doesn't allow you to edit text. After you save it, you need to change to a different mode. M-x text-mode should do what you need.

  • You can just use C-x C-q to toggle read-only in an *Occur* buffer, to make it editable. – Drew Feb 7 '19 at 15:07
  • 1
    @Drew that's not enough, because the buffer is still in Occur mode. C-x C-q makes it editable, but there are no self-inserting keys in the occur-mode map. The warning Emacs reports is not "Buffer is read-only", it is "a is not defined". – Tyler Feb 7 '19 at 16:14
  • @Drew you could use e to switch to occur-edit mode, but then the changes are made in the original source file. @Alexei wants to make changes in a saved copy of the occur buffer. – Tyler Feb 7 '19 at 16:19
  • 1
    Oh, right. You can delete text but there's no self-inserting. Similar problem to making *Help* writable (but worse). Makes such buffers less usable than they used to be. But yes, all you need to do is change the mode (or use C-q ;-)). – Drew Feb 7 '19 at 18:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.