[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
insert-phone
From: |
Emanuel Berg |
Subject: |
insert-phone |
Date: |
Wed, 21 Sep 2022 06:50:43 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Let's see if any bots starts sending me SMS now ...
Maybe the phone number should have a variable as well and not
be hard-coded ...
(defun insert-mail (&optional delim)
(interactive "P")
(pcase-let ((`(,delim-beg ,delim-end) (if delim '("<" ">") '("" ""))))
(insert (format "%s%s%s" delim-beg user-mail-address delim-end)) ))
;; (insert-mail) ; incal@dataswamp.org
;; (insert-mail t) ; <incal@dataswamp.org>
(defun insert-phone (&optional world)
"WORLD format according to ITU-T E.123,
https://www.itu.int/rec/T-REC-E.123-200102-I
Sweden phone number practices,
https://dataswamp.org/~incal/phone/swedish-phone-numbers.txt"
(interactive "P")
(let ((form (if world
"+46 %d%d %d%d%d %d%d %d%d"
"0%d%d-%d%d%d %d%d %d%d") ))
(insert (format form 7 2 9 4 6 2 0 2 6)) ))
;; (insert-phone) ; 072-946 20 26
;; (insert-phone t) ; +46 72 946 20 26
--
underground experts united
https://dataswamp.org/~incal
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- insert-phone,
Emanuel Berg <=