doublep / logview

Emacs mode for viewing log files
GNU General Public License v3.0
153 stars 18 forks source link

Read-only on buffers not visiting a file => error #6

Closed cch1 closed 7 years ago

cch1 commented 7 years ago

A buffer with output of a log stream (STDOUT) causes emacs errors as log messages are written. If I disable read-only-mode, all is good.

error in process filter: Buffer is read-only: #<buffer *nrepl-server*>

doublep commented 7 years ago

This doesn't sound like a bug in Logview. The mode puts buffer in read-only mode most of its keybindings are self-insertion commands otherwise.

cch1 commented 7 years ago

I think that's what I am saying: if it's not possible to confirm that the buffer is a non-tailed file, does it make sense to put the buffer in read-only-mode?

doublep commented 7 years ago

It makes sense because it makes Logview commands much easier to type. Also, Logview provides several ways to tail logfiles itself (see 'x', 'g', 'o t'). I frankly didn't even consider that something would write directly into a buffer, I always work with external logs myself. If you control the way buffer is written to, see `inhibit-read-only' variable (Logview uses it too, because normally in read-only buffer you cannot even change faces).

In any case, making buffer non-read-only by default is out of question, because that breaks the way people (most importantly, me) work with the mode.