Rudy’s OBTF Rudolf Adamkovič

Home / Emacs / Org / Maintenance commands


Remove links

Remove all links quickly.

(defun my-org-remove-links ()
  "Replace [[DESCRIPTION][TARGET]] with DESCRIPTION in the region or buffer."
  (interactive)
  (save-excursion
    (replace-regexp org-bracket-link-regexp "\\2"
                      nil
                      (if (region-active-p) (region-beginning) (point-min))
                      (if (region-active-p) (region-end) (point-max)))))

© 2025 Rudolf Adamkovič under GNU General Public License version 3.
Made with Emacs and secret alien technologies of yesteryear.