Emacs Lisp: dig-txt and dig-txt-short as small extensions `dig` function

Emacs Lisp: dig-txt and dig-txt-short as small extensions dig function

Extending the GNU Emacs built-in dig function is very easy with C-h f and function name and then inspecting how to make your extension. In this case dig is looking for text records which may be suitable to inspect SPF and other related DNS records.

Sometimes I had more than thousand domains at one given time, and now just about hundred domains. Each domain requires quick DNS setup and verifications. Extending GNU Emacs is easy by inspecting functions with C-h f and making new functions when necessary.

(defun dig-txt (host)
  "Extending the GNU Emacs built-in `dig` function is very easy with `C-h f` and function name and then inspecting how to make your extension. In this case `dig` is looking for text records which may be suitable to inspect SPF and other related DNS records"
  (interactive "sHost: ")
  (dig host "txt"))

(defun dig-txt-short (host)
  "This is extension function to GNU Emacs built-in function `dig` which returns short TXT record for a given host name"
  (interactive "sHost: ")
  (dig host "txt" nil nil "+short"))

You may decide to do the DNS records through GNU Emacs where it enables easy killing (copying) and yanking (pasting) or that you do it under terminal with mouse copy or screen or tmux based copy functions and then transferring it to GNU Emacs. My choice is to do it in this comfortable operating environment.

Related pages

Leave Your Comment or Contact GNU.Support

Contact GNU.Support now. There is a simple rule at GNU.Support: if we can help you, we do, whenever and wherever necessary, and it's the way we've been doing business since 2002, and the only way we know


Full name:


E-mail:


Message: