emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] How to turn off visibility-state messages from 'org-cycle?


From: Thorsten Jolitz
Subject: Re: [O] How to turn off visibility-state messages from 'org-cycle?
Date: Thu, 18 Jul 2013 11:57:54 +0200
User-agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.3 (gnu/linux)

Thorsten Jolitz <address@hidden> writes:

oops, there was a left-over from inspiring `toggle-truncate-lines' in my
example function, here is the fixed version:

#+begin_src emacs-lisp
  (defvar org-cycle-silently nil
    "Suppress visibility-state-change messages when non-nil.")

  (defun org-toggle-silent-cycling (&optional arg)
    "Toggle silent cycling between visibility states.

  When silent cycling is off, visibility state-change messages are
  written to stdout (i.e. the *Messages* buffer), otherwise these
  messages are suppressed. With prefix argument ARG, cycle silently
  if ARG is positive, otherwise write state-change messages."
    (interactive "P")
    (setq org-cycle-silently
          (if (null arg)
              (not org-cycle-silently)
            (> (prefix-numeric-value arg) 0)))
    (message "Silent visibility cycling %s"
             (if org-cycle-silently "enabled" "disabled")))
#+end_src

-- 
cheers,
Thorsten




reply via email to

[Prev in Thread] Current Thread [Next in Thread]