GNU bug report logs -
#45339
Readline filename completion
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 45339 in the body.
You can then email your comments to 45339 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guile <at> gnu.org
:
bug#45339
; Package
guile
.
(Sun, 20 Dec 2020 14:55:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Jakub Wojciech" <jakub-w <at> riseup.net>
:
New bug report received and forwarded. Copy sent to
bug-guile <at> gnu.org
.
(Sun, 20 Dec 2020 14:55:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi. Filename completion just doesn't work at all. Using
filename-completion-function as a completer for readline always throws
an error.
Minimal example:
(use-modules (ice-9 readline))
(with-readline-completion-function
filename-completion-function
readline)
Hitting TAB when prompted results in:
File: Backtrace:
In ice-9/boot-9.scm:
1736:10 8 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In unknown file:
7 (apply-smob/0 #<thunk 7ffa51f5e500>)
In ice-9/boot-9.scm:
718:2 6 (call-with-prompt _ _ #<procedure default-prompt-handler (k proc)>)
In ice-9/eval.scm:
619:8 5 (_ #(#(#<directory (guile-user) 7ffa51f63c80>)))
In ice-9/boot-9.scm:
2806:4 4 (save-module-excursion _)
4351:12 3 (_)
In ice-9/readline.scm:
213:4 2 (with-readline-completion-function _ #<procedure 7ffa4f684328 at /data/lampilelo/Misc-Scripts/install-wizard.scm:27:1 ()>)
In unknown file:
1 (%readline "File: " #<input: file /dev/pts/1> #<undefined> #<undefined>)
0 (filename-completion-function "" #t)
ERROR: In procedure filename-completion-function:
In procedure scm_from_stringn: NULL string pointer
My version of Guile is 3.0.4 but I expect it to fail on every version.
It results in an error because the scm_filename_completion_function()
calls readline's rl_filename_completion_function() and doesn't check if
it returned NULL instead of a string.
Readline's info manual states:
"The generator function returns '(char *)NULL' to inform
'rl_completion_matches()' that there are no more possibilities left."
So it's impossible for the current implementation to work, since
scm_filename_completion_function() throws an error every time NULL is
returned.
I'm attaching a patch.
Jakub
[0001-Fixed-filename-completion-function-for-readline-comp.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]
Added tag(s) patch.
Request was from
"" <jakub-w <at> riseup.net>
to
control <at> debbugs.gnu.org
.
(Wed, 28 Apr 2021 14:55:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-guile <at> gnu.org
:
bug#45339
; Package
guile
.
(Wed, 19 May 2021 15:27:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 45339 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Since my patch didn't follow GNU C style here's an update.
Sorry guys!
[Fixed-style-for-02439a124.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]
Reply sent
to
lloda <lloda <at> sarc.name>
:
You have taken responsibility.
(Wed, 19 May 2021 19:31:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
"Jakub Wojciech" <jakub-w <at> riseup.net>
:
bug acknowledged by developer.
(Wed, 19 May 2021 19:31:01 GMT)
Full text and
rfc822 format available.
Message #15 received at 45339-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Applied in f3a23edf9ed111caab7bbad583874ad34ff8652d. Thanks!
> On 19 May 2021, at 17:24, "" <jakub-w <at> riseup.net> <jakub-w <at> riseup.net> wrote:
>
> Since my patch didn't follow GNU C style here's an update.
> Sorry guys!
>
[Fixed-style-for-02439a124.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 17 Jun 2021 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 311 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.