From: Bruce Korb <bruce.korb@gmail.com>
Cc: guile-devel@gnu.org
Subject: Re: I don't want to maintain this
Date: Tue, 29 Nov 2005 12:14:36 -0800 [thread overview]
Message-ID: <200511291214.37104.bruce.korb@gmail.com> (raw)
In-Reply-To: <8764qbuawp.fsf@laas.fr>
On Tuesday 29 November 2005 12:16 am, Ludovic Courtès wrote:
> Hi,
>
> Bruce Korb <bruce.korb@gmail.com> writes:
>
> > Grumble, grumble. Anyway, this belongs in your code. We argued about this
> > before and someone said, "well, you could do it in any of several ways,
> > so we won't do it at all." This function is entirely equivalent to
> > "scm_c_eval_string" except that error results show file name and line
> > number.
>
> Sorry if I'm just re-stating what you were already answered: Can't you
> implement this as a small Scheme procedure? Something along the lines
> of:
Hi Ludovic,
*I* certainly cannot. And I do not understand the usage of the "file"
argument. What I am doing is extracting Scheme code from an encompassing
template and handing it off for evaluation. My program is reading the
file, not Guile. When I hand off the the string for evaluation, I hand
it to that ugly thing that I do not want to maintain. I do this in
exactly the same way as one would with scm_c_eval_string, except I have
the additional parameters file name and line number. Perhaps I could
wrap my strings in something like this:
char* fmt =
"(read-enable 'positions)
(format #t \"evaluating `~a' from ~a:~a:~a~%%\"
sexp (port-filename (current-input-port))
(source-property sexp \"%s\")
(source-property sexp %d))
(begin
%s
)";
and use it thus:
sprintf( buf, fmt, filename, linenum, script );
result = scm_c_eval_string( buf );
Would that work?
Your help is _surely_ appreciated!! Thank you.
Kind regards, Bruce
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
next prev parent reply other threads:[~2005-11-29 20:14 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-28 4:25 I don't want to maintain this Bruce Korb
2005-11-29 8:16 ` Ludovic Courtès
2005-11-29 20:14 ` Bruce Korb [this message]
2005-11-30 8:39 ` Ludovic Courtès
2005-11-30 12:30 ` Bruce Korb
2005-11-30 13:46 ` Ludovic Courtès
2005-11-30 14:00 ` Bruce Korb
2005-11-30 14:44 ` Getting source location information Ludovic Courtès
2005-11-30 15:30 ` Bruce Korb
2005-11-30 16:04 ` Ludovic Courtès
2005-11-30 16:58 ` Bruce Korb
2005-11-30 17:39 ` Ludovic Courtès
2005-12-01 12:19 ` Ludovic Courtès
2005-11-30 19:00 ` Rob Browning
2005-11-30 20:53 ` Bruce Korb
2005-11-30 22:35 ` Rob Browning
2005-11-30 23:30 ` Bruce Korb
2005-12-14 21:54 ` Kevin Ryde
2005-11-30 23:45 ` Han-Wen Nienhuys
2005-12-01 0:30 ` I don't want to maintain this Kevin Ryde
2005-12-01 0:38 ` Kevin Ryde
2005-12-07 0:36 ` Marius Vollmer
-- strict thread matches above, loose matches on Subject: below --
2005-11-28 4:27 Bruce Korb
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200511291214.37104.bruce.korb@gmail.com \
--to=bruce.korb@gmail.com \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).