tramp

How to force an Emacs tramp time out?

ε祈祈猫儿з 提交于 2019-12-05 14:56:52
I use TRAMP a lot with emacs. However, sometimes a server goes down and tramp sits waiting for a timeout. Usually it's after doing a C-x-f in ido-mode to open a new file. I have to wait an annoyingly long amount of time. Is there an easy way to tell TRAMP to timeout and let ido-mode continue. I try C-g and the option to open a file never happens. In thoses (frequent) cases when tramp stalls, I just halt the process with C-g , kill the tramp buffer and I can then save the file. M-x kill-buffer RET *tramp.* I don't face such timeout situation though I frequently use TRAMP. Try something like

TRAMP ignores tramp-remote-path

拥有回忆 提交于 2019-12-05 03:45:14
I have the following in my .emacs: (require 'tramp) (add-to-list 'tramp-remote-path "/some/path") (add-to-list 'tramp-remote-path 'tramp-default-remote-path) so when I open a file using tramp over ssh, I expect my PATH to contain /some/path . Instead, running M-! echo $PATH returns /bin:/usr/bin:/usr/sbin:/usr/local/bin Even if I set export PATH=/hwdisks/data/modules/pkg/git/1.8.4.1/bin/git:$PATH in .bashrc or .profile , PATH is not set correctly. In the tramp log, *debug tramp/ssh remotehost* , I can see tramp explicitly setting PATH : 12:28:34.202135 tramp-send-command (6) # PATH=/bin:/usr

Passwords in Emacs tramp mode editing

◇◆丶佛笑我妖孽 提交于 2019-12-04 16:18:59
问题 I'm using emacs tramp mode to remotely edit files over ssh. The problem is that every time I save the file I'm editing I have to enter my user password. I find that very annoying. How can I write my password only once / editing session? 回答1: Ah, from the tramp docs on password caching you can set: (setq password-cache-expiry nil) which requires the package password-cache.el. Also, in the tramp sources, it mentions reading the ssh-agent(1) man page, which shows how to set it up so that you don

Emacs: Tab completion of file name appends an extra i:\\cygwin

血红的双手。 提交于 2019-12-04 14:53:51
I am facing some strange behavior with file-name completion in emacs. C-x C-f to find file opens up the minibuffer with i:/cygwin/home/rrajagop/StockScreener/working_copy/master_repo/stock_screener/. Hitting a TAB makes it i:/cygwini:/cygwin/home/rrajagop/StockScreener/working_copy/master_repo/stock_screener/. A couple of interesting things I've noticed: When the minibuffer opens up, i:/cygwin is greyed out and the path seems to start from /home. A C-a (go to begining of line) takes me to /home and not to i:/cygwin. So it looks like something in emacs is parsing the path to start from /home

emacs 24 on windows 7, tramp cannot find plink program

孤街醉人 提交于 2019-12-04 12:43:43
I am trying to use Emacs 24.2 with Tramp on windows 7 to remotely edit files on a linux server. I installed the Putty suit program and OpenSSH. I also placed the plink.exe in the putty suit into the bin folder under the emacs 24 folder, and added the folder emacs24/bin into the PATH environment variable. However, when I try to access the remote file from emacs with the command in the minibuffer: /username@host:filename, I get the following error message from emacs: plink is not recognized as an internal or external command. It seems that emacs cannot find the plink program. But, when I try to

In Emacs, how do I figure out which package is loading tramp?

时光毁灭记忆、已成空白 提交于 2019-12-04 12:25:01
问题 I have a strange interaction with tramp and cygwin-mount (I think: Emacs: Tab completion of file name appends an extra i:\cygwin). Because of this, I want to disable tramp. I'm unable to find anything in my .emacs which is loading tramp explicitly. I can see "Loading tramp..." when I hit a tab in the find-file minibuffer. I'd like to figure out what package is causing the loading of tramp and disable that. How do I go about doing this? I tried searching for (require 'tramp) but couldn't find

In Emacs, how do I use directory local variables for remote projects?

孤者浪人 提交于 2019-12-04 05:28:58
I'm using TRAMP to connect to a remote server and I wanted to use some directory local variables. What are my options? Should I use emacs-server and do it that way, or should I add the directory local variables to my .emacs file? Is there a way to force TRAMP to look for the .dir-locals.el file? For Emacs 24.3 or later, see legoscia's answer. For earlier versions, you can use the following workaround from EmacsWiki : We can advise ‘hack-dir-local-variables’ to work around this, if you are willing to incur the associated performance cost (which can be relatively minimal in some situations). ;;

Emacs: disable Ido completion in Tramp mode

老子叫甜甜 提交于 2019-12-04 02:37:32
I often use ido for auto-completion and tramp to access remote server via ssh. My .emacs includes the following lines: (require 'tramp) (setq tramp-default-method "ssh") (ido-mode 1) (setq ido-enable-flex-matching t) (setq ido-everywhere t) I want to disable Ido completion, when i'm browsing contents of remote server. Note that variable ido-enable-tramp-completion has nothing to do with my problem. Consider line /root@site.com#1234:/var/www/file.txt . I need Ido not to deduct the part after the colon (remote file path), i don't care about the part before the colon. I use ssh, and Ido makes

How to create a trampoline function for hook

岁酱吖の 提交于 2019-12-04 00:28:05
I'm interested in hooking and I decided to see if I could hook some functions. I wasn't interested in using a library like detours because I want to have the experience of doing it on my own. With some sources I found on the internet, I was able to create the code below. It's basic, but it works alright. However when hooking functions that are called by multiple threads it proves to be extremely unstable. If two calls are made at nearly the same time, it'll crash. After some research I think I need to create a trampoline function. After looking for hours all I was not able to find anything

Using emacs tramp vs. rsync for remote development

孤人 提交于 2019-12-03 16:44:46
问题 I have been doing some remote development using emacs tramp and found that it was quite slow. Every time I save a file, it takes about 10 seconds to complete the save. So, now I am using rsync to transfer the files remotely and it works much faster, it takes about a second plus the local saves from emacs are instant. Are there any configuration options within tramp to get it to run as fast as rsync does on the command line? Are there any advantages to using tramp instead of rsync even though