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

Improve support for tramp source buffers #486

Merged
merged 2 commits into from
Mar 2, 2014

Conversation

hugoduncan
Copy link
Member

Ensures load file doesn't use the tramp location of the file for the filename
passed to the nrepl load-file op. This caused some issues when using the same
repl and source files both locally and over tramp.

Uses an explicit buffer to determine the tramp prefix rather than the
find-tag-marker-ring. Changes the signature of cider-jump-to-def-for to add a
buffer argument.

Changes cider-jump-to-def-for to look for a tramp path before a local
path.

(when (tramp-tramp-file-p jump-origin)
(let ((vec (tramp-dissect-file-name jump-origin)))
(defun cider-tramp-prefix (&optional buffer)
"Use the current buffer to determine Clojure host."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should mention BUFFER in the docstring.

@bbatsov
Copy link
Member

bbatsov commented Feb 24, 2014

Overall the changes look good. You should also document them in the changelog, since they are noteworthy.

Ensures load-file doesn't use the tramp location of the file for the
filename passed to the nrepl load-file op (which gets compiled into
debug information).  This caused some issues when using the same repl
with source files both locally and over tramp.

Uses an explicit buffer to determine the tramp prefix rather than the
find-tag-marker-ring.  Changes the signature of cider-jump-to-def-for to
add a buffer argument.

Changes cider-jump-to-def-for to look for a tramp path before a local
path.
(let ((vec (tramp-dissect-file-name jump-origin)))
(defun cider-tramp-prefix (&optional buffer)
"Use the filename for BUFFER to determine a tramp prefix.
Defaults to the current buffer.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Emacs Lisp docstrings differ from Clojure's - you shouldn't add leading whitespace after the first line. I noticed this in your other PR as well.

@bbatsov
Copy link
Member

bbatsov commented Mar 2, 2014

👍

bbatsov added a commit that referenced this pull request Mar 2, 2014
Improve support for tramp source buffers
@bbatsov bbatsov merged commit 53d6c94 into clojure-emacs:master Mar 2, 2014
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

Successfully merging this pull request may close these issues.

2 participants