15
$\begingroup$

When I input the following line in version 8, and press Ctrl+K after Re, I can get a drop-down auto-completion list including Rectangle:

enter image description here

But the same input in version 9 gives me only one candidate:

enter image description here

and the short-cut key Ctrl+K seems not working.

Questions:

Is there any thing I missed?

How can I get a drop-down auto-completion menu with a full candidates list?

My operation system is Windows 7 64-bit.

$\endgroup$
8
  • 1
    $\begingroup$ same behaviour on OS X $\endgroup$
    – acl
    Commented Dec 1, 2012 at 3:45
  • $\begingroup$ @acl Would it be some kind of context sensitive feature? I can get Rectangle in Graphics[{Black, Re}]. $\endgroup$
    – Silvia
    Commented Dec 1, 2012 at 3:55
  • 5
    $\begingroup$ The completions are context sensitive, and it seems be be getting confused in this case. Prolog->Re will offer Rectangle as a completion, but not Prolog->{Re. $\endgroup$ Commented Dec 1, 2012 at 3:58
  • 4
    $\begingroup$ Looks like you can work around this by using Prolog->List[ instead. $\endgroup$ Commented Dec 1, 2012 at 4:42
  • 1
    $\begingroup$ The bug described in this question seems to be fixed with Version 9.0.1.0 $\endgroup$
    – Lev Bishop
    Commented Feb 21, 2013 at 19:29

2 Answers 2

3
$\begingroup$

Seems that you can work around this by modifying for example SyntaxInformation[Plot]={"ArgumentsPattern" -> {_, _, _}}, at the cost of having incorrect syntax highlighting.

For some reason, setting SyntaxInformation[Plot]={"ArgumentsPattern" -> {_, {_,_,_}, __}} isn't sufficient to kill the Options[Plot] pattern matching, and I haven't found a form of the pattern that gives Rectangle as an autocompletion without also messing up the highlighting.

$\endgroup$
1
  • $\begingroup$ +1 I didn't think the ArgumentsPattern can be relevant! $\endgroup$
    – Silvia
    Commented Dec 2, 2012 at 12:27
2
$\begingroup$

seems like a bug and should be reported to [email protected].

Noticed when I miss-spelled Plot and wrote PLot instead, the correct auto-completion came up. This tells me the context of another command before on the same line, which is Plot in this case, was confusing the Auto-complete for the next command on the same line.

One temporary solution (not perfect) is to define the options on separate lines. Now auto-complete works, since it is not distracted any more

enter image description here

$\endgroup$
1
  • $\begingroup$ I personally like the typo solution, with the CaseSensitiveCommandCompletion off :) $\endgroup$
    – Silvia
    Commented Dec 2, 2012 at 12:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.