2

For my speech recognition mode I have emacs listen asynchronously using make-network-process for messages sent by my python client. If I say anything that should translate to emacs taking an action the python client send an elisp snippet to execute. To prevent bad code snippets from causing emacs to go unresponsive I wrap the code in a with-timeout as a failsafe.

The problem is if I use TRAMP to try to open say C-x C-f /sudo::/tmp/foo, emacs completely blocks on waiting for me to enter my password. Any packets sent by the client are ignored -- emacs isn't pulling any data off the socket. This means that if I'm only using my voice with-timeout always fires, and even if I'm typing that day I need to type really quickly. This is weird because 99% of the time minibuffer prompts don't do this -- usually the rest of emacs keeps running.

Is there a way to have tramp mode not completely block? Maybe a custom command prompting for the password that sticks it in tramp's password cache so that tramp's command to ask doesn't fire?

  • How about using an external utility such as sshpass or configuring a password file such as auth-sources? (defun my-remote-login () (interactive) (let ((auth-sources '("/Users/HOME/.0.data/.0.emacs/.authinfo"))) (find-file "/ssh:lawlist@12.34.56.789:/home/lawlist/"))) The auth-sources file looks like this: machine 12.34.56.789 login lawlist password 12AB34cd port ssh Here is a helpful link that another forum participant wrote up: stackoverflow.com/a/22974359/2112489 – lawlist May 14 '15 at 3:39
1

Turns out this is an issue with projectile mode in emacs 24+. See here. Quick fix is to eval the following:

(setq projectile-mode-line " Projectile")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.