Open svetlyak40wt opened 2 years ago
The patch looks harmless enough, but I can't understand from the long reddit thread what you are trying to do.
At any rate, if this patch is indeed fixing a bug in a real use case, it should likely be contributed to SLIME too, so let's hail its maintainer @luismbo here to see if he has anything to add.
Here is what I'm trying to do.
I have following setup:
I want to use Lisp's logical pathnames to translate paths from remote machine to my local pathnames. (I know about sly-filename-translations
but approach with logical pathnames seems more natural to me.
To accomplish this, I need to teach SLY to work with logical pathnames. Diff from this pull-requiest fixes a small issue, but it is not enough. I've experimented with this approach today and found that for making opening location from a stack trace, I need more changes to the SLYNK backend. Here is the draft: https://github.com/svetlyak40wt/sly/commit/35f601eff75dcec5b17ea0b4223dd072aa65bcf8).
I'll play with this approach a little to see if it can be convenient and probably will create an additional pull-request.
And one more. Idea of changes from https://github.com/svetlyak40wt/sly/commit/35f601eff75dcec5b17ea0b4223dd072aa65bcf8 is following:
APP:src;*.*
.APP-LOCAL
, pointing it to the local sources of the application.APP
to APP-LOCAL
hostname in some internal variable *remote-to-local-hosts*
.APP
host to APP-LOCAL
and then applying TRANSLATE-LOGICAL-PATHNAME
to it.Probably I'm overcomplicating and there is more elegant solution for opening local files?
This fix relates to SBCL and the case when definition relates to a function.
Here definition-source-for-emacs is called with name having string type: https://github.com/joaotavora/sly/blob/b501b4335096fd4306c2c1eb86382b69e91c09e5/slynk/backend/sbcl.lisp#L872
In this case we have to use it as is instead of trying to call SYMBOL-NAME.
I've encounter this problem when attempted to setup logical pathname translations to make SLY open local files when connected to the remote Lisp image.
Here is the Reddit discussion where everything begins: https://www.reddit.com/r/Common_Lisp/comments/vc6hix/source_location_for_deployed_binary/