Tab completion is broken again in the Sage backend. Using Cantor 0.5 (it's not possible to choose it in the version field), Sage 6.0 Reproducible: Always Steps to Reproduce: 1.Start a new Sage session 2.Evaluate "a=5" 3.Type "a."+(tab) Actual Results: No completions Expected Results: List of completions From the debug output, the completions list is retrieved correctly from the backend, but not displayed: cantor(29735) WorksheetTextItem::sceneEvent: ShortcutOverride 16777217 QFlags() cantor(29735) SageSession::evaluateExpression: evaluating: "__cantor_enable_typesetting(false)" cantor(29735) SageExpression::SageExpression: cantor(29735) SageExpression::evaluate: evaluating "__cantor_enable_typesetting(false)" cantor(29735) CantorPart::worksheetStatusChanged: wsStatusChange 0 cantor(29735) SageSession::runFirstExpression: writing "__cantor_enable_typesetting(false)" to the process cantor(29735) SageSession::evaluateExpression: evaluating: "__hist_tmp__=_; __CANTOR_IPYTHON_SHELL__.complete("a.");_=__hist_tmp__" cantor(29735) SageExpression::SageExpression: cantor(29735) SageExpression::evaluate: evaluating "__hist_tmp__=_; __CANTOR_IPYTHON_SHELL__.complete("a.");_=__hist_tmp__" cantor(29735) SageSession::evaluateExpression: evaluating: "__cantor_enable_typesetting(true)" cantor(29735) SageExpression::SageExpression: cantor(29735) SageExpression::evaluate: evaluating "__cantor_enable_typesetting(true)" cantor(29735) SageSession::readStdOut: out: "sage: sage: " cantor(29735) SageExpression::parseOutput: got prompt 0 -1 cantor(29735) SageExpression::parseOutput: got prompt 0 -1 cantor(29735) SageExpression::evalFinished: evaluation finished cantor(29735) SageExpression::evalFinished: "" cantor(29735) Cantor::Expression::setResult: settting result to a type 1 result cantor(29735) SageSession::runFirstExpression: writing "__hist_tmp__=_; __CANTOR_IPYTHON_SHELL__.complete("a.");_=__hist_tmp__" to the process cantor(29735) SageSession::readStdOut: out: "('a.', ['a.N', 'a.abs', 'a.additive_order', 'a.base_extend', 'a.base_ring', 'a.binary', " cantor(29735) SageSession::readStdOut: out: " 'a.binomial', 'a.bits', 'a.cartesian_product', 'a.category', 'a.ceil', 'a.conjugate', 'a.coprime_integers', 'a.crt', 'a.db', 'a.degree', 'a.denominator', 'a.digits', 'a.divide_knowing_divisible_by', 'a.divides', 'a.divisors', 'a.dump', 'a.dumps', 'a.exact_log', 'a.exp', 'a.factor', 'a.factorial', 'a.floor', 'a.gamma', 'a.gcd', 'a.global_height', " cantor(29735) SageSession::readStdOut: out: " 'a.imag', 'a.inverse_mod', 'a.inverse_of_unit', 'a.is_idempotent', 'a.is_integral', 'a.is_irreducible', 'a.is_nilpotent', 'a.is_norm', 'a.is_one', 'a.is_perfect_power', 'a.is_power', 'a.is_power_of', 'a.is_prime', " cantor(29735) SageSession::readStdOut: out: " 'a.is_prime_power', 'a.is_pseudoprime', 'a.is_square', 'a.is_squarefree', 'a.is_unit', 'a.is_zero', 'a.isqrt', 'a.jacobi'," cantor(29735) SageSession::readStdOut: out: " 'a.kronecker', 'a.lcm', 'a.leading_coefficient', 'a.list', 'a.log', 'a.mod', " cantor(29735) SageSession::readStdOut: out: " 'a.multifactorial', 'a.multiplicative_order', 'a.n', 'a.nbits', 'a.ndigits', " cantor(29735) SageSession::readStdOut: out: " 'a.next_prime', 'a.next_probable_prime', 'a.nth_root', 'a.numerator', 'a.numerical_approx'," cantor(29735) SageSession::readStdOut: out: " 'a.odd_part', 'a.ord', 'a.order', 'a.ordinal_str', " cantor(29735) SageSession::readStdOut: out: " 'a.parent', 'a.perfect_power', 'a.popcount', 'a.powermod', 'a.powermodm_ui', " cantor(29735) SageSession::readStdOut: out: " 'a.prime_divisors', 'a.prime_factors', 'a.prime_to_m_part', 'a.quo_rem', " cantor(29735) SageSession::readStdOut: out: " 'a.radical', 'a.rational_reconstruction', 'a.real', 'a.rename', 'a.reset_name', 'a.save'," cantor(29735) SageSession::readStdOut: out: " 'a.sign', 'a.sqrt', 'a.sqrt_approx', 'a.sqrtrem', 'a.squarefree_part', " cantor(29735) SageSession::readStdOut: out: " 'a.str', 'a.subs', 'a.substitute', 'a.support', 'a.test_bit'," cantor(29735) SageSession::readStdOut: out: " 'a.trailing_zero_bits', 'a.trial_division', 'a.val_unit', 'a.valuation', " cantor(29735) SageSession::readStdOut: out: " 'a.version', 'a.xgcd']) " cantor(29735) SageSession::readStdOut: out: "sage: " cantor(29735) SageExpression::parseOutput: got prompt 0 -1 cantor(29735) SageSession::readStdOut: out: "sage: " cantor(29735) SageExpression::parseOutput: got prompt 0 -1 cantor(29735) SageExpression::evalFinished: evaluation finished cantor(29735) SageExpression::evalFinished: "('a.', ['a.N', 'a.abs', 'a.additive_order', 'a.base_extend', 'a.base_ring', 'a.binary', 'a.binomial', 'a.bits', 'a.cartesian_product', 'a.category', 'a.ceil', 'a.conjugate', 'a.coprime_integers', 'a.crt', 'a.db', 'a.degree', 'a.denominator', 'a.digits', 'a.divide_knowing_divisible_by', 'a.divides', 'a.divisors', 'a.dump', 'a.dumps', 'a.exact_log', 'a.exp', 'a.factor', 'a.factorial', 'a.floor', 'a.gamma', 'a.gcd', 'a.global_height', 'a.imag', 'a.inverse_mod', 'a.inverse_of_unit', 'a.is_idempotent', 'a.is_integral', 'a.is_irreducible', 'a.is_nilpotent', 'a.is_norm', 'a.is_one', 'a.is_perfect_power', 'a.is_power', 'a.is_power_of', 'a.is_prime', 'a.is_prime_power', 'a.is_pseudoprime', 'a.is_square', 'a.is_squarefree', 'a.is_unit', 'a.is_zero', 'a.isqrt', 'a.jacobi', 'a.kronecker', 'a.lcm', 'a.leading_coefficient', 'a.list', 'a.log', 'a.mod', 'a.multifactorial', 'a.multiplicative_order', 'a.n', 'a.nbits', 'a.ndigits', 'a.next_prime', 'a.next_probable_prime', 'a.nth_root', 'a.numerator', 'a.numerical_approx', 'a.odd_part', 'a.ord', 'a.order', 'a.ordinal_str', 'a.parent', 'a.perfect_power', 'a.popcount', 'a.powermod', 'a.powermodm_ui', 'a.prime_divisors', 'a.prime_factors', 'a.prime_to_m_part', 'a.quo_rem', 'a.radical', 'a.rational_reconstruction', 'a.real', 'a.rename', 'a.reset_name', 'a.save', 'a.sign', 'a.sqrt', 'a.sqrt_approx', 'a.sqrtrem', 'a.squarefree_part', 'a.str', 'a.subs', 'a.substitute', 'a.support', 'a.test_bit', 'a.trailing_zero_bits', 'a.trial_division', 'a.val_unit', 'a.valuation', 'a.version', 'a.xgcd'])" cantor(29735) Cantor::Expression::setResult: settting result to a type 1 result cantor(29735) CommandEntry::showCompletions: completion: "a." cantor(29735) CommandEntry::showCompletions: showing ("a.") cantor(29735) CommandEntry::completeCommandTo: completion: "a." cantor(29735) SageSession::runFirstExpression: writing "__cantor_enable_typesetting(true)" to the process cantor(29735) SageSession::evaluateExpression: evaluating: "__cantor_internal__ = _; type(a.); _ = __cantor_internal__" cantor(29735) SageExpression::SageExpression: cantor(29735) SageExpression::evaluate: evaluating "__cantor_internal__ = _; type(a.); _ = __cantor_internal__" cantor(29735) SageSession::readStdOut: out: "sage: sage: " cantor(29735) SageExpression::parseOutput: got prompt 0 -1 cantor(29735) SageExpression::parseOutput: got prompt 0 -1 cantor(29735) SageExpression::evalFinished: evaluation finished cantor(29735) SageExpression::evalFinished: "" cantor(29735) Cantor::Expression::setResult: settting result to a type 1 result cantor(29735) SageSession::runFirstExpression: writing "__cantor_internal__ = _; type(a.); _ = __cantor_internal__" to the process cantor(29735) SageSession::readStdOut: out: " File "<ipython-input-69-939d09e23660>", line 1 __cantor_internal__ = _; type(a.); _ = __cantor_internal__ ^ SyntaxError: invalid syntax " cantor(29735) SageSession::readStdOut: out: "sage: " cantor(29735) SageExpression::parseOutput: got prompt 0 -1 cantor(29735) SageSession::readStdOut: out: "sage: " cantor(29735) SageExpression::parseOutput: got prompt 0 -1 cantor(29735) SageExpression::evalFinished: evaluation finished cantor(29735) SageExpression::evalFinished: "File "<ipython-input-69-939d09e23660>", line 1 __cantor_internal__ = _; type(a.); _ = __cantor_internal__ ^ SyntaxError: invalid syntax" cantor(29735) Cantor::Expression::setResult: settting result to a type 1 result cantor(29735) CommandEntry::completeLineTo: line completion: "a." cantor(29735) CantorPart::worksheetStatusChanged: wsStatusChange 1
Git commit f6f01298a5d86fb7dfe1d829df2e4c4cc35b4c44 by Alexander Rieder. Committed on 01/02/2014 at 18:50. Pushed by arieder into branch 'KDE/4.12'. fix reversed comparison when determining if legacy mode is needed for tab completion in sage backend. Thanks to Yichao Zhou for spotting this. CCMAIL: broken.zhou@gmail.com M +1 -1 src/backends/sage/sagecompletionobject.cpp http://commits.kde.org/cantor/f6f01298a5d86fb7dfe1d829df2e4c4cc35b4c44
Git commit 34490e5043ae0964a05bd69177c21819a2fefe32 by Alexander Rieder. Committed on 01/02/2014 at 18:50. Pushed by arieder into branch 'master'. fix reversed comparison when determining if legacy mode is needed for tab completion in sage backend. Thanks to Yichao Zhou for spotting this. (cherry picked from commit f6f01298a5d86fb7dfe1d829df2e4c4cc35b4c44) M +1 -1 src/backends/sage/sagecompletionobject.cpp http://commits.kde.org/cantor/34490e5043ae0964a05bd69177c21819a2fefe32