BaseX 13: GUI Autocomplete removing underscore in variable

Thursday, 12 November 2026 · 7 messages · last reply 16 Nov 2026
ZD
Zimmel, Daniel12 Nov 2026 17:50 #

Hi,

with the following declaration in XQuery:

declare variable $param_1 := true();

... when I confirm the selection from the new autocompletion suggestion, then this action eats the underscore:

$param1

This should not happen, should it?

Thanks, Daniel

CG
Christian Grün12 Nov 2026 18:27 #

Hi Daniel,

True, it shouldn’t. And it won’t anymore, the bug has been fixed. BaseX 13.1 will be released later this month. A new snapshot will be available as soon as our provider will allow uploads again.

Best, Christian

Quoted text · Daniel · 14 lines
Zimmel, Daniel via BaseX-Talk <basex-talk at mailman.uni-konstanz.de> schrieb am Donnerstag, 12. November 2026 um 17:51: > Hi, > > with the following declaration in XQuery: > > declare variable $param_1 := true(); > > ... when I confirm the selection from the new autocompletion suggestion, then this action eats the underscore: > > $param1 > > This should not happen, should it? > > Thanks, Daniel
ML
Marco Lettere13 Nov 2026 09:55 #

Thanks. It was annoying also when _ is used as module namespace prefix.

One place where code-completion feels a bit too intrusive is the attempt to suggest completions for the "else" keyword when "always" suggesting is on.

Would it be possible to treat "else" less eagerly?

Thanks.

M.

Quoted text · Christian Grün · 30 lines
On 11/12/26 18:27, Christian Grün via BaseX-Talk wrote: > Hi Daniel, > > True, it shouldn’t. And it won’t anymore, the bug has been fixed. > BaseX 13.1 will be released later this month. A new snapshot will be > available as soon as our provider will allow uploads again. > > Best, > Christian > ____________________________________ > > Zimmel, Daniel via BaseX-Talk <basex-talk at mailman.uni-konstanz.de> > schrieb am Donnerstag, 12. November 2026 um 17:51: >> Hi, >> >> with the following declaration in XQuery: >> >> declare variable $param_1 := true(); >> >> ... when I confirm the selection from the new autocompletion >> suggestion, then this action eats the underscore: >> >> $param1 >> >> This should not happen, should it? >> >> Thanks, Daniel >> >> >
CG
Christian Grün16 Nov 2026 10:56 #

Hi Marco,

I am not sure I understood your request: what would you expect to change in the current code completion mechanism?

Best, Christian

Quoted text · Marco Lettere · 36 lines
Marco Lettere via BaseX-Talk <basex-talk at mailman.uni-konstanz.de> schrieb am Freitag, 13. November 2026 um 09:56: > Thanks. It was annoying also when _ is used as module namespace prefix. > > One place where code-completion feels a bit too intrusive is the attempt to suggest completions for the "else" keyword when "always" suggesting is on. > > Would it be possible to treat "else" less eagerly? > > Thanks. > > M. > > On 11/12/26 18:27, Christian Grün via BaseX-Talk wrote: > >> Hi Daniel, >> >> True, it shouldn’t. And it won’t anymore, the bug has been fixed. BaseX 13.1 will be released later this month. A new snapshot will be available as soon as our provider will allow uploads again. >> >> Best, >> Christian >> ____________________________________ >> >> Zimmel, Daniel via BaseX-Talk [<basex-talk at mailman.uni-konstanz.de>](mailto:basex-talk at mailman.uni-konstanz.de) schrieb am Donnerstag, 12. November 2026 um 17:51: >> >>> Hi, >>> >>> with the following declaration in XQuery: >>> >>> declare variable $param_1 := true(); >>> >>> ... when I confirm the selection from the new autocompletion suggestion, then this action eats the underscore: >>> >>> $param1 >>> >>> This should not happen, should it? >>> >>> Thanks, Daniel
ML
Marco Lettere16 Nov 2026 11:18 #

Hi Christian,

sorry for appearing pedantic but this is hitting me a lot of times :-).

When I want to write the following code:

if (1 eq 2) then "a" else "b"

pressing ENTER for a carriage return after "then" expands to

if (1 eq 2) ends-with-subsequence()

and same, ENTER after "else" expands to:

if (1 eq 2) then "a" element-conversion-plan-record()

In order to avoid this I have to train my fingers to insert an extra space or ESC press before ENTER. :-)

