Opened 12 years ago

Closed 11 years ago

#406 closed defect (fixed)

[with patch; positive review] notebook -- make tab completion not stick gap. when using the notebook in gap mode

Reported by: was Owned by: boothby
Priority: blocker Milestone: sage-3.0.2
Component: notebook Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by was)

On 7/26/07, Dan Christensen <jdc@uwo.ca> wrote:
> 3) When I try to use tab completion, it inserts "gap." before the
> command (and probably ignores functions not wrapper by sage).

Attachments (1)

sage-406.patch (7.0 KB) - added by was 11 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 12 years ago by jdc

4) If I use GAP Print(...) commands in a short notebook entry, I see the output. But if the entry is longer, I don't see the output.

comment:2 Changed 12 years ago by mabshoff

  • Milestone set to sage-3

comment:3 Changed 11 years ago by was

  • Description modified (diff)
  • Summary changed from notebook -- improve support for other system modes to notebook -- make tab completion not stick gap. when using the notebook in gap mode

In order to focus this ticket, I've broken up each issue into separate tickets and made this ticket just issue 3 in the original description, which is below

On 7/26/07, Dan Christensen <jdc@uwo.ca> wrote:
> Some other minor issues about using GAP within the notebook, under
> 2.7.1.  I've put my entire worksheet in GAP mode using the menu at
> the top.  The following things don't work correctly:
> 
> 0) If I type something that gives an error in GAP, the error
> message is buried in a python exception/backtrace.
> 
> 1) If I type "?SymmetricGroup" (which works within GAP), all I see
> is
> 
>    Help: Showing `Reference: SymmetricGroup'
>    Page from 104
> 
> It's similar with other "?foo" commands.
> 
> 2) If I type "SymmetricGroup?" and hit tab, it shows me help about
> sage's wrapped SymmetricGroup function.  I don't think this will
> be helpful for functions not wrapped by sage.
> 
> 3) When I try to use tab completion, it inserts "gap." before the
> command (and probably ignores functions not wrapper by sage).

I am aware of each of these issues (which also happen with
the other interfaces).  They are *not* features in my mind, but
bugs, and they need to be fixed by somebody (either me or
somebody else). 

William

Changed 11 years ago by was

comment:4 Changed 11 years ago by was

  • Milestone changed from sage-feature to sage-3.0.2
  • Priority changed from major to blocker
  • Summary changed from notebook -- make tab completion not stick gap. when using the notebook in gap mode to [with patch; needs review] notebook -- make tab completion not stick gap. when using the notebook in gap mode
  • Type changed from enhancement to defect

Trac #406:

  1. Fix the problem where hitting tab when switched into another worksheet mode sticks system. at the front of each completion. Similar fixes for help via foo([tab key}] and source code via foo??[tab].
  1. When switching systems, get rid of the very annoying confirmation dialog. (Just commented it out for now.)
  1. Fix *very serious* bug that prevented loading a worksheet that was set to an optional mode. In sage-3.0.1 loading a worksheet that is in an optional mode (e.g., mathematica or maple or Magma, say) was completely broken. This patch fixes that problem.

NOTE: This patch has no new tests illustrating that ift fixes anything, since we have no automated way of testing any of the above right now.

comment:5 Changed 11 years ago by nbruin

  • Summary changed from [with patch; needs review] notebook -- make tab completion not stick gap. when using the notebook in gap mode to [with patch; needs more qualified review] notebook -- make tab completion not stick gap. when using the notebook in gap mode

Patch works for me -- I have only tested that tab completion for magma is now useful. In terms of refereeing the patch, I only understood the x[len(prepend):] bit and that seems plausible to me.

comment:6 Changed 11 years ago by mhampton

  • Summary changed from [with patch; needs more qualified review] notebook -- make tab completion not stick gap. when using the notebook in gap mode to [with patch; positive review] notebook -- make tab completion not stick gap. when using the notebook in gap mode

This seems to fix the problem (part 3, that is, the others are #3152). I tested it in R mode, latex mode, gap mode, and python mode. All of these saved/reloaded OK, and were robust under switching between modes. Command completion appears fixed in R and gap (btw it would be pretty cool to have latex command completion but I assume that would be a pain). Since this is a second opinion I think it is time to give a full positive review and start merging it in.

comment:7 Changed 11 years ago by mabshoff

  • Resolution set to fixed
  • Status changed from new to closed

Merged in Sage 3.0.2.alpha1

Note: See TracTickets for help on using tickets.