Say you want to send some ASCII text, part of which has been redacted, e.g., "He once found a βββββ stuck in a bathroom on the second floor, which was, of course, βββββββββββββββββββββββ to the case of βββββββββββββββ."
I wrote an Emacs command to do this, which I bound to C-c r, so you take the original:
He once found a horse stuck in a bathroom on the second floor, which was, of course, fundamentally connected to the case of the missing cat.
select the offending (or sensitive) material, and C-c r over it. Here is the command:
(defun redact-region ()
"Replace the selected region with full block characters (β) of the same length."
(interactive)
(if (use-region-p)
(let* ((start (region-beginning))
(end (region-end))
(length (- end start)))
(delete-region start end)
(insert (make-string length ?β)))
(message "No region selected!")))
(defun redact-word-or-region ()
"Redact current word or selected region with β blocks."
(interactive)
(if (use-region-p)
(redact-region)
(let ((bounds (bounds-of-thing-at-point 'word)))
(if bounds
(let ((start (car bounds))
(end (cdr bounds)))
(delete-region start end)
(goto-char start)
(insert (make-string (- end start) ?β)))
(message "No word at point")))))
(global-set-key (kbd "C-c r") 'redact-word-or-region)