2

I use emacsclient regularly to open files. In order to open files owned by root, it is necessary to use tramp. As far as I know this requires the use of the eval option of emacsclient.

emacsclient --eval '(find-file "/sudo::/etc/motd")'

But this command behaves as if I specify the option no-wait, because the evaluation returns after the file has been opened.

Which expression needs to be evaluated in order to wait till the file has been closed?

  • I don't know the answer to your question, but I am able to use emacsclient /sudo::/etc/motd which waits. – amitp Feb 26 '18 at 20:21
  • @amitp Thanks! I was not aware that I can use the tramp url directly. That solves my problem. – ceving Feb 27 '18 at 7:52

Your Answer

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

Browse other questions tagged or ask your own question.