From: Kaushal Modi <kaushal.modi@gmail.com>
To: John Wiegley <jwiegley@gmail.com>
Cc: 22819@debbugs.gnu.org, npostavs@users.sourceforge.net
Subject: bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only
Date: Wed, 09 Aug 2017 11:03:34 +0000 [thread overview]
Message-ID: <CAFyQvY1zCVcFD-VhxLm9K7nSNQ8D7DOwbk71_5vms5NFO9o8Mw@mail.gmail.com> (raw)
In-Reply-To: <m2o9rpd9vp.fsf@newartisans.com>
[-- Attachment #1: Type: text/plain, Size: 5139 bytes --]
On Tue, Aug 8, 2017, 5:31 PM John Wiegley <jwiegley@gmail.com> wrote:
>
> Hello, Kaushal.
>
Hi John, thanks for your input.
It should be pointed out here that maintenance of Emacs is at the
> maintainers'
> discretion. Even though we do take the opinions of others into account,
> just
> because emacs-devel "hasn't raised an issue", does not mean that a change
> will
> happen. If Eli and I don't like it, the issue must wait for the next round
> of
> maintainers.
>
Understood. My only hope that I can convince the maintainers with my reason
that this proposal fixes a real-life problem with the help democratic
voting system (if the opinions asked on emacs-devel matter and can be
called that).
There are a few factors why this change is being rejected now:
>
> a. It is a long-standing behavior, however less than ideal it is. We
> don't
> know what effect changing it will have, as obvious as it may seem. Our
> strongly-held policy is to avoid changes in long-standing behavior
> unless
> the reason to do so is compelling.
>
Wouldn't the master branch be a good playground for this? If it affects
people negatively, it's just a one-line commit and thus easy to revert.
b. The main force of your argument is that we waste CPU time when
I should have used the term "wall time". This issue has wasted quite a few
minutes for me.
we don't
> need to, because we could just check before doing the indentation. I
> have
> no argument with that, and you're quite right.
However
, in all my years
> of using Emacs I've never run into this case, so I don't buy the
> argument
> that it is a change that needs to happen right now, for everyone.
>
This change can be truly tested and appreciated only by people dealing with
read-only files everyday. This would be mostly people working with a
central version control system that makes all the files yet to be
checked-out as read-only symbolic links. I deal with dozens of read-only
files everyday, with a mix of editable files that are managed by git. So I
am likely to do the mistake of indenting a read-only file (i.e. indenting a
CVCS file before checking it out). Again, the benefit of this change is not
seen unless the indentation operation takes at least a few seconds (depends
on file size and major mode).
c. Emacs is designed to be extensible. Advise the indentation functions so
> they perform this check for you. It doesn't need to happen in core
> Emacs
> for you to get the behavior you want.
>
Of course. I will do that. I was just hoping the "right fix" would get in.
(Otherwise why would anyone bother to submit bug reports and patches?)
If your wish is to defend the interests of the "silent majority", who all,
> without knowing it, would benefit from this change, then I appreciate your
> concern.
However, as maintainers, and given the lack of other voices *asking*
> for this change, we prefer to retain the status quo, however far from
> perfect
> it may be.
>
I doubt that will ever change because my situation as I explained above, of
working with primarily read-only files is not in majority.
Plenty of projects on the Net strive to make every breaking change necessary
> to approximate the best version of what they're trying to accomplish.
I haven't yet got an answer to a real-life scenario that would break by
this change. What kind of (i) side-effects would one be relying on (ii)
while running indent-region (iii) on read-only files?
It's a bit sad, I am presenting a solution to a real problem and the
counter argument is just one, and hypothetical.
That's
not how it is here. We want a stable, well-functioning Emacs with
> predictable
> behavior,
*predictable*: What should one expect to happen if one tried to
indent-region in a read-only file? Would one be surprised if a read-only
error is thrown? Emacs already does that.. just that this proposal does
just that *before* the time-consuming indentation attempt is started.
So this patch should bring no noticeable change to a majority of people.
But people in minority like me -- (i) like to obsessively keep all files
well-indented (ii) working with read-only files (iii) time-consuming
indentation (major mode and file size dependent) -- would heavily
appreciate this.
and sometimes that means keeping things as they have been for
> decades -- even if, in hindsight, it shouldn't have been done that way.
What I'm interested to learn is how many other cases like this exist,
I doubt if many still exist because the ones that affected most people are
already fixed by using the same approach (as in this proposal) of using *
interactive form or barf-if-buffer-read-only.
and
> whether a more general approach would make it less likely for it to occur.
> What if we could know, for example, whether a function will try to change
> the
> buffer, and simply stop the evaluation before it starts...
>
This prolonged discussion makes me think "What's the point?". I can barely
convince to commit this 1-line change to the master branch that can be
easily reverted even if a single person complained.
> --
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 8875 bytes --]
next prev parent reply other threads:[~2017-08-09 11:03 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
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 [this message]
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=CAFyQvY1zCVcFD-VhxLm9K7nSNQ8D7DOwbk71_5vms5NFO9o8Mw@mail.gmail.com \
--to=kaushal.modi@gmail.com \
--cc=22819@debbugs.gnu.org \
--cc=jwiegley@gmail.com \
--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.