A magic trick to make cool email signature



A magic trick to make cool email signature

Table of Contents

  • 1 where's the idea come from?
  • 2 how to use it?

1 where's the idea come from?

I hang out in the #emacs IRC channel in freenode one day, and some guy show some funny trick that can always make some fun:
fortune | cowsay
Every time I execute this command, the output always let me LOL.
 _______________________________________ 
/ Atherton: "You set this up, whore!    \
| After I bought and paid for you. I    |
| should have uglied you up so no one   |
| else would want you."                 |
|                                       |
| Mal: "See how I'm not punching him? I |
| think I've grown."                    |
|                                       |
\ --Episode #4, "Shindig"               /
 --------------------------------------- 
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
So I get a idea, why not put this trick into my email signature. I can send email with those magic that's awesome. But some email client don't support a script powered signature, Fortunately I am emacser, It's so easy to add a hook in my email mode. So cool! huh! Enjoy this trick!
(defun fortune-cowsay () (interactive) (save-excursion (goto-char (point-max)) (insert "\n") (insert "------------------") (insert "\n") (insert (shell-command-to-string "fortune | cowsay")) (insert "------------------"))) (defun zpcat-signature () (interactive) (save-excursion (goto-char (point-max)) (insert "\n") (insert "Regards,\n") (insert "Yours\n")) (fortune-cowsay)) ;; add fortune-cowsay to message-mode-hook (add-hook 'message-mode-hook 'zpcat-signature)

2 how to use it?

Load above elisp code into your emacs, and It can works.

Comments

Popular posts from this blog

Bluedroid stack in android

How to setup a NAT server?

Network programming in elisp