O código é este:
(defun short-url (url) (interactive "M") (let ((url-request-method "GET")) (url-retrieve (concat "http://is.gd/create.php?format=simple&url=" url) (lambda (x) (goto-char (point-min)) (search-forward-regexp "http://.*") (setq s-url (match-string-no-properties 0)))) (insert s-url)))
Created: NaN
Last updated: 23-01-2025 [00:04]
For attribution, please cite this page as:
Charters, T., "Shorten URLs in Emacs Lisp": https://nexp.pt/short_url.html (23-01-2025 [00:04])
(cc-by-sa) Tiago Charters - tiagocharters@nexp.pt