Coder Social home page Coder Social logo

sly's Introduction

Build Status MELPA

          _____    __   __  __        
         / ___/   / /   \ \/ /               |\      _,,,---,,_
         \__ \   / /     \  /                /,`.-'`'    -.  ;-;;,_
        ___/ /  / /___   / /                |,4-  ) )-,_..;\ (  `'-'
       /____/  /_____/  /_/                '---''(_/--'  `-'\_)

SLY is Sylvester the Cat's Common Lisp IDE for Emacs:

SLY's highlights are:

SLY is a fork of SLIME. We tracks its bugfixes, particularly to the implementation backends. All SLIME's familar features (debugger, inspector, xref, etc...) are still available, with improved overall UX.

Installation

Ensure that MELPA is setup as usual and ask M-x package-install to install the package sly.

That's it. sly-mode will automatically come up in every .lisp file. To fire up SLY, connect to a Lisp and get a friendly REPL, use M-x sly.

Even if you already have SLIME installed, SLY will ask you and temporarily disable it for the Emacs session.

Obligatory animated gif section

Flex completion

company-flex-completion

Backreferences

backreferences

Reverse i-search

reverse-isearch

Stickers

stickers-example

Install from git

Clone this repository, add this to your ~/.emacs file and fill in the appropriate file names:

(add-to-list 'load-path "~/dir/to/cloned/sly")
(require 'sly-autoloads)
(setq inferior-lisp-program "/opt/sbcl/bin/sbcl")

If you wish to byte-compile SLY yourself (not needed generally) you can do make compile compile-contrib in the dir where you cloned SLY.

Running the server standalone

This also works

$ sbcl
...
* (push #p"~/dir/to/sly" asdf:*central-registry*)
* (asdf:load-system :slynk)
* (slynk:create-server :port 4008)

Now in Emacs you can do sly-connect and give it the host and the 4008 port as a destination.

Faster startup

If the Lisp program doesn't start fast enough for you, look in the manual, for ways to make it faster.

Additional Contribs

Completion UIs

SLY works with most Emacs "completion UIs" out of the box, providing completion in source files and inputting Common Lisp symbol names from the minibuffer. Company, Emacs 27's Fido-mode, and Helm are well-supported, as is "vanilla" completion. For consistency, SLY defaults to its own UI, sly-symbol-completion-mode, useful if you don't have or like any of those. You can turn it off. Also, if you use Helm and wish to have even more Helm-based fanciness, you can use helm-sly.

License

SLY is free software. All files, unless explicitly stated otherwise, are public domain. ASCII artwork is copyright by Felix Lee, Joan G. Stark and Hayley Jane Wakenshaw.

Fork

SLIME is the work of Eric Marsden, Luke Gorrie, Helmut Eller, Tobias C. Rittweiler and many others. I forked SLIME because I used it daily, for work, had a long list of hacks developed for myself, and wanted to share them with others.

In 2013, SLIME development was stalling, patches and issues rotting. In early 2014, Luís Oliveira and myself moved SLIME to Github and set up its Travis CI system. I brought in the old bug reports from the Launchpad tracker, fixed long-standing problems and submitted many changes, particularly to the under-curated but popular "contrib" section.

Now, the changes that SLY brings to the table are too deep at the Elisp and Lisp level to be accepted to SLIME, given its current focus on stability (for the record, I find this perfectly reasonable). The new features, such as stickers or multiple inspectors, cannot be realized well using only the existing "contrib" system. Finally, SLY frees itself from the shackles of Emacs 23 and supports Emacs 24.3+ only, allowing for much cleaner code and liberal use of lexical binding.

The list of technical reasons is bigger than this though, and you can read up on them in the CONTRIBUTING.md file.

Contributing

Open an issue or a pull request, but at least have a quick look at the first part CONTRIBUTING.md file for instructions on how to contribute.

sly's People

Contributors

acelent avatar alanruttenberg avatar ambrevar avatar bdowning avatar csrhodes avatar daewok avatar dieggsy avatar dkochmanski avatar drmeister avatar easye avatar eggert avatar ellerh avatar guicho271828 avatar gwbrown avatar hargettp avatar joaotavora avatar luismbo avatar monnier avatar nbtrap avatar puercopop avatar rettakjak avatar rprimus avatar ruricolist avatar scymtym avatar sfreilich avatar stassats avatar svetlyak40wt avatar svillemot avatar swiftlawngnome avatar trittweiler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sly's Issues

sly-compile-and-load-file fails

Typing C-c C-k on any file results in:

Debugger entered--Lisp error: (void-variable for)
  sly-stickers-after-buffer-compilation(t nil #<buffer core/documents.lisp> t)
  run-hook-with-args(sly-stickers-after-buffer-compilation t nil #<buffer core/documents.lisp> t)
  sly-compilation-finished((:compilation-result nil t 0.03500000014901161 t "/home/puercopop/quicklisp/local-projects/mudkip/src/core/documents.fasl") #<buffer core/documents.lisp>)
  #[257 "\300�p\"\207" [sly-compilation-finished] 4 "\n\n(fn RESULT)"]((:compilation-result nil t 0.03500000014901161 t "/home/puercopop/quicklisp/local-projects/mudkip/src/core/documents.fasl"))
  #[257 "\211\211@�A\302�\303\"\203/�\211\211G\304U\203��\211@\202 �\305\306\307�GD\"\300\205*�\301q\210\300�!\266\202\202W�\302�\310\"\203S�\211\211G\304U\203C�\211@\202J�\305\306\307�GD\"\311\312�\"\266\202\202W�\313\314�\"\207" [#[257 "\300�p\"\207" [sly-compilation-finished] 4 "\n\n(fn RESULT)"] #<buffer core/documents.lisp> eql :ok 1 signal wrong-number-of-arguments nil :abort sly-message "Evaluation aborted on %s." error "Elisp sly-dcase failed: %S"] 9 "\n\n(fn G92610)"]((:ok (:compilation-result nil t 0.03500000014901161 t "/home/puercopop/quicklisp/local-projects/mudkip/src/core/documents.fasl")))
  sly-dispatch-event((:return (:ok (:compilation-result nil t 0.03500000014901161 t "/home/puercopop/quicklisp/local-projects/mudkip/src/core/documents.fasl")) 17) #<process sly-1>)
  sly-process-available-input(#<process sly-1>)
  sly-net-filter(#<process sly-1> "00008E(:return (:ok (:compilation-result nil t 0.03500000014901161 t \"/home/puercopop/quicklisp/local-projects/mudkip/src/core/documents.fasl\")) 17)")

Even if it succeeds by doing C-c C-c on each top-level form individually.

I think it may be related to the only test that fails when I do make-check

Test utf-8-source-1 condition:
    (void-variable for)
   FAILED  191/191  utf-8-source-1

Ran 191 tests, 190 results as expected, 1 unexpected (2014-10-14 14:07:47-0500)
2 expected failures

1 unexpected results:
   FAILED  utf-8-source-1

make: *** [check-core] Error 1

compatibility with smartparens

When running sly with smartparens, I get

(error "Unknown button type `show-pair'")

when pressing C-c-C-c while I'm on an opening paren (such that the closing paren is highlighted).
The reason is that smartparens uses (overlay-put ... 'type 'show-pair), so when processing the output of overlay-in in sly-buttons.el or sly.el, button-type-subtype-p will complain that no show-pair button type has been registered.
One work-around is to wrap the two calls to button-type-subtype-p in ignore-errors, but maybe there is a better approach.

sly-xref-next-line deletes the xref window

  1. Move point to a (format ...) call, press M-., see the *sly-xref* buffer pop up with multiple destinations.
  2. Press n there (or p). See the xref window deleted, point jumps to the destination that was rendered on the next (previous) line.

Expected result: the next location is displayed in the "other" window, but the xref window stays, and the focus stays in it.

Emacs master, Sly from MELPA.

Thoroughly review and rewrite manual

  • Rewrite Introduction and Getting Started section
  • Merge main core sly-mode, sly-db, misc, customization and tips and tricks into single chapter
  • Rewrite contrib chapter for new contribs
  • Improve "REPL" chapter with sly-mrepl specific functionality.
  • Simplify indexes and table of contents

Error on sly-mrepl--teardown-comint-isearch

How to Reproduce

  1. C-r in the repl
  2. type somethin
  3. Press Enter

Btw the search 'works', the selecting is left in the repl but it is annoying to have to press an extra q everytime.

The appears to be that sly-mrepl--eli-input-overlay seems to be nil when the isearch-mode-end-hooks are called. A Quick fix would be to check if the input overlay if nil before trying to delete it.

(defun sly-mrepl--teardown-comint-isearch ()
  (when sly-mrepl--eli-input-overlay
    (delete-overlay sly-mrepl--eli-input-overlay))
  (setq sly-mrepl--eli-input-overlay nil)
  (sly-mrepl--surround-with-eli-input))

However I'm not qualified to determine if the overlay being nil is the real issue or just a symptom of another problem.

The backtrace

Debugger entered--Lisp error: (wrong-type-argument overlayp nil)
  delete-overlay(nil)
  sly-mrepl--teardown-comint-isearch()
  run-hooks(isearch-mode-end-hook)
  isearch-done()
  isearch-exit()
  call-interactively(isearch-exit nil nil)
  command-execute(isearch-exit)

Incremental output?

Sly doesn't show incremental output at the REPL. For example:

(loop repeat 5
        do (print "Hello, world.")
            (sleep 1))

If I run this in Slime, "Hello, world" appears once a second for five seconds. If I run it under Sly, five lines of "Hello world" appear after five seconds.

I tried running a test suite under Sly and thought Lisp was hanging. If this is the intended behavior, it should be documented.

Can't type on sly-mrepl

Hi,
After doing M-x sly I try to type on the REPL it errors with the mesage Text is read-only. AFAICT the swank backed is working because I can do C-x C-e just fine. Also if I press enter I get first a ; No values message and then an error with the message The variable CL-USER> is unbound So it appears the error is related to prompt detection.

I'm using sbcl 1.2.3 and emacs 24.3.1

Cannot quit the thread list buffer

How to reproduce

  1. M-x sly-list-threads
  2. type q

Instead of the killing/burrying the buffer I see an the following error

command-execute: Wrong type argument: commandp, sly-quit-threads-buffer

C-u M-x Sly-apropos doesn't allow one to select all packages

Because the interactive function uses completing read one is unable to select blank for all packages.

Also a couple of suggestions. I think that negative argument should only prompt for package. And the apropos result buffer could include the lambda list next to the symbol name for functions and macros.

Can't compile with debug information

Typing C-u C-c C-c on any function results in

Debugger entered--Lisp error: (wrong-type-argument listp 3)
  mapcar(sly-retro-slynk-to-swank (cl:debug . 3))
  sly-retro-slynk-to-swank((cl:debug . 3))
  mapcar(sly-retro-slynk-to-swank ((cl:debug . 3)))
  sly-retro-slynk-to-swank(((cl:debug . 3)))
  mapcar(sly-retro-slynk-to-swank (quote ((cl:debug . 3))))
  sly-retro-slynk-to-swank((quote ((cl:debug . 3))))
  mapcar(sly-retro-slynk-to-swank (slynk:compile-string-for-emacs "(defun read-content (file &optional (header \"-----\") (file-encoding '(:utf-8)))\n  \"Returns a plist of metadata from FILE with :text holding the content as a\n  string.\"\n  (with-open-file (in file :external-format file-encoding)\n    (let ((results nil))\n      (%parse-header in header results)\n      (setf (getf results :text) (loop \n                                   :for line := (read in nil 'eof)\n                                   :until (eq line 'eof)\n                                   :collect line))\n      results)))\n" "core/documents.lisp" (quote ((:position 1645) (:line 45 1))) "/home/puercopop/quicklisp/local-projects/mudkip/src/core/documents.lisp" (quote ((cl:debug . 3)))))
  sly-retro-slynk-to-swank((slynk:compile-string-for-emacs "(defun read-content (file &optional (header \"-----\") (file-encoding '(:utf-8)))\n  \"Returns a plist of metadata from FILE with :text holding the content as a\n  string.\"\n  (with-open-file (in file :external-format file-encoding)\n    (let ((results nil))\n      (%parse-header in header results)\n      (setf (getf results :text) (loop \n                                   :for line := (read in nil 'eof)\n                                   :until (eq line 'eof)\n                                   :collect line))\n      results)))\n" "core/documents.lisp" (quote ((:position 1645) (:line 45 1))) "/home/puercopop/quicklisp/local-projects/mudkip/src/core/documents.lisp" (quote ((cl:debug . 3)))))
  mapcar(sly-retro-slynk-to-swank (:emacs-rex (slynk:compile-string-for-emacs "(defun read-content (file &optional (header \"-----\") (file-encoding '(:utf-8)))\n  \"Returns a plist of metadata from FILE with :text holding the content as a\n  string.\"\n  (with-open-file (in file :external-format file-encoding)\n    (let ((results nil))\n      (%parse-header in header results)\n      (setf (getf results :text) (loop \n                                   :for line := (read in nil 'eof)\n                                   :until (eq line 'eof)\n                                   :collect line))\n      results)))\n" "core/documents.lisp" (quote ((:position 1645) (:line 45 1))) "/home/puercopop/quicklisp/local-projects/mudkip/src/core/documents.lisp" (quote ((cl:debug . 3)))) ":mudkip/core/documents" t 16))
  sly-retro-slynk-to-swank((:emacs-rex (slynk:compile-string-for-emacs "(defun read-content (file &optional (header \"-----\") (file-encoding '(:utf-8)))\n  \"Returns a plist of metadata from FILE with :text holding the content as a\n  string.\"\n  (with-open-file (in file :external-format file-encoding)\n    (let ((results nil))\n      (%parse-header in header results)\n      (setf (getf results :text) (loop \n                                   :for line := (read in nil 'eof)\n                                   :until (eq line 'eof)\n                                   :collect line))\n      results)))\n" "core/documents.lisp" (quote ((:position 1645) (:line 45 1))) "/home/puercopop/quicklisp/local-projects/mudkip/src/core/documents.lisp" (quote ((cl:debug . 3)))) ":mudkip/core/documents" t 16))
  sly-net-send((:emacs-rex (slynk:compile-string-for-emacs "(defun read-content (file &optional (header \"-----\") (file-encoding '(:utf-8)))\n  \"Returns a plist of metadata from FILE with :text holding the content as a\n  string.\"\n  (with-open-file (in file :external-format file-encoding)\n    (let ((results nil))\n      (%parse-header in header results)\n      (setf (getf results :text) (loop \n                                   :for line := (read in nil 'eof)\n                                   :until (eq line 'eof)\n                                   :collect line))\n      results)))\n" "core/documents.lisp" (quote ((:position 1645) (:line 45 1))) "/home/puercopop/quicklisp/local-projects/mudkip/src/core/documents.lisp" (quote ((cl:debug . 3)))) ":mudkip/core/documents" t 16) #<process sly-1>)
  sly-send((:emacs-rex (slynk:compile-string-for-emacs "(defun read-content (file &optional (header \"-----\") (file-encoding '(:utf-8)))\n  \"Returns a plist of metadata from FILE with :text holding the content as a\n  string.\"\n  (with-open-file (in file :external-format file-encoding)\n    (let ((results nil))\n      (%parse-header in header results)\n      (setf (getf results :text) (loop \n                                   :for line := (read in nil 'eof)\n                                   :until (eq line 'eof)\n                                   :collect line))\n      results)))\n" "core/documents.lisp" (quote ((:position 1645) (:line 45 1))) "/home/puercopop/quicklisp/local-projects/mudkip/src/core/documents.lisp" (quote ((cl:debug . 3)))) ":mudkip/core/documents" t 16))
  sly-dispatch-event((:emacs-rex (slynk:compile-string-for-emacs "(defun read-content (file &optional (header \"-----\") (file-encoding '(:utf-8)))\n  \"Returns a plist of metadata from FILE with :text holding the content as a\n  string.\"\n  (with-open-file (in file :external-format file-encoding)\n    (let ((results nil))\n      (%parse-header in header results)\n      (setf (getf results :text) (loop \n                                   :for line := (read in nil 'eof)\n                                   :until (eq line 'eof)\n                                   :collect line))\n      results)))\n" "core/documents.lisp" (quote ((:position 1645) (:line 45 1))) "/home/puercopop/quicklisp/local-projects/mudkip/src/core/documents.lisp" (quote ((cl:debug . 3)))) ":mudkip/core/documents" t #[257 "\211\211@�A\302�\303\"\203/�\211\211G\304U\203��\211@\202 �\305\306\307�GD\"\300\205*�\301q\210\300�!\266\202\202W�\302�\310\"\203S�\211\211G\304U\203C�\211@\202J�\305\306\307�GD\"\311\312�\"\266\202\202W�\313\314�\"\207" [#[257 "\300�\301\"\207" [sly-compilation-finished nil] 4 "\n\n(fn RESULT)"] #<buffer core/documents.lisp> eql :ok 1 signal wrong-number-of-arguments nil :abort sly-message "Evaluation aborted on %s." error "Elisp sly-dcase failed: %S"] 9 "\n\n(fn G92610)"]))
  sly-eval-async((slynk:compile-string-for-emacs "(defun read-content (file &optional (header \"-----\") (file-encoding '(:utf-8)))\n  \"Returns a plist of metadata from FILE with :text holding the content as a\n  string.\"\n  (with-open-file (in file :external-format file-encoding)\n    (let ((results nil))\n      (%parse-header in header results)\n      (setf (getf results :text) (loop \n                                   :for line := (read in nil 'eof)\n                                   :until (eq line 'eof)\n                                   :collect line))\n      results)))\n" "core/documents.lisp" (quote ((:position 1645) (:line 45 1))) "/home/puercopop/quicklisp/local-projects/mudkip/src/core/documents.lisp" (quote ((cl:debug . 3)))) #[257 "\300�\301\"\207" [sly-compilation-finished nil] 4 "\n\n(fn RESULT)"])
  sly-compile-string("(defun read-content (file &optional (header \"-----\") (file-encoding '(:utf-8)))\n  \"Returns a plist of metadata from FILE with :text holding the content as a\n  string.\"\n  (with-open-file (in file :external-format file-encoding)\n    (let ((results nil))\n      (%parse-header in header results)\n      (setf (getf results :text) (loop \n                                   :for line := (read in nil 'eof)\n                                   :until (eq line 'eof)\n                                   :collect line))\n      results)))\n" 1645)
  sly-compile-region-as-string(1645 2169)
  sly-stickers--compile-region-aware-of-stickers-1(1645 2169 #[514 "\211\211\203��\211�A\262�@\202��\300\301\302�GD\"�\211A\262�@�\203*�\300\301\302\303��G\\D\"\210\211\2044�\304\305��\"\210\306�\302�\203D�\307\310� G\"\202E�\311#\207" [signal wrong-number-of-arguments nil 2 mapc sly-stickers--disarm-sticker sly-compilation-finished format " (%d stickers armed)" " (stickers failed to stick)"] 11 "\n\n(fn STICKERS RESULT-AND-STUCK-P)"] :fallback t :flash t)
  sly-stickers-compile-region-aware-of-stickers(1645 2169)
  sly-compile-region(1645 2169)
  apply(sly-compile-region (1645 2169))
  sly-compile-defun((4))
  call-interactively(sly-compile-defun nil nil)

Undefined function: slynk::make-compilation-result

  • On Clozure;
  • running the latest Sly;
  • with sly-retro disabled;
  • when I use sly-compile-defun, I get an error that slynk::make-compilation-result is undefined.

If I evaluate the defstruct form in sly.el directly, then everything works fine, so I imagine there's probably some kind of subtle evaluation-order problem here.

Misc suggestions

  • Restore the ',' REPL shortcut to quickly invoke sly-restart-inferior-lisp among other things.
  • Add a key-binding in the macroexpand dialog to macroexpand-all, maybe bound to the a key.

Connecting to Swank?

If I'm reading the documentation right (I may not be) it should be possible for Sly to connect to a running Swank server in a Lisp process that knows nothing about Slynk. But when I try it, I get this:

Invalid protocol message:
Symbol "SLYNK-ADD-LOAD-PATHS" not found in the SWANK package.

  Line: 1, Column: 38, File-Position: 38

  Stream: #<SB-IMPL::STRING-INPUT-STREAM {C2DACF9}>

(:emacs-rex (swank:slynk-add-load-paths (quote ("/home/pmr/quicklisp/local-projects/sly/contrib/"))) nil t 2)

Inspector is unable to show the source of some objects.

How to reproduce

Inspect the result of (list (find-class 'sb-pcl::specializer-with-object)). And click v on specializer-with-object (the only item of the list).

Expected:

To be shown the source of specializer-with-object

Get:

[sly] Error: Lock on package SB-KERNEL violated when interning *BUILT-IN-CLASSES*
       while in package SB-PCL.
See also:
  The SBCL Manual, Node "Package Locks"

Just in case, (sb-introspect:find-definition-source (find-class 'sb-pcl::specializer-with-object)) returns the location definition-source structure just fine. It appears that slynk is trying to intern a symbol.

REPL #v backreferences messup

RECALL> (values 'foo 'var 'baz)
FOO
VAR
BAZ
RECALL> (list #v1 :something)
; Debugger entered on #<UNBOUND-VARIABLE @ #x110789402>
[1] RECALL> 

The backreference reader macro is parsing #v1 :, i.e. incorrectly jumping over whitespace.
Reported by @tmadurodias

Slime selectors

Add an equivalent to the slime-selector to SLY. IMHO, the selector functionality supersedes the C-c C-z feature. For example, if I bind slime-selector to C-c C-s in Slime I can merely C-c C-s r to get to the repl or C-c C-s s to get to the scratch buffer.

About `slynk:*use-dedicated-output-stream*`

In the course of trying to use Sly over ssh I discovered that slynk:*use-dedicated-output-stream* isn't being used anywhere. To actually prevent a dedicated output stream from being created, you have to set slynk-mrepl:*use-dedicated-output-stream*.

This may just be a case of the documentation being out of date, but the existence of two symbols with the same name, one of which is documented and exported from Slynk, but never defined or used, and one which is used, but not documented, is confusing.

Incorrect package URL

Hi, when trying to create a package for melpa (which I found you already did it) I found the sly.el has this header URL: https://github.com/sly/sly

This URL does not currently exist, but maybe you plan to have a sly github organization?

+/++/+++ do not work

  • should return the most recently evaluated expression, much like * returns the most recent value. currently + returns simply itself, and ++/+++ always return nil.

guess-reader-state is extremely brittle

Idk if it qualifies as a bug as the function name says guess. But even white space before the (in-package ...) form results in inability to guess the package of the file. In both the cases described below guess-reader-state is unable to determine the package. A correct solution would require to much work, but trimming the white space at the start of the line before comparing seems reasonable.

File 1: Whitespace

  (in-package :cl-user)

File 2: Wrap in-package inside of progn form

(progn (in-package :cl-user))

Skeleton test code

(with-open-file (in #P"/path/to/file.lisp")
  (slynk-source-path-parser::guess-reader-state in))

C-c C-~ is broken due to wrong lambda-list in slyfun

Oi, Ok This is really weird and I'm pretty sure I must be missing something.

in contrib/slynk-mrepl.lisp the lambda list of sync-package-and-default-directory reads (&key ...) when it should read (&optional ...). The weird part is that according the vc-annonate and github's blame the last commit that modified that line 616f904 left it as optional so I am befuddled as to why when I updated sly I found &key there or in github's browser.

C-h m fails in the mrepl

Steps to Reproduce

  1. Switch to an mrepl buffer
  2. C-h m

If I attempt to reproduce in a clean sly (w/o my config) C-h m works fine.

However inspecting the backtrace it appears the issue is that #'sly-mrepl-mark is called in the context of the current-buffer being #<buffer prin1>. idk why would C-h m result in a call to sly-mrepl-mark but I'll post a PR with a fix right now.

Backtrace

Debugger entered--Lisp error: (wrong-type-argument processp nil)
  process-mark(nil)
  sly-mrepl--mark()
  sly-mrepl--shortcut-location-p()
  (if (sly-mrepl--shortcut-location-p) cmd)
  (lambda (cmd) (if (sly-mrepl--shortcut-location-p) cmd))(sly-mrepl-shortcut)
  documentation(sly-mrepl-mode)
  describe-mode()
  call-interactively(describe-mode nil nil)
  command-execute(describe-mode)

rainbow-delimiters-mode does not work with sly

I have attempted to use rainbow-delimiters in both sly-mrepl-mode and the minor-mode sly-mode, and it does not work in either.

→ emacs --version
GNU Emacs 25.0.50.1
Copyright (C) 2014 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

→ cd /tmp

→ git clone https://github.com/capitaomorte/sly.git
Cloning into 'sly'...
remote: Counting objects: 23123, done.
remote: Compressing objects: 100% (431/431), done.
remote: Total 23123 (delta 284), reused 0 (delta 0)
Receiving objects: 100% (23123/23123), 15.59 MiB | 1.92 MiB/s, done.
Resolving deltas: 100% (16577/16577), done.
Checking connectivity... done.

→ cd sly 

→ wget https://raw.githubusercontent.com/jlr/rainbow-delimiters/master/rainbow-delimiters.el
--2014-10-23 16:06:29--  https://raw.githubusercontent.com/jlr/rainbow-delimiters/master/rainbow-delimiters.el
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 23.235.40.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|23.235.40.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 23873 (23K) [text/plain]
Saving to: ‘rainbow-delimiters.el’

100%[==========================================================================================================================================================================>] 23,873      --.-K/s   in 0.03s   

2014-10-23 16:06:29 (928 KB/s) - ‘rainbow-delimiters.el’ saved [23873/23873]


→ echo $(git log -1 --oneline)
5e9b831 Can't use Gray streams for ABCL

→ emacs -q -nsl 

I then executed the following elisp code with M-:

(add-to-list 'load-path "/tmp/sly")
(require 'sly)
(require 'rainbow-delimiters)

I then started the sly-mrepl (with M-x sly) and attempted to turn on rainbow-delimiters (with M-: (rainbow-delimiters-mode-turn-on)), but nothing happened.

Recent Emacs commit breaks Sly

A recent commit to help.el (this one) makes it impossible to connect to Lisp in Sly.

Trying to connect brings up the debugger, with output like this:

Debugger entered: (("Error in timer" sly-attempt-connection (#<process inferior-lisp> nil 11) (error "Unrecognized usage format")))
  (condition-case data (progn (let* ((syms (mapcar (function car) env)) (vals (mapcar (function cdr) env)) (body (function (lambda nil (apply fun args)))) (binds nil)) (while syms (setq binds (cons (list (car-safe ...) (list ... ...)) binds))) (eval (list (quote let) binds (list (quote funcall) (list (quote quote) body)))))) ((debug error) (debug nil (list "Error in timer" fun args data))))
  sly-timer-call(sly-attempt-connection ((sly-ignore-protocol-mismatches)) #<process inferior-lisp> nil 11)
  apply(sly-timer-call (sly-attempt-connection ((sly-ignore-protocol-mismatches)) #<process inferior-lisp> nil 11))
  timer-event-handler([t 22074 31605 57218 nil sly-timer-call (sly-attempt-connection ((sly-ignore-protocol-mismatches)) #<process inferior-lisp> nil 11) nil 623999])

The problem happens while loading sly-stickers.el, in help-add-fundoc-usage from in help.el. In particular, help-add-fundoc-usage balks at the docstring for sly-stickers--pretty-describe-recording, because it has a newline in it.

I'm not sure whether the bug is that Emacs is being too strict, or cl-lib is not escaping enough, but I wanted to document this here for anyone else having the problem.

Comma shortcut breaks down after a crash

After crashing the inferior lisp (sbcl in my case) the , restart shortcut breaks down, failing to restart the inferior-lisp an subsequent attemps to use the , shortcut fail as the process is nil.

sly-retro-slynk-to-swank is not tail recursive

sly-retro-slynk-to-swank is not tail recursive as of 66bb6f9. Combined with being enabled by default it can cause unnecessary annoyance on sly users. When inspecting lists with lots of elements one gets a lisp-max-eval-depth errors constantly.

Posible duplicated code

Commit 3d25b32 introduced defvar-unbound which is similar to define-special (Albeit the later is not in the utilitles section. The eval-when doesn't appear to be necessary (I may be wrong) in slynk's case nor the return value so it appears that the difference between the two macros are interchangeable, at least for now.

Adjust entry for MKCL in list of "Supported Platforms"

In section 2.1 of the User Manual, the entry for MKCL should probably rather be:

  • ManKai Common Lisp (MKCL)

Cheers.

P.S.: If ever you'd need some MKCL specific help be assured that I am just barely a short email away.

XREF results illegible

sly xref

Picture says it all, BTW the reference works I can press return and I'm taken to the appropriate source.

[Feature Request(?)]: propertize hook for mrepl output?

I was attempting to port slime-repl-ansi-colors.el to sly.

My idea was just to transform the string prior to writing it to the mrepl buffer. To do so my idea was to modify the string before it is inserted to the buffer by advising #'sly-mrepl--insert. But ansification needs to happen after the sly-properties are applied. So before adding a hook, I tested my idea by adding (ansi-color-apply-on-region ,start-sym (sly-mrepl--mark)) to the end of sly-mrepl--comiting-text. But this approach has two pitfalls. First it also colorizes the input I submit and it doesn't colorized the output from the inferior-lisp as I learned that output is inserted via #'sly-mrepl--insert-output.

I could achieve the desired functionality by doing something like (although it doesn't work idkw):

(defun sly-repl-ansi-colorize (fun &rest args)
  (when sly-repl-ansi-color
    (with-current-buffer (sly-mrepl)
      (let ((inhibit-read-only t))
        (ansi-color-apply-on-region
         (save-excursion
           (cl-loop
            while (not (get-text-property (point) 'sly-mrepl--prompt))
            do (backward-char))
           (point))
         (marker-position  (sly-mrepl--mark)))))))

(advice-add 'sly-mrepl--insert-prompt :before #'sly-repl-ansi-colorize)

However I think it could be a useful addition to provide a hook to propertize the text returned from the inferior process.

Btw I am in no urgent need for ansi-colors in the sly-mrepl, I was just trying to write a simple sly-contrib to get the hang of it.

Sly 'muffles' restarts

How to reproduce

  1. Compile the test code (C-c C-k). It will warn about an undefined function, bar.
  2. Remove the #+(or) from the defpackage form and evaluate it again.

What do I see

Error message displayed on the minibuffer

What I expect

To see a list of restarts to handle the condition, including the shadowing-import-it from name-conflict. Note there may be two issues here as I don't find the shadowing-import-it restart in the available restarts

Test Code

(defpackage #:bar
  (:export #:bar))

(defpackage #:foo
  (:use #:cl)
  #+(or)(:import-from #:bar
                #:bar))

(in-package #:foo)

(defun fubar ()
  (bar))


#+Run-this-to-see-there-are-restarts-available
(handler-case (defpackage #:foo
                (:use #:cl)
                (:import-from #:bar
                              #:bar))
  (error () (compute-restarts)))

contrib/sly-stickers.el cannot be byte-compiled

After the commit made 2 hours ago I get

In toplevel form:
contrib/sly-stickers.el:566:1:Error: Wrong type argument: listp, desc
Makefile:30: recipe for target 'contrib/sly-stickers.elc' failed
make: *** [contrib/sly-stickers.elc] Error 1
==> ERROR: A failure occurred in build().
Aborting...

Documentation

Thank you for SLY. I am quite excited by it. Is it all right to assume that the SLIME manual (http://common-lisp.net/project/slime/doc/html/) can be safely used with SLY, at least for now?

PS: Sorry for using this space for an OT comment. I saw the thread on the slime-dev list. Instead of being happy and offer help to a new approach, some try to negate it. This is a common issue in life. For example, there would be no thriving Linux community if one would need to rename all binaries and scripts to new names when starting a new fork. I felt sorry for some of those gentleman, that feel so insecure to allow rudeness, and I wanted to apologise on their behalf.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.