GNU bug report logs -
#16078
Extensive docs and tests for `ruby-forward-string' (PATCH)
Previous Next
Reported by: Cameron Desautels <camdez <at> gmail.com>
Date: Fri, 6 Dec 2013 17:17:02 UTC
Severity: wishlist
Tags: patch
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hi Dmitry,
Thank you for explaining the recent changes. I did see a lot of
duplicated parsing code and wasn't completely sure what the reason for
it was. I read up a bit on SMIE so that makes sense now.
However, I've done additional testing on the current trunk and the
issue persists.
As a minimal example to recreate the issue, create a new file with the
following contents (indentation removed):
def foo
%^bar^
end
Turn on ruby-mode, and run `imenu-add-menubar-index'. You will get
the following error:
Error in menu-bar-update-hook (imenu-update-menubar):
(invalid-regexp "Unmatched [ or [^")
(Note that if you run it again it will appear to work--run `imenu' to
see the error again.) This stems from the bug in
`ruby-forward-string' that my patch fixes.
I have not signed the copyright assignment papers but I am willing.
Thanks.
--
Cameron Desautels <camdez <at> gmail.com>
On Fri, Dec 6, 2013 at 9:22 PM, Dmitry Gutov <dgutov <at> yandex.ru> wrote:
> Hi Cameron,
>
> Cameron Desautels <camdez <at> gmail.com> writes:
>
>> The attached patch adds extensive documentation and tests to the
>> `ruby-forward-string' function.
>>
>> This may seem an odd function to document thoroughly, but I spent
>> quite a while wrapping my head around the exact behavior and I want to
>> spare the next person. It also underlies some important parsing
>> functionality in ruby-mode.
>
> Thank you for your effort, but it probably would've been more valuable a
> few months ago or earlier. The ruby-mode that will be released with
> Emacs 24.4 has switched to using SMIE for indentation and sexp
> navigation by default, and it leaves quite a bit of the old,
> undocumented code unused.
>
> Whatever code examples and functionality didn't work for you, have you
> tried them with the current trunk?
>
> We can still use the two patches, of course, since the old indentation
> engine can still be enabled with `(setq ruby-use-smie nil)', but they
> exceed the 15 line limit and will require copyright assignment (AFAIR,
> we do require those even for test code). Have you signed, or are you
> willing to sign the copyright assignment papers?
This bug report was last modified 9 years and 186 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.