unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#28295: better error messages: missing closing parenthesis
@ 2017-08-30 14:10 Ricardo Wurmus
  2017-10-10 21:18 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Ricardo Wurmus @ 2017-08-30 14:10 UTC (permalink / raw)
  To: 28295

A person who does not use paredit can easily create a source file that
does not have matching parentheses.  Loading a broken file currently
produces an error like this:

--8<---------------cut here---------------start------------->8---
$ guile -e '(hello'
ERROR: In procedure read:
ERROR: In procedure scm_i_lreadparen: #<unknown port>:1:7: end of file
--8<---------------cut here---------------end--------------->8---

For new users it is not obvious that this error message means that a
closing parenthesis is missing.

Can the message be improved?

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net






^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#28295: better error messages: missing closing parenthesis
  2017-08-30 14:10 bug#28295: better error messages: missing closing parenthesis Ricardo Wurmus
@ 2017-10-10 21:18 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2017-10-10 21:18 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: 28295

Ricardo Wurmus <rekado@elephly.net> skribis:

> A person who does not use paredit can easily create a source file that
> does not have matching parentheses.  Loading a broken file currently
> produces an error like this:
>
> $ guile -e '(hello'
> ERROR: In procedure read:
> ERROR: In procedure scm_i_lreadparen: #<unknown port>:1:7: end of file
>
> For new users it is not obvious that this error message means that a
> closing parenthesis is missing.
>
> Can the message be improved?

In Guix I worked around this with:

  https://git.savannah.gnu.org/cgit/guix.git/commit/?id=a6e22d84450450cacc6fc36445f6ae378a5b7ad0

A bit of a hack, but it looks better:

  configuration.scm:135:1: missing closing parenthesis

In Guile proper, we could replace “end of file” with “missing closing
parenthesis”, which would already be an improvement, though we’d still
see that “scm_i_lreadparen” and maybe “ice-9” here and there.

Ludo’.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-10 21:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-30 14:10 bug#28295: better error messages: missing closing parenthesis Ricardo Wurmus
2017-10-10 21:18 ` Ludovic Courtès

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).