guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: command-line options v2


From: Vladimir Zhbanov
Subject: Re: command-line options v2
Date: Thu, 30 Jun 2016 23:49:01 +0300
User-agent: Mutt/1.5.23 (2014-03-12)

Hi Tobin,

On Thu, Jun 30, 2016 at 08:44:11PM +1000, Tobin Harding wrote:
> Still unable to pass Guile command line options when invoked by Geiser.
> 
> I believe there is a simple scheme expression that I can put in ~/.guile to 
> add
> command-line options. I cannot find what that expression is?
> 
> Previous email to list failed to get a response, I am attempting to re-ask the
> same question here in a better fashion.
> 
> I have dug around in the source for Geiser (geiser-guile.el) and found a
> possible lead

...

> 
> Is anyone able to shed some light on this please?

If you mean the code you quoted then while it is Emacs Lisp it's
pretty similar to Scheme. I'm not an expert though I'll try to
decipher something here :-)

> (defun geiser-guile--parameters ()
  defun -> define

>   "Return a list with all parameters needed to start Guile.
> This function uses `geiser-guile-init-file' if it exists."
>   (let ((init-file (and (stringp geiser-guile-init-file)
>                         (expand-file-name geiser-guile-init-file)))
  stringp -> string?
  I don't know what expand-file-name is (I suspect it somehow
  processes the path it has, use Emacs help to find the proper
  info about it), though I see that if geiser-guile-init-file is
  string, init-file takes its value.
  
>         (q-flags (and (not geiser-guile-load-init-file-p) '("-q"))))
  IIUC, q-flags is a variable which becomes equal to "-q" if
  geiser-guile-load-init-file-p is not true (again, p == ? at the
  end of a function name)

  And next, we have a definition of the command line as a list

>   `(,@(and (listp geiser-guile-binary) (cdr geiser-guile-binary))
  listp -> list?
  if geiser-guile-binary is a list, insert here the value of its
  cdr. I don't know what its car would be, however

  Now, flags
>     ,@q-flags "-L" ,(expand-file-name "guile/" geiser-scheme-dir)

  q-flags is mentioned above, the next is "-L", and then
  "guile/${geiser-scheme-dir}", I use such a notation assuming it
  would be more convenient to read for you
  
>     ,@(apply 'append (mapcar (lambda (p) (list "-L" p))
>                              geiser-guile-load-path))
  here geiser-guile-load-path is taken and, I suspect it is a list
  :-), each its path is added with the string "-L" prepended

>     ,@(and init-file (file-readable-p init-file) (list "-l" init-file)))))

  and eventually, if init-file is defined above, and there is
  corresponding file with such a name, load its source code using
  the option "-l ${init-file}"

IIUC, you have to somehow redefine this function and add your
options to achieve what you want.

There are another way though. Just run in terminal

  guile --listen ${YOUR-OPTIONS}

and run geiser not with 'run-geiser', but using the command
'connect-to-guile' which will connect to the running process.

HTH

-- 
  Vladimir



reply via email to

[Prev in Thread] Current Thread [Next in Thread]