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
(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 "'")))
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.
原文时间: 2016-04-21 09:45
整理时间: 2016-04-22 05:30
本文由 Hick 整理，转载请保留以上信息;
The 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 .