GNU bug report logs - #12169
[PATCH] Merge changes from upstream ruby-mode

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Fri, 10 Aug 2012 00:45:01 UTC

Severity: normal

Tags: patch

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 12169 in the body.
You can then email your comments to 12169 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#12169; Package emacs. (Fri, 10 Aug 2012 00:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dmitry Gutov <dgutov <at> yandex.ru>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 10 Aug 2012 00:45:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Merge changes from upstream ruby-mode
Date: Fri, 10 Aug 2012 04:36:01 +0400
[Message part 1 (text/plain, inline)]
This is part 1, 1 or 2 more to come.

The change to `ruby-syntax-propertize-function' is kind of messy, but I 
don't see how to do it better without seriously rewriting 
`ruby-syntax-propertize-heredoc'.

--Dmitry
[ruby-upstream-1.diff (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12169; Package emacs. (Fri, 10 Aug 2012 15:01:01 GMT) Full text and rfc822 format available.

Message #8 received at 12169 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: 12169 <at> debbugs.gnu.org
Subject: Re: bug#12169: Acknowledgement ([PATCH] Merge changes from upstream
	ruby-mode)
Date: Fri, 10 Aug 2012 18:52:30 +0400
[Message part 1 (text/plain, inline)]
Here's part 2, in which I'm skipping the next 3 commits:

https://github.com/ruby/ruby/commit/85df40e9ab4559cd4ddde3f106ab56c76a808cc8
https://github.com/ruby/ruby/commit/6b0dc7fd81b25bc66681548b8b82f38258f7e08c
https://github.com/ruby/ruby/commit/862048e28d26112af1e67205cfd1c16564590bce

Because as far as I can tell, they hijack the `ruby-deep-indent-paren' 
behavior. IOW, with these applied, the indentation works as though the 
above variable is always nil (with a small improvement in the nested 
case, to be fair), so they don't make sense.

Instead, I added two tests, for `ruby-deep-indent-paren' enabled and 
disabled, and also ported all examples from test/misc/test_ruby_mode.rb.
[ruby-upstream-2.diff (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12169; Package emacs. (Fri, 10 Aug 2012 16:04:01 GMT) Full text and rfc822 format available.

Message #11 received at 12169 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 12169 <at> debbugs.gnu.org
Subject: Re: bug#12169: [PATCH] Merge changes from upstream ruby-mode
Date: Fri, 10 Aug 2012 11:54:55 -0400
Thanks for this. Are you also the upstream author?
If not, please adjust the ChangeLog entries so that each change has the
correct author (the upstream author for each change, plus you if you did
non-trivial adaptation of a change).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12169; Package emacs. (Fri, 10 Aug 2012 20:37:02 GMT) Full text and rfc822 format available.

Message #14 received at 12169 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 12169 <at> debbugs.gnu.org
Subject: Re: bug#12169: [PATCH] Merge changes from upstream ruby-mode
Date: Fri, 10 Aug 2012 16:28:17 -0400
> The change to `ruby-syntax-propertize-function' is kind of messy, but
> I don't see how to do it better without seriously rewriting
> ruby-syntax-propertize-heredoc'.

I think it can be simplified by adding a "\\(\\_<class\\s-*\\)?" pattern to
the here-doc regexp, but that only works for forward searches (which is
what is used in ruby-syntax-propertize but not in the
font-lock-syntactic-keywords code).  So it's probably fine as it is.

I've installed your patch, but please fix the ChangeLog authorship as
pointed out by Glenn (just include the changes in a subsequent patch).

> Here's part 2, in which I'm skipping the next 3 commits:
> https://github.com/ruby/ruby/commit/85df40e9ab4559cd4ddde3f106ab56c76a808cc8
> https://github.com/ruby/ruby/commit/6b0dc7fd81b25bc66681548b8b82f38258f7e08c
> https://github.com/ruby/ruby/commit/862048e28d26112af1e67205cfd1c16564590bce

I also added that patch.  I presume that you're also trying to convince
Ruby's maintainers to undo those changes?
Same as before: please provide a subsequent patch which corrects the
authorship attribution.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12169; Package emacs. (Fri, 10 Aug 2012 22:24:02 GMT) Full text and rfc822 format available.

Message #17 received at 12169 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: Glenn Morris <rgm <at> gnu.org>, 12169 <at> debbugs.gnu.org
Subject: Re: bug#12169: [PATCH] Merge changes from upstream ruby-mode
Date: Sat, 11 Aug 2012 02:15:21 +0400
[Message part 1 (text/plain, inline)]
On 10.08.2012 19:54, Glenn Morris wrote:
> Are you also the upstream author?

Nope. Thanks for the reminder.

On 11.08.2012 0:28, Stefan Monnier wrote:
> I've installed your patch, but please fix the ChangeLog authorship as
> pointed out by Glenn (just include the changes in a subsequent patch).

Included.

>> Here's part 2, in which I'm skipping the next 3 commits:
>> https://github.com/ruby/ruby/commit/85df40e9ab4559cd4ddde3f106ab56c76a808cc8
>> https://github.com/ruby/ruby/commit/6b0dc7fd81b25bc66681548b8b82f38258f7e08c
>> https://github.com/ruby/ruby/commit/862048e28d26112af1e67205cfd1c16564590bce

For completeness, this later commit is directly related to the above 3:
https://github.com/ruby/ruby/commit/d9e6b7d6a5e81afb588d79ef923b70890cdec4ba

I also don't include it, and we can see that the relevant test passes fine.

> I also added that patch.  I presume that you're also trying to convince
> Ruby's maintainers to undo those changes?

Not really, no. I will open an issue on Redmine since you asked, but 
nobody seems to be interested in pulling our changes back anyway, and as 
long as we're doing it in one direction, cherry-picking should be fine.

Here's a recent example: http://bugs.ruby-lang.org/issues/5140
A year-old bug, fixed in Emacs trunk, a user posted that information 
there with a patch 4 months ago, and... nothing.

> Same as before: please provide a subsequent patch which corrects the
> authorship attribution.

In my not-a-lawyer opinion, the example code in tests is not 
copyrightable, but okay, I mentioned the original author there too.

--Dmitry
[ruby-upstream-3.diff (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12169; Package emacs. (Fri, 10 Aug 2012 23:15:02 GMT) Full text and rfc822 format available.

Message #20 received at 12169 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: Glenn Morris <rgm <at> gnu.org>, 12169 <at> debbugs.gnu.org
Subject: Re: bug#12169: [PATCH] Merge changes from upstream ruby-mode
Date: Sat, 11 Aug 2012 03:06:02 +0400
On 11.08.2012 2:15, Dmitry Gutov wrote:
> I will open an issue on Redmine

http://bugs.ruby-lang.org/issues/6854





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12169; Package emacs. (Sun, 12 Aug 2012 22:18:02 GMT) Full text and rfc822 format available.

Message #23 received at 12169 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: Glenn Morris <rgm <at> gnu.org>, 12169 <at> debbugs.gnu.org
Subject: Re: bug#12169: [PATCH] Merge changes from upstream ruby-mode
Date: Sun, 12 Aug 2012 18:09:00 -0400
> In my not-a-lawyer opinion, the example code in tests is not copyrightable,
> but okay, I mentioned the original author there too.

Great, thanks, installed,


        Stefan




bug closed, send any further explanations to 12169 <at> debbugs.gnu.org and Dmitry Gutov <dgutov <at> yandex.ru> Request was from Dmitry Gutov <dgutov <at> yandex.ru> to control <at> debbugs.gnu.org. (Mon, 13 Aug 2012 11:36:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 11 Sep 2012 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 286 days ago.

Previous Next


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