From: Kaushal Modi <kaushal.modi@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 22819@debbugs.gnu.org, Noam Postavsky <npostavs@users.sourceforge.net>
Subject: bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only
Date: Sat, 05 Aug 2017 12:29:15 +0000 [thread overview]
Message-ID: <CAFyQvY2r8Bw-zEGJv7HGuTuSAU2eRTmL3mBQMvcTV4h9L8F8MA@mail.gmail.com> (raw)
In-Reply-To: <83r2wqusep.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1790 bytes --]
On Sat, Aug 5, 2017, 8:10 AM Eli Zaretskii <eliz@gnu.org> wrote:
>
> I see no problem in it, sorry. And why was the user not aware of the
> read-only status of the buffer to begin with?
Cockpit error, as you say later. It's easy to forget if you are working on
a DVCS (like git) controlled file or CVCS (like SOS).
How
plausible is such a
> scenario?
I resorted to writing this patch because it frustrated me quite a few
times.
Are
we trying to change Emacs behavior to cater to a clear
> cockpit error?
>
Isn't it better to alert user of an operation that will not succeed anyways
beforehand, especially if the operation can be expensive like this one?
> >against veteran Emacs behavior regarding read->only text,
> > >behavior that is present in several other >commands, and that AFAIR
> > >resulted from some past discussions.
> >
> > This is the only one that provided me this surprise in about a decade of
> Emacs use. Which other commands
> > do the text manipulation, and then check the buffer read-only status?
>
> C-w, to name just one.
>
OK, it would be unnoticeable in that case as I have yet to see a kill
operation that can take couple of minutes.
IOW, a command could have useful side effects that are produced even
> if the buffer is read-only and its text cannot be changed, thus
> preventing the main effect of the command from happening.
>
> > The flip question is: How common is a workflow, where a buffer is
> read-only, user does indentation, and is fine
> > with seeing that error after the fact?
>
> This goes both ways: if it's uncommon enough to be unimportant, then
> changing the behavior is not important as well.
>
Would it be OK to open this up to emacs-devel to understand what workflows
can break because of this change?
> --
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 3494 bytes --]
next prev parent reply other threads:[~2017-08-05 12:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 13:54 bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only Kaushal Modi
2017-08-05 1:56 ` npostavs
2017-08-05 6:52 ` Eli Zaretskii
2017-08-05 11:50 ` Kaushal Modi
2017-08-05 12:10 ` Eli Zaretskii
2017-08-05 12:29 ` Kaushal Modi [this message]
2017-08-05 12:37 ` Eli Zaretskii
2017-08-05 12:47 ` npostavs
2017-08-05 13:13 ` Eli Zaretskii
2017-08-07 17:45 ` Kaushal Modi
2017-08-07 17:53 ` Noam Postavsky
2017-08-07 18:02 ` Kaushal Modi
2017-08-07 18:11 ` Noam Postavsky
2017-08-08 13:06 ` Kaushal Modi
2017-08-08 13:15 ` npostavs
2017-08-08 19:05 ` Eli Zaretskii
2017-08-08 19:19 ` Kaushal Modi
2017-08-08 21:31 ` John Wiegley
2017-08-09 11:03 ` Kaushal Modi
2017-08-09 21:14 ` John Wiegley
2019-06-25 14:33 ` Lars Ingebrigtsen
2019-06-25 14:35 ` Kaushal Modi
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFyQvY2r8Bw-zEGJv7HGuTuSAU2eRTmL3mBQMvcTV4h9L8F8MA@mail.gmail.com \
--to=kaushal.modi@gmail.com \
--cc=22819@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=npostavs@users.sourceforge.net \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.