Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remote tramp files do not work (to preview) #16

Open
idcrook opened this issue Jun 18, 2018 · 2 comments
Open

remote tramp files do not work (to preview) #16

idcrook opened this issue Jun 18, 2018 · 2 comments

Comments

@idcrook
Copy link

idcrook commented Jun 18, 2018

I recently found vmd-mode and it is very useful. I have encountered an issue when using TRAMP to edit a file on a remote machine and wanting to use vmd-mode for previewing.

In current code, the tempfile gets created in same directory as original file, concatenating the string .temp
setq vmd-copy-file

This works great for local edits on local machine. Unfortunately, for files edited using TRAMP session, e.g. on a remote machine, the .temp file is also placed on the remote machine, and the vmd process does not know how to get to the file. The .temp file gets updated appropriately, but it is not available on local machine to preview.

I think a possible way around this issue could be to provide an alternate way to name a tempfile? It would then be able to have a local alternate path and, e.g.the local platform tempfile area (referring to something like /tmp or %TEMP%) could be used? That would not be perfect, but it would allow the preview of the markdown text to happen in the remote TRAMP session case.

@blak3mill3r
Copy link
Owner

Thanks for the report! I like your idea. I don't know offhand how to do that (temp file in system temp directory). I'd be glad to accept a PR, or I may take a look at this at some point (when I try to use it with TRAMP).

@pierre-rouleau
Copy link
Contributor

How about adding a defcustom field identifying the directory where the temporary file would be stored? And defaulting to the value of `temporary-file-directory' ? See https://www.gnu.org/software/emacs/manual/html_node/elisp/Unique-File-Names.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants