Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix an unexpected error during tab completion for input like a.b. when a is not a record #5250

Merged
merged 1 commit into from
Dec 9, 2022

Conversation

fingolfin
Copy link
Member

Resolves #5241 (cc @zickgraf)

@fingolfin fingolfin added kind: bug Issues describing general bugs, and PRs fixing them kind: bug: unexpected error Issues describing bugs in which computation unexpectedly encounters an error, and PRs fixing them topic: library release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes labels Dec 6, 2022
@FriedrichRober
Copy link
Contributor

So I checked your branch on my laptop right now, it doesn't throw an error anymore.

Just want to make sure, that the following behaviour is what you wanted to achieve.
I run the following code on my laptop (MacBook Pro, macOS)

gap> G := SymmetricGroup( 3 );;
gap> G.test.

Pressing tab yields a list of all available commands:

*
+
-
.
.:=
/
16Bits_AssocWord
16Bits_CombiCollector
16Bits_DepthOfPcElement
16Bits_Equal
16Bits_ExponentOfPcElement
16Bits_ExponentSums1
16Bits_ExponentSums3
16Bits_ExponentSyllable
16Bits_ExponentsOfPcElement
16Bits_ExtRepOfObj
16Bits_GeneratorSyllable
16Bits_HeadByNumber
16Bits_LeadingExponentOfPcElement
16Bits_LengthWord
16Bits_Less
16Bits_ObjByVector
16Bits_Power
16Bits_Product
16Bits_Quotient
16Bits_SingleCollector
32Bits_AssocWord
32Bits_CombiCollector
32Bits_DepthOfPcElement
32Bits_Equal
32Bits_ExponentOfPcElement
32Bits_ExponentSums1
32Bits_ExponentSums3
32Bits_ExponentSyllable
32Bits_ExponentsOfPcElement
32Bits_ExtRepOfObj
32Bits_GeneratorSyllable
32Bits_HeadByNumber
32Bits_LeadingExponentOfPcElement
32Bits_LengthWord
32Bits_Less
32Bits_ObjByVector
32Bits_Power
32Bits_Product
32Bits_Quotient
32Bits_SingleCollector
8Bits_AssocWord
8Bits_CombiCollector
8Bits_DepthOfPcElement
--More--

@fingolfin
Copy link
Member Author

@FriedrichRober thank you for the testing and feedback! Yes, this is intended behavior for now -- it just matches how GAP behaved in similar cases for years: when GAP has no matches to offer, it just suggest any identifier used as a record entry name. Of course that's not very helpful if you start with just say a.b. and it prints thousands of potential completions; but if you start with a.limitw and then it autocompletes to a.limitworkspace that could be helpful. That said, if somebody has a better idea how to deal with this situation, I'd be open to a PR to change it -- but this is way beyond the scope of this PR.

@fingolfin fingolfin merged commit 5fa2715 into gap-system:master Dec 9, 2022
@fingolfin fingolfin deleted the mh/fix-tab-completion branch December 9, 2022 08:48
@fingolfin
Copy link
Member Author

Backported to stable-4.12 via commit dbce444

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-4.12-DONE kind: bug: unexpected error Issues describing bugs in which computation unexpectedly encounters an error, and PRs fixing them kind: bug Issues describing general bugs, and PRs fixing them release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes topic: library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error in autocompletion when trying to access a component object via record access by accident
2 participants