GNU bug report logs - #45349
27.1.50; ruby-mode widens buffer when saving

Previous Next

Package: emacs;

Reported by: Eric Hanchrow <eric.hanchrow <at> gmail.com>

Date: Mon, 21 Dec 2020 03:01:02 UTC

Severity: normal

Found in version 27.1.50

Fixed in version 28.1

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 45349-done <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Eric Hanchrow <eric.hanchrow <at> gmail.com>, 45349-done <at> debbugs.gnu.org
Subject: Re: bug#45349: 27.1.50; ruby-mode widens buffer when saving
Date: Tue, 22 Dec 2020 03:17:49 +0200
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.




This bug report was last modified 4 years and 151 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.