GNU bug report logs -
#22819
25.0.91; Don't try to indent region if the buffer is read-only
Previous Next
Reported by: Kaushal Modi <kaushal.modi <at> gmail.com>
Date: Fri, 26 Feb 2016 13:56:02 UTC
Severity: wishlist
Tags: patch, wontfix
Found in version 25.0.91
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
On Sat, Aug 5, 2017 at 7:50 AM Kaushal Modi <kaushal.modi <at> gmail.com> wrote:
>
> Thanks Noam for reviewing this. I am away from PC for a few days. I'll
> review your patch next week on Tuesday.
>
Hi Noam,
I was able to try the patch sooner.
I use verilog-mode and tried out your patch on a huge SystemVerilog file,
which usually takes a tangible amount of time (10's of seconds) to indent
the whole file -- C-x h C-M-\
When using (barf-if-buffer-read-only):
- The failure due to a buffer being read-only is instantaneous.
- As soon as I do C-x h C-M-\, I get:
== *Messages* ==
Buffer is read-only: #<buffer file.sv>
=====
When using (interactive "*r\nP"):
- The failure happens soon, but not instantaneously.. I start seeing the
progress percentage of the indentation happening, and then the read-only
error shows.
- After I do C-x h C-M-\, I get the below after a second or two:
== *Messages* ==
indent-region
Indenting region...45%
verilog-do-indent: Buffer is read-only: #<buffer file.sv>
=====
So looks like the read-only check based on interactive form is kicked in
some time after the user calls indent-region.. I tried looking at
verilog-do-indent code in verilog-mode.el[1], but I couldn't understand why
interactive * based error is delayed.
[1]:
http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/progmodes/verilog-mode.el
--
Kaushal Modi
[Message part 2 (text/html, inline)]
This bug report was last modified 5 years and 332 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.