Emacsist RSS --- If never, make it ever: C-h C-h

Sending SMS messages from Emacs on Android

7454

这里 查看更多 Emacs 相关推荐文章最新 Emacs 圈的动态. 欢迎关注微信公众账号: Emacsist

If you’ve got emacs running in termux running on your android phone, you might wonder how to do phone stuff from emacs through the termux api. Thanks to a few recent changes, this couldn’t be simpler.

There are a few technicalities, you will need to reset the core shell-file-name as termux doesn’t have a traditional/bin/sh, and you’ll have to have the latest version of termux-api installed.

(setq shell-file-name "/data/data/com.termux/files/usr/bin/bash")
(defun send-sms (recip text)
  (interactive "sRecipient: \nsText: ")

  (shell-command (concat "bash -c 'termux-sms-send -t \"" text "\" " recip "'")))

Now simply M-x send-sms and you’re on your way. Interestingly, if you send sms to a string of characters, you can crash the underlying phone process.

原文出处: cpb83
原文地址: http://cpb83.github.io/post/emacs-sms-android/
原文时间: 2016-04-21 09:45
本文地址: http://emacsist.com/10857
整理时间: 2016-04-22 05:30

本文由 Hick 整理,转载请保留以上信息;
COPYLEFTThe articles on this site come from Internet, thanks to all the original authors.
      If anything about COPYRIGHT, or LEFT, please contact Emacsist at gmail dot com .