Subject: bug#29412: 27.0.50; dired-toggle-read-only should (at some point!) check that the direcory is writeable

From: Drew Adams <[email-masked]>
Date: Sun, 13 Dec 2020 13:45:15 -0800 (PST)

> >> Then maybe better would be to ask a y-or-n question
> >> whether the user still wants to edit the unwritable buffer.
> >
> > I disagree.  This should be handled _exactly_ the
> > same way we handle a buffer for a file that is
> > read-only.  I see no argument why we should treat
> > a directory buffer different from a file buffer.
> 
> Asking a y-or-n question is _exactly_ what
> 'C-x C-q' does in wdired, i.e. after typing
> 'C-x C-q' (wdired-exit) it asks a question:
> 
>   Buffer modified; save changes? (y or n)

Yes, for saving changes.  That's just what I suggested.

> So now entering wdired mode does the same thing with
> 'C-x C-q' (dired-toggle-read-only):
> 
>   Directory isn't writable; edit anyway? (y or n)

That is NOT the same way we handle a file buffer.

We are both repeating ourselves, it seems.

I gave 2 good reasons why this should be handled the
same way as we handle read-only files.  And they are
no doubt among the reasons (perhaps the only reasons?)
Emacs has always behaved as it does for file buffers.

So far, no one has given ANY reasons why we should not
handle directory visits and editing the same way as
file visits and editing.