;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\303\304!\210\303\305!\210\303\306!\210\205\307!\310\311\312\313\314\315\312\315\211\316\317\320\321& #\315\207" [load-file-name sly-tramp--path sly-tramp--contrib require sly tramp cl-lib file-name-directory put sly-contribs sly-tramp record sly-contrib nil sly-tramp-init sly-tramp-unload ("Marco Baringer ") ("GPL")] 13) (defalias 'sly-tramp-init #[0 "\306\307\310\311\312\313\314\"\"\"\210\314\211:\203'@\262\315\316E \317\320$A\262\202 \266\n\321=\2037\322 \2037\323 \210\324\325\326 !>\204K\327\330\331 D\"\210 \211\332\333I\207" [sly-tramp--path sly-contrib--required-slynk-modules this-command sly-to-lisp-filename-function sly-from-lisp-filename-function sly-tramp--contrib mapc funcall mapcar sly-contrib--enable cl-remove-if sly-contrib--enabled-p nil cl-adjoin sly-tramp :key cl-first sly-setup sly-connected-p sly-contrib--load-slynk-dependencies sly-tramp-to-lisp-filename sly-tramp-from-lisp-filename type-of signal wrong-type-argument sly-contrib 1 t cl-struct-sly-contrib-tags] 7]) (defalias 'sly-tramp-unload #[0 "\303\211:\203@\262\304\305\306$A\262\202\266\307\310\311\"\210\312\313\314\315\316\317\303\"\"\"\210\320 !\n>\204:\321\322\323 D\"\210 \211\324\303I\207" [sly-contrib--required-slynk-modules sly-tramp--contrib cl-struct-sly-contrib-tags nil cl-remove :key cl-first sly-warning "Disabling contrib %s" sly-tramp mapc funcall mapcar sly-contrib--disable cl-remove-if-not sly-contrib--enabled-p type-of signal wrong-type-argument sly-contrib 1] 7]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable sly-filename-translations funcall function #[0 "\300\207" [nil] 1] "Assoc list of hostnames and filename translation functions. \nEach element is of the form (HOSTNAME-REGEXP TO-LISP FROM-LISP).\n\nHOSTNAME-REGEXP is a regexp which is applied to the connection's\nsly-machine-instance. If HOSTNAME-REGEXP maches then the\ncorresponding TO-LISP and FROM-LISP functions will be used to\ntranslate emacs filenames and lisp filenames.\n\nTO-LISP will be passed the filename of an emacs buffer and must\nreturn a string which the underlying lisp understandas as a\npathname. FROM-LISP will be passed a pathname as returned by the\nunderlying lisp and must return something that emacs will\nunderstand as a filename (this string will be passed to\nfind-file).\n\nThis list will be traversed in order, so multiple matching\nregexps are possible.\n\nExample:\n\nAssuming you run emacs locally and connect to sly running on\nthe machine 'soren' and you can connect with the username\n'animaliter':\n\n (push (list \"^soren$\"\n (lambda (emacs-filename)\n (subseq emacs-filename (length \"/ssh:animaliter@soren:\")))\n (lambda (lisp-filename)\n (concat \"/ssh:animaliter@soren:\" lisp-filename)))\n sly-filename-translations)\n\nSee also `sly-create-filename-translator'." :type (repeat (list :tag "Host description" (regexp :tag "Hostname regexp") (function :tag "To lisp function") (function :tag "From lisp function"))) :group sly-lisp] 8) #@17 (fn HOSTNAME) (defalias 'sly-find-filename-translators #[257 "\301\302\303\"\"A\206\304\211D\207" [sly-filename-translations cl-assoc-if make-closure #[257 "\301\300\"\207" [V0 string-match] 4 "\n\n(fn REGEXP)"] identity] 5 (#$ . 3213)]) #@147 Tramp compatability function. Handles the signature of `tramp-make-tramp-file-name' changing over time. (fn USERNAME REMOTE-HOST LISP-FILENAME) (defalias 'sly-make-tramp-file-name #[771 "\301Y\203\302\303\304#\304\304&\207\305\306!\203#\302\304\211%\207\302\304$\207" [emacs-major-version 26 tramp-make-tramp-file-name tramp-find-method nil boundp tramp-multi-methods] 10 (#$ . 3465)]) #@707 Creates a three element list suitable for push'ing onto sly-filename-translations which uses Tramp to load files on hostname using username. MACHINE-INSTANCE is a required parameter, REMOTE-HOST defaults to MACHINE-INSTANCE and USERNAME defaults to (user-login-name). MACHINE-INSTANCE is the value returned by sly-machine-instance, which is just the value returned by cl:machine-instance on the remote lisp. REMOTE-HOST is the fully qualified domain name (or just the IP) of the remote machine. USERNAME is the username we should login with. The functions created here expect your tramp-default-method or tramp-default-method-alist to be setup correctly. (fn &key MACHINE-INSTANCE REMOTE-HOST USERNAME) (defalias 'sly-create-filename-translator #[128 "\300\301\"A@\300\302\"A@\300\303\"A@\211\203=\211@\304>\203&\211AA\262\202\305>A@\2034\306\262\202\307\310@\"\210\202\210\206C\206I\311 \312\313Q\314\315\316\317\320BBBEE\207" [plist-member :machine-instance :remote-host :username (:machine-instance :remote-host :username :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:machine-instance :remote-host :username)" user-login-name "^" "$" #[257 "\301!\211\242>\204\302\303\304D\"\210\3058\207" [cl-struct-tramp-file-name-tags tramp-dissect-file-name signal wrong-type-argument tramp-file-name 6] 6 "\n\n(fn EMACS-FILENAME)"] lambda (lisp-filename) sly-make-tramp-file-name (lisp-filename)] 14 (#$ . 3877)]) #@17 (fn FILENAME) (defalias 'sly-tramp-to-lisp-filename #[257 "\300 \211\205 \301!\262\203\302\303 !@\202\304\305!!\207" [sly-current-connection process-live-p sly-find-filename-translators sly-machine-instance identity expand-file-name] 4 (#$ . 5358)]) #@17 (fn FILENAME) (defalias 'sly-tramp-from-lisp-filename #[257 "\300\301 !A@!\207" [sly-find-filename-translators sly-machine-instance] 3 (#$ . 5624)]) (provide 'sly-tramp)