I think that for "then" and "else" the first suggestions (automatically accepted with ENTER) should be "then" and "else" respectively because these are keywords of the language and much more on target than the proposed function calls.

Or maybe just avoid proposing anything when it's that much off target.

Regards,

Marco.

Quoted text · Christian Grün · 56 lines
On 11/16/26 10:56, Christian Grün wrote: > Hi Marco, > > I am not sure I understood your request: what would you expect to > change in the current code completion mechanism? > > Best, > Christian > ____________________________________ > > Marco Lettere via BaseX-Talk <basex-talk at mailman.uni-konstanz.de> > schrieb am Freitag, 13. November 2026 um 09:56: >> >> Thanks. It was annoying also when _ is used as module namespace prefix. >> >> One place where code-completion feels a bit too intrusive is the >> attempt to suggest completions for the "else" keyword when "always" >> suggesting is on. >> >> Would it be possible to treat "else" less eagerly? >> >> Thanks. >> >> M. >> >> On 11/12/26 18:27, Christian Grün via BaseX-Talk wrote: >>> Hi Daniel, >>> >>> True, it shouldn’t. And it won’t anymore, the bug has been fixed. >>> BaseX 13.1 will be released later this month. A new snapshot will be >>> available as soon as our provider will allow uploads again. >>> >>> Best, >>> Christian >>> ____________________________________ >>> >>> Zimmel, Daniel via BaseX-Talk <basex-talk at mailman.uni-konstanz.de> >>> schrieb am Donnerstag, 12. November 2026 um 17:51: >>>> Hi, >>>> >>>> with the following declaration in XQuery: >>>> >>>> declare variable $param_1 := true(); >>>> >>>> ... when I confirm the selection from the new autocompletion >>>> suggestion, then this action eats the underscore: >>>> >>>> $param1 >>>> >>>> This should not happen, should it? >>>> >>>> Thanks, Daniel >>>> >>>> >>> >
CG
Christian Grün16 Nov 2026 11:26 #

Hi Marco,

Not pedantic at all. The old completion also accepted candidates that contain the typed characters with gaps in between (t…h…e…n in “ends-with-subsequence”), which is why ENTER replaced your keyword with a function name.

I would have guessed that this is fixed in BaseX 13: If you type “th” after “if (…)”, “then” is the first suggestion; if you type “then” in full, no popup appears and ENTER inserts a line break. Can you give it another try?

Best, Christian

Quoted text · Marco Lettere · 79 lines
Marco Lettere <m.lettere at gmail.com> schrieb am Montag, 16. November 2026 um 11:18: > Hi Christian, > > sorry for appearing pedantic but this is hitting me a lot of times :-). > > When I want to write the following code: > > if (1 eq 2) then > "a" > else > "b" > > pressing ENTER for a carriage return after "then" expands to > > if (1 eq 2) ends-with-subsequence() > > and same, ENTER after "else" expands to: > > if (1 eq 2) then > "a" > element-conversion-plan-record() > > In order to avoid this I have to train my fingers to insert an extra space or ESC press before ENTER. :-) > > I think that for "then" and "else" the first suggestions (automatically accepted with ENTER) should be "then" and "else" respectively because these are keywords of the language and much more on target than the proposed function calls. > > Or maybe just avoid proposing anything when it's that much off target. > > Regards, > > Marco. > > On 11/16/26 10:56, Christian Grün wrote: > >> Hi Marco, >> >> I am not sure I understood your request: what would you expect to change in the current code completion mechanism? >> >> Best, >> Christian >> ____________________________________ >> >> Marco Lettere via BaseX-Talk [<basex-talk at mailman.uni-konstanz.de>](mailto:basex-talk at mailman.uni-konstanz.de) schrieb am Freitag, 13. November 2026 um 09:56: >> >>> Thanks. It was annoying also when _ is used as module namespace prefix. >>> >>> One place where code-completion feels a bit too intrusive is the attempt to suggest completions for the "else" keyword when "always" suggesting is on. >>> >>> Would it be possible to treat "else" less eagerly? >>> >>> Thanks. >>> >>> M. >>> >>> On 11/12/26 18:27, Christian Grün via BaseX-Talk wrote: >>> >>>> Hi Daniel, >>>> >>>> True, it shouldn’t. And it won’t anymore, the bug has been fixed. BaseX 13.1 will be released later this month. A new snapshot will be available as soon as our provider will allow uploads again. >>>> >>>> Best, >>>> Christian >>>> ____________________________________ >>>> >>>> Zimmel, Daniel via BaseX-Talk [<basex-talk at mailman.uni-konstanz.de>](mailto:basex-talk at mailman.uni-konstanz.de) schrieb am Donnerstag, 12. November 2026 um 17:51: >>>> >>>>> Hi, >>>>> >>>>> with the following declaration in XQuery: >>>>> >>>>> declare variable $param_1 := true(); >>>>> >>>>> ... when I confirm the selection from the new autocompletion suggestion, then this action eats the underscore: >>>>> >>>>> $param1 >>>>> >>>>> This should not happen, should it? >>>>> >>>>> Thanks, Daniel
ML
Marco Lettere16 Nov 2026 11:33 #

