unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: Marc Chantreux <mc@unistra.fr>
Cc: julien@lepiller.eu, guile-user@gnu.org
Subject: Re: scheme with vim
Date: Wed, 05 Feb 2020 13:58:55 +0100	[thread overview]
Message-ID: <87h805qjg0.fsf@elephly.net> (raw)
In-Reply-To: <20200129155647.GA23079@prometheus.u-strasbg.fr>


Hi Marc,

> # please be quiet
>
> a way to test a code in vim is to use the interpreter as a filter using
> the ! action (:h !) or write in a pipe.  if you do that with guile, the
> repl header is printed:
>
>     GNU Guile 2.2.4
>     Copyright (C) 1995-2017 Free Software Foundation, Inc.
>
>     Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
>     This program is free software, and you are welcome to redistribute it
>     under certain conditions; type `,show c' for details.
>
> i wrote a wrapper:
>
>     guile_as_filter () {
>         local x=$( mktemp /tmp/guile-as-filter-XXXXX )
>         cat "$@" > $x
>         guile -s $x
>         rm $x
>     }
>
> then i got
>
>     ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
>     ;;;       or pass the --no-auto-compile argument to disable.
>     ;;; compiling /tmp/guile-as-filter-RTGLe
>     ;;; compiled /home/mc/.cache/guile/ccache/2.2-LE-8-3.A/tmp/guile-as-filter-RTGLe.go
>
> is there a way to restrict stderr and stdout to the content produced by
> the actual script ?  (also interesting for a quickfix errformat)

Does it make sense for your application to auto compile sources at all?
If not you can disable it by passing “--no-auto-compile” as an option to
your invocation of Guile in “guile_as_filter”.

I also wonder if perhaps it would be better to start a Guile REPL and
have vim send S-expressions to the socket instead of saving a temporary
file and starting a new Guile process every time.

--
Ricardo



  parent reply	other threads:[~2020-02-05 12:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-29 15:56 scheme with vim Marc Chantreux
2020-01-29 18:34 ` Ricardo Wurmus
2020-01-29 20:29   ` zimoun
2020-01-29 20:53     ` Marc Chantreux
2020-01-29 21:04       ` zimoun
2020-02-05 12:58 ` Ricardo Wurmus [this message]
2020-02-05 14:26   ` Marc Chantreux
2020-02-05 13:08 ` Ricardo Wurmus
2020-02-05 13:26   ` zimoun
2020-02-05 13:52     ` Marc Chantreux
2020-02-05 15:39       ` zimoun
2020-02-05 16:56         ` Eli Zaretskii
2020-02-05 13:49   ` Marc Chantreux

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=87h805qjg0.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=guile-user@gnu.org \
    --cc=julien@lepiller.eu \
    --cc=mc@unistra.fr \
    /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).