|
|
|
|
|
by d1egoaz
3050 days ago
|
|
Wow, this is awesome! Is there any way to make it work without selecting text? (default to all available text on the textarea) BTW, I changed a few things:
emacsclient path and the tmp folder: tmp=$(mktemp "/tmp/EditTextinEmacsXXXXXXXX")
ec=/usr/local/bin/emacsclient
cat > "$tmp"
until [ $($ec -q -e '(server-running-p)' 2>/dev/null) == t ]; do
sleep 1
done
$ec -q -c "$tmp"
rv="$?"
cat "$tmp"
if [ $rv -ne 0 ]; then
echo "Something went wrong. Please find your text in"
echo "$tmp"
else
rm "$tmp"
fi
|
|