Oh, you're right.

I was still using a 13.0beta c89b...

Much better on the official 13.0.

Sorry again, I'll move ahead immediately.

M.

Quoted text · Christian Grün · 112 lines
On 11/16/26 11:26, Christian Grün wrote: > Hi Marco, > > Not pedantic at all. The old completion also accepted candidates that > contain the typed characters with gaps in between (t…h…e…n in > “ends-with-subsequence”), which is why ENTER replaced your keyword > with a function name. > > I would have guessed that this is fixed in BaseX 13: If you type “th” > after “if (…)”, “then” is the first suggestion; if you type “then” in > full, no popup appears and ENTER inserts a line break. Can you give it > another try? > > Best, > Christian > > > Marco Lettere <m.lettere at gmail.com> schrieb am Montag, 16. November > 2026 um 11:18: >> >> Hi Christian, >> >> sorry for appearing pedantic but this is hitting me a lot of times :-). >> >> When I want to write the following code: >> >> if (1 eq 2) then >> "a" >> else >> "b" >> >> pressing ENTER for a carriage return after "then" expands to >> >> if (1 eq 2) ends-with-subsequence() >> >> and same, ENTER after "else" expands to: >> >> if (1 eq 2) then >> "a" >> element-conversion-plan-record() >> >> In order to avoid this I have to train my fingers to insert an extra >> space or ESC press before ENTER. :-) >> >> I think that for "then" and "else" the first suggestions >> (automatically accepted with ENTER) should be "then" and "else" >> respectively because these are keywords of the language and much more >> on target than the proposed function calls. >> >> Or maybe just avoid proposing anything when it's that much off target. >> >> Regards, >> >> Marco. >> >> On 11/16/26 10:56, Christian Grün wrote: >>> Hi Marco, >>> >>> I am not sure I understood your request: what would you expect to >>> change in the current code completion mechanism? >>> >>> Best, >>> Christian >>> ____________________________________ >>> >>> Marco Lettere via BaseX-Talk <basex-talk at mailman.uni-konstanz.de> >>> schrieb am Freitag, 13. November 2026 um 09:56: >>>> >>>> Thanks. It was annoying also when _ is used as module namespace prefix. >>>> >>>> One place where code-completion feels a bit too intrusive is the >>>> attempt to suggest completions for the "else" keyword when "always" >>>> suggesting is on. >>>> >>>> Would it be possible to treat "else" less eagerly? >>>> >>>> Thanks. >>>> >>>> M. >>>> >>>> On 11/12/26 18:27, Christian Grün via BaseX-Talk wrote: >>>>> Hi Daniel, >>>>> >>>>> True, it shouldn’t. And it won’t anymore, the bug has been fixed. >>>>> BaseX 13.1 will be released later this month. A new snapshot will >>>>> be available as soon as our provider will allow uploads again. >>>>> >>>>> Best, >>>>> Christian >>>>> ____________________________________ >>>>> >>>>> Zimmel, Daniel via BaseX-Talk <basex-talk at mailman.uni-konstanz.de> >>>>> schrieb am Donnerstag, 12. November 2026 um 17:51: >>>>>> Hi, >>>>>> >>>>>> with the following declaration in XQuery: >>>>>> >>>>>> declare variable $param_1 := true(); >>>>>> >>>>>> ... when I confirm the selection from the new autocompletion >>>>>> suggestion, then this action eats the underscore: >>>>>> >>>>>> $param1 >>>>>> >>>>>> This should not happen, should it? >>>>>> >>>>>> Thanks, Daniel >>>>>> >>>>>> >>>>> >>> >

⚡Generated with XQuery