While previewing the file corresponding to a search result in a temporary
buffer (helm-ag-use-temp-buffer is set to t), it can happen that the file's
mode makes the temporary buffer read-only. For example, when so-long-mode
kicks in.
When then trying to preview a search result from another file,
helm-ag--open-file-with-temp-buffer will fail to erase the temporary buffer
because it is in read-only mode, resulting in:
let: Buffer is read-only: #<buffer *helm-ag persistent*>
Fix this by explicitly setting the buffer-read-only variable of the temporary
buffer to nil before erasing it.
While previewing the file corresponding to a search result in a temporary buffer (
helm-ag-use-temp-buffer
is set tot
), it can happen that the file's mode makes the temporary buffer read-only. For example, whenso-long-mode
kicks in.When then trying to preview a search result from another file,
helm-ag--open-file-with-temp-buffer
will fail to erase the temporary buffer because it is in read-only mode, resulting in:Fix this by explicitly setting the
buffer-read-only
variable of the temporary buffer tonil
before erasing it.