From: Marc Chantreux <mc@unistra.fr>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: julien@lepiller.eu, guile-user@gnu.org
Subject: Re: scheme with vim
Date: Wed, 5 Feb 2020 14:49:41 +0100 [thread overview]
Message-ID: <20200205134941.GA25455@prometheus.u-strasbg.fr> (raw)
In-Reply-To: <87ftfpqiz8.fsf@elephly.net>
hello Ricardo,
> I’m still not sure I understand exactly what the result of this should
> be (as I’m not familiar with ctags), but you can get a list of loaded
> modules and the symbols they export.
i deeply regret the way i turned my message. please forget everything
you read and start with a fresh base:
i need the list of the symbols that are available for completion. i
guess some are built-in (map, apply, define, use-module ...) and others
come from modules.
my question is: how to collect this list.
> This expression, for example, will print all symbols that are exported
> by the (texinfo) module
with GNU Guile 2.2.4, i got
ice-9/boot-9.scm:1978:2:
In procedure struct_vtable: Wrong type argument in position 1 (expecting struct): #f
but reading the code, i guess you just solved a part of the problem: get
the symbols available in 1 module.
so now i need all the default symbols. maybe we should just copy them
from a documentation instead of introspect the guile interpreter?
> You can get a hash table of all loaded modules with
> (module-submodules (resolve-module '() #f #f #:ensure #f))
which means i need to run the current code. this is tricky...
probably i should write something that:
* parses the current source
* try to find the 'use-modules' s-expr
* run it
* run your code
not my current scheme level but it should be a good exercise. i guess i
need a reader.
regards
marc
prev parent reply other threads:[~2020-02-05 13:49 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
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 [this message]
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=20200205134941.GA25455@prometheus.u-strasbg.fr \
--to=mc@unistra.fr \
--cc=guile-user@gnu.org \
--cc=julien@lepiller.eu \
--cc=rekado@elephly.net \
/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).