GNU bug report logs -
#37086
Guile Ice-9 Readline with-readline-completion-function
Previous Next
Reported by: Matthew Henry <mcthenry <at> gmail.com>
Date: Mon, 19 Aug 2019 18:02:02 UTC
Severity: normal
Tags: notabug
Done: Mark H Weaver <mhw <at> netris.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Seen in: guile (GNU Guile) 2.2.4
When using the with-readline-completion-function, the passed readline
uses the default (apropos) completion function instead of the one
provided to with-readline-completion-function.
I believe that this is because root/guile-readline/ice-9/readline.scm
has defined with-readline-completion-function as a function instead of
as a macro. The readline provided in thunk is executed before the
body of with-readline-completion-function executes and overrides
*readline-completion-function*.
As an aside, I think the API would be better if the completion
function could be provided to readline directly.
Attached is a sample program.
Below is sample output of a run of the attached program. You can see
that it's autocompleting Guile functions and variables (the default
apropos completion) rather than the provided one which should have had
only 3 options with just one starting in "th".
;;;;;;;;;;;;;;;;;;;;;;;;;;;
Prompt:
Display all 1859 possibilities? (y or n)
Prompt: th
the-eof-object the-scm-module thread-exited? thunk?
the-root-module thread? throw
Prompt: th
[readline-completion-bug.scm (application/octet-stream, attachment)]
This bug report was last modified 5 years and 274 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.