Comments (4)
AIUI, the trouble is that call-process-region
doesn't work through tramp. The org-mode folks ran into the same problem before.
from git-gutter-plus.
Running the following code (cobbled together from the Git history over at https://github.com/emacsmirror/tramp) gets the hunk feature working remotely. Note that tramp-sh-handle-call-process-region
was deleted in December 2012 for some reason.
(defun tramp-sh-handle-call-process-region
(start end program &optional delete buffer display &rest args)
"Like `call-process-region' for Tramp files."
(let ((tmpfile (tramp-compat-make-temp-file "")))
(write-region start end tmpfile)
(when delete (delete-region start end))
(unwind-protect
(apply 'process-file program tmpfile buffer display args)
(delete-file tmpfile))))
(defadvice call-process-region
(around tramp-advice-call-process-region activate)
"Invoke `tramp-sh-handle-call-process-region' for Tramp files."
(if (eq (tramp-find-foreign-file-name-handler default-directory)
'tramp-sh-file-name-handler)
(setq ad-return-value
(apply 'tramp-sh-handle-call-process-region (ad-get-args 0)))
ad-do-it))
from git-gutter-plus.
Pull request #18 is a cleaned-up version of the above.
from git-gutter-plus.
from git-gutter-plus.
Related Issues (20)
- git-gutter+ has error in sh-mode sometimes HOT 7
- wrong-number-of-arguments error on package update HOT 10
- git-commit-mode dependency is unavailable HOT 1
- injects git warnings into commit messages HOT 1
- git-gutter+-show-hunk not updating when switching between hunks HOT 1
- Wierd interaction with line numbering
- Update to git-commit.el HOT 1
- Very slow on large files HOT 1
- [FR] stash hunk at point
- [FR] Derive committing mode from git-commit-mode
- (void-variable git-commit-mode-map)
- clarify reason for fork, and maintenance strategy
- Activating git-gutter-plus produces a tramp error during initilisation
- Any plan to add flydiff mode?
- Getting 'Error callling diff" errors with latest magit HOT 1
- Error opening tramp files HOT 22
- feature request: Make git-gutter+-refresh an interactive command
- Feature Request: display file statuses in dired
- possible feature: jump to hunk with completing-read
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git-gutter-plus.