JD Smith <jdtsm...@gmail.com> writes:

Hi,

> I did eventually find this in the manual, but far away from where I
> looked (in fact I used consult-info).  It would be very helpful if the
> docstring for tamp-connection-properties method that some properties
> are mapped in this way.

Agreed. Will do.

> I was thinking of changing the :application in the profile selection
> criteria from 'tramp to something unique to my package.  Unfortunately
> again here the docs don't seem to give much guidance.  The closest I
> found is the docstring of connection-local-criteria-alist, which
> mentions:
>
>     Property names might be ‘:application’, ‘:protocol’, ‘:user’ and
>     ‘:machine’.  The property value of
>     ‘:application’ is a symbol, all other property values are strings.
>
> which gives no hint as to how the connection/application details are
> set up.  I'm imagining I could just locally set, in my process
> buffers, the variable connection-local-default-application to a unique
> name that matches my connection profile.  Does that sound possible?

That's a good idea, promising. What you do is to use any other symbol
but 'tramp' as application. Then you can set the connection-local
profile like

--8<---------------cut here---------------start------------->8---
     (connection-local-set-profiles
      '(:application my-symbol)
      'remote-direct-async-process)
--8<---------------cut here---------------end--------------->8---

You can also use the :machine, :user and :protocol keyword if you
like. But the example above uses them as wildcard. (Untested, I hope I
remember properly).

Finally, you wrap your process call with

--8<---------------cut here---------------start------------->8---
(with-connection-local-application-variables 'my-symbol
  BODY)
--8<---------------cut here---------------end--------------->8---

Please don't change connection-local-default-application, this would
deactivate other connection-local settings Tramp needs.

> Thanks for your work on TRAMP!
>
> JD

Best regards, Michael.

Reply via email to