[developers] LKB FOS
J.A.Carroll at sussex.ac.uk
Thu Mar 21 23:36:30 CET 2019
Good questions! Some answers inline, below.
> On 21 Mar 2019, at 20:50, Alexandre Rademaker <arademaker at gmail.com> wrote:
> Hi John,
> Regarding the http://moin.delph-in.net/LkbFos, thank you so much for your work. It is really nice to be able to run LKB directly in my MacOS system. I have some questions, hope you can help me:
> Where can I download the fonts?
>> These are not standard macOS fonts, so you will have to download them yourself and install them - a suitable location on your machine is /opt/X11/share/fonts/TTF/
For many languages, DejaVu Sans is sufficient. I have it on my machine already as part of a TeX Live installation. If you haven't already got it you can download it through https://dejavu-fonts.github.io
> In the dialog window to select the file to load the grammar, I can’t edit the path, just navigate in the directories and click in a file name, is that the expected behaviour?
Yes. It's intended to be similar to most "Open" dialogs (in contrast to "Save" dialogs which do allow you to enter/edit a file name).
> In some windows I can ask for `output postscript`, all ps files saved in my /tmp are empty. Are you aware of this error? But I was able to obtain the Latex fragments.
I'm afraid Postscript output is rather flakey, but it should at least produce something. In the "Set Print Options" dialog that pops up after you select "Print", have you clicked on "Filename..." to set an output file? The default is no file, not a file in /tmp.
> Finally, my last question, I have the lkb_fos in my ~/hpsg/lkb_fos directory and my .emacs file ends with
> (let ((root (or (getenv "DELPHINHOME") "~/hpsg")))
> (load (format "%s/lkb_fos/emacs/dot.emacs" root) nil t t))
> The $DEPLHINHOME variable is correctly set to
> $ echo $DELPHINHOME
> But when I execute `M-x lkb`, it just open a slime-repl buffer and lkb didn’t start. Maybe the commands of dot.emacs are conflicting with my configuration of slime in my .emacs (I also use Common Lisp). Any idea?
> My .emacs contains:
> (use-package slime
> (setq slime-lisp-implementations
> '((sbcl ("/usr/local/bin/sbcl" "--dynamic-space-size" "6GB")
> :coding-system utf-8-unix)
> (mlisp10 ("/Applications/AllegroCL-10/mlisp"))
> (mlisp9 ("/Applications/AllegroCL-9/mlisp"))
> (abcl ("/usr/local/bin/abcl"))
> (ccl ("/opt/local/bin/ccl64")))
> slime-net-coding-system 'utf-8-unix
> slime-export-save-file t
> slime-contribs '(slime-fancy slime-repl slime-scratch slime-trace-dialog)
> lisp-simple-loop-indentation 1
> lisp-loop-keyword-indentation 6
> lisp-loop-forms-indentation 6)
> (global-set-key "\C-z" 'slime-selector)
> (autoload 'enable-paredit-mode "paredit"
> "Turn on pseudo-structural editing of Lisp code."
> (add-hook 'emacs-lisp-mode-hook 'enable-paredit-mode)
> (add-hook 'lisp-mode-hook 'enable-paredit-mode)
> (add-hook 'lisp-interaction-mode-hook 'enable-paredit-mode)
> (add-hook 'scheme-mode-hook 'enable-paredit-mode)
> (add-hook 'slime-repl-mode-hook 'override-slime-repl-bindings-with-paredit)
> (add-hook 'slime-load-hook (lambda () (require 'slime-fancy)))
> (add-hook 'enable-paredit-mode (lambda () (paredit-mode +1)))
> (show-paren-mode 1))
My slime and emacs setup must be different to yours since I couldn't get the above code to work. But below is something similar which does work for me. I've put it in my .emacs, replacing the expression (let ((root (or (getenv etc.
(or (getenv "DELPHINHOME") "~/delphin"))
(add-to-list 'load-path (format "%s/lkb_fos/emacs/" delphin-home))
(add-hook 'lisp-mode-hook (lambda () (slime-mode t)))
(add-hook 'inferior-lisp-mode-hook (lambda () (inferior-slime-mode t)))
(sbcl ("/usr/local/bin/sbcl" "--dynamic-space-size" "6GB")
With this, I can start the LKB by doing M-- M-x slime then at the "Lisp name:" prompt typing lkb. I hope you can get this working similarly in your setup.
More information about the developers