GNU bug report logs -
#36459
27.0.50; octave-mode ElDoc support bug
Previous Next
Reported by: Mauro Aranda <maurooaranda <at> gmail.com>
Date: Mon, 1 Jul 2019 15:00:02 UTC
Severity: normal
Tags: patch
Found in version 27.0.50
Fixed in version 26.3
Done: Leo Liu <sdl.web <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 2019-07-03 17:43 +0300, Dmitry Gutov wrote:
> Paging the original author.
>
> Leo, are you still using Octave? What do you think about the issue?
Sadly I never become a serious octave user. It is possible these
functions stop working given octave seems to evolve fast these days.
On 2019-07-04 13:15 -0300, Mauro Aranda wrote:
> I forgot to say that my version of GNU Octave is 4.0.0
>
> The problem is with the regexp used in
> octave-eldoc-function-signatures. It matches the signatures of the
> function, that are output with a call to the GNU Octave function
> print_usage. It also matches an old-style of outputting these function
> signatures, which was:
> usage: bar = foo ()
>
> This output was also generated by calling the GNU Octave function usage,
> like this:
> usage ("bar = foo ()")
> But usage has been deprecated in GNU Octave, I think in major version 4.
> It's still present in my version, but I don't know about latest releases
> (there's a recent GNU Octave 5.1.0)
>
> I don't know why the author chose print_usage over the GNU Octave
> function help, but when print_usage fails, due to being called with a
> nonexistent function in his argument, like this:
> print_usage ('A')
> An error message like this one is output:
> error: print_usage: 'A' not found
>
> The regexp used is wrongly matching this line and therefore
> octave-eldoc-function-signatures is not returning nil, as it should in
> this case.
Can this bug be fixed by changing the regexp in
`octave-eldoc-function-signatures' from
"\\s-*\\(?:--[^:]+\\|usage\\):\\s-*\\(.*\\)$"
to
"\\s-*\\(?:--[^:]+\\|\\_<usage\\):\\s-*\\(.*\\)$"
?
BTW I can't remember why print_usage was chosen. It could be it was the
one I found that worked.
>
> Best regards,
> Mauro.
Thanks for the report.
This bug report was last modified 5 years and 292 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.