UnSat
UnSat

Reputation: 1407

Accidentally enabled read-only mode

I accidentally enabled some mode because of which whenever I open any files present in particular path, those get opened in read-only mode by default. So I have to explicitly disable the read-only mode.(M-x read-only-mode).

Any help/pointer much appreciated to disable this default behaviour

Thanks.

Upvotes: 2

Views: 589

Answers (1)

Drew
Drew

Reputation: 30701

First, you can just do C-x C-q to effect M-x read-only-mode (just a shortcut).

Second, do you see this problem if you start Emacs using emacs -Q? If not, the problem comes from your init file.

Third, use C-h m to find out what modes the buffers are in and what those modes do. If they all share a mode (major or minor mode), check the description of that mode to see if it sounds like it might be the cause. Then check your init file (~/.emacs) and your custom-file (if you use one), to see what might be initiating that mode.

Alternatively for third, recursively bisect your init file by commenting out bigger and bigger blocks of it until you find the culprit code. You can use M-x comment-region to comment the region and (with C-u) to uncomment the region. Comment out 1/2, then 3/4, then 7/8, etc.

Upvotes: 2

Related Questions