octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #40197] get_first_help_sentence fails for mult


From: Carnë Draug
Subject: [Octave-bug-tracker] [bug #40197] get_first_help_sentence fails for multiple @deftypefn
Date: Mon, 07 Oct 2013 20:28:58 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130917 Firefox/17.0 Iceweasel/17.0.9

URL:
  <http://savannah.gnu.org/bugs/?40197>

                 Summary: get_first_help_sentence fails for multiple
@deftypefn
                 Project: GNU Octave
            Submitted by: carandraug
            Submitted on: Mon 07 Oct 2013 08:28:57 PM GMT
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

Due to recent problems with Texinfo 5, the few functions that need to use the
deftypefnx in the middle of the help text must first end the deftypefn (see
gallery.m for an example).

The problem is that get_first_help-sentence is not prepared for this and fails
with:


octave> get_first_help_sentence ("gallery")
error: first_sentence_texinfo: mx_el_gt: nonconformant arguments (op1 is
1x381, op2 is 1x55)
error: evaluating argument list element number 1
error: evaluating argument list element number 1
error: called from:
error:  
/home/carandraug/builds/octave-default/../../development/octave/scripts/help/get_first_help_sentence.m
at line 132, column 10
error:  
/home/carandraug/builds/octave-default/../../development/octave/scripts/help/get_first_help_sentence.m
at line 65, column 20


A simple fix is to only take the first element by adding (1) at the end of
line 128:


end_idx = strfind (help_text, sprintf ("@end %s", def_type))(1);


Doing this removes those lines but then Texinfo will generate some warnings
when calling __makinfo__ (but get_first_help_sentence will work correctly).
This can be fixed by removing the following if block:


    if (isempty (endl))
      keep(end_idx:end) = false;
    else
      keep(end_idx:endl) = false;
    endif


and only do "keep(end_idx:end)". While doing this solves the problem for my
cases, I don't understand the purpose of this condition so I'm not pushing
this change. Does anyone have any better idea of what's going on?

This bugs gets triggered when installing a package with such type of help
text. The error means that the installation is canceled so the package can't
be installed.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?40197>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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