From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: [RFC] Do indent-region only on editable buffers
Date: Mon, 07 Aug 2017 15:55:17 -0400 [thread overview]
Message-ID: <jwvzibb5f5c.fsf-monnier+gmane.emacs.devel@gnu.org> (raw)
In-Reply-To: CAFyQvY3X69T8n7XGk+43rvjHFGNEzMR4GHRECQmqGmE9AEpESg@mail.gmail.com
> The proposal is to call (barf-if-buffer-read-only) before attempting to do
> the indent.
No objection here.
> change is required? Here's what's will happen: 1. User: Try indentation
> (C-x h M-x indent-region) 2. User: Could take several seconds or few
> minutes (depending on major mode and file size) 3. Emacs: "Bummer, couldn't
> save all that indentation because the buffer is read-only". 4. User: Make
Indentation of a region isn't done by computing the complete result and
then "saving" it into the buffer. So the error will be signaled as soon
as the indent-region finds a line whose indentation should be changed.
Usually that's almost instantaneous, but indeed in some cases it can
take a while (e.g. in large regions that are already indented except for
the last few lines).
Stefan
next prev parent reply other threads:[~2017-08-07 19:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-07 17:36 [RFC] Do indent-region only on editable buffers Kaushal Modi
2017-08-07 17:46 ` Drew Adams
2017-08-07 17:56 ` Kaushal Modi
2017-08-07 18:13 ` Noam Postavsky
2017-08-07 19:55 ` Stefan Monnier [this message]
2017-08-07 20:07 ` Kaushal Modi
2017-08-07 23:03 ` John Wiegley
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=jwvzibb5f5c.fsf-monnier+gmane.emacs.devel@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
/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.