emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-toggle-link-style
@ 2009-08-26 15:04 Chris Leyon
  0 siblings, 0 replies; only message in thread
From: Chris Leyon @ 2009-08-26 15:04 UTC (permalink / raw)
  To: emacs org-mode mailing list

I wanted this operation on a key (rather than a menu option), so I am
sharing my function in case anyone else finds it useful:

(defun org-toggle-link-style ()
  "Toggle between descriptive and literal link styles."
  (interactive)
  (if (member '(org-link) buffer-invisibility-spec)
      ;; descriptive -> literal
      (progn
        (org-remove-from-invisibility-spec '(org-link))
        (message "Showing literal links"))
    ;; literal -> descriptive
    (org-add-to-invisibility-spec '(org-link))
    (message "Showing descriptive links"))
  (org-restart-font-lock))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-08-26 15:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-26 15:04 org-toggle-link-style Chris Leyon

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).