bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#45349: 27.1.50; ruby-mode widens buffer when saving


From: Dmitry Gutov
Subject: bug#45349: 27.1.50; ruby-mode widens buffer when saving
Date: Tue, 22 Dec 2020 03:17:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

Version: 28.1

Hi Eric,

On 21.12.2020 04:59, Eric Hanchrow wrote:
put the following three lines of ruby code into /tmp/wat.rb

#####
def hey_you
   puts "So what"
end
####

start emacs with "emacs -nw"
visit the file:
   C-x C-f /tmp/wat.rb RET
add some spaces to the end of the second line:
   C-n C-e SPC SPC SPC
narrow to that second line:
   C-SPC
   M-m
   C-x n n
save the buffer:
   C-x C-s

You'll see that the buffer is no longer narrowed.

The fix is to simply add a "save-restriction" in the function
`ruby-mode-set-encoding`, like this

Thanks for the report, now fixed on master.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]