unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Juri Linkov <juri@linkov.net>
Cc: Robert Marshall <robert.marshall@codethink.co.uk>,
	Lars Ingebrigtsen <larsi@gnus.org>,
	29412@debbugs.gnu.org
Subject: bug#29412: 27.0.50; dired-toggle-read-only should (at some point!) check that the direcory is writeable
Date: Sun, 13 Dec 2020 08:55:36 -0800 (PST)	[thread overview]
Message-ID: <5aa02c80-bcf2-4e99-915b-013275f3328d@default> (raw)
In-Reply-To: <878sa2qfmq.fsf@mail.linkov.net>

> >> I've now made `C-c C-q' signal an error if the directory isn't writable
> >> in Emacs 28.
> >
> > I don't feel strongly about this, but I wonder whether
> > that's the right thing to do.  We do NOT do that for
> > files, for example.
> 
> OTOH, displaying a warning might go unnoticed by the user.
> 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.

For a file buffer, `C-x C-q' simply echoes:

  "Read-Only mode disabled in current buffer"

That is perfectly clear.

And any attempt to use a subsequent `C-x C-q to
save edit changes should be the time to query a
user for what to do (e.g. confirm saving the
changes or ignore them).

Come up with a good argument why this should be
handled differently from the file-editing case
and we can talk about it.  There are very good
use cases for allowing the _buffer_ to be edited,
regardless of whether the user ultimately wants
such changes applied to disk.





  parent reply	other threads:[~2020-12-13 16:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-23 16:11 bug#29412: 27.0.50; dired-toggle-read-only should (at some point!) check that the direcory is writeable Robert Marshall
2020-12-12 11:33 ` Lars Ingebrigtsen
2020-12-12 19:26   ` Drew Adams
2020-12-13  8:32     ` Juri Linkov
2020-12-13 13:18       ` Lars Ingebrigtsen
2020-12-13 17:00         ` Drew Adams
2020-12-13 19:04         ` Robert Marshall
2020-12-13 16:55       ` Drew Adams [this message]
2020-12-13 19:58         ` Juri Linkov
2020-12-13 21:45           ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5aa02c80-bcf2-4e99-915b-013275f3328d@default \
    --to=drew.adams@oracle.com \
    --cc=29412@debbugs.gnu.org \
    --cc=juri@linkov.net \
    --cc=larsi@gnus.org \
    --cc=robert.marshall@codethink.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).