emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: How to turn off visibility-state messages from 'org-cycle?
Date: Fri, 19 Jul 2013 08:18:45 +0200	[thread overview]
Message-ID: <87li53ysvu.fsf@gmail.com> (raw)
In-Reply-To: 878v149jvq.fsf@gmail.com

Jambunathan K <kjambunathan@gmail.com> writes:

> Try this:
>
>     (defadvice org-cycle-internal-local
>       (around org-cycle-internal-local-suppress-messages activate)
>       "Do the local cycling action, but suppress messages."
>       (letf (((symbol-function 'message) (symbol-function 'ignore)))
>         ad-do-it))
>
>     (defadvice org-cycle-internal-global
>       (around org-cycle-internal-global-suppress-messages activate)
>       "Do the global cycling action, but suppress messages."
>       (letf (((symbol-function 'message) (symbol-function 'ignore)))
>         ad-do-it))
>
> You can also use `flet' form to `ignore' the `message'.

Thats nice, thank you. 

On the other hand, I wonder if it wouldn't make sense to add my "patch"
to org.el, since unconditionally writing messages for every
visibility-state change produces quite a lot of clutter, so the user
should be able to turn this off IMO.

> Thorsten Jolitz <tjolitz@gmail.com> writes:
>
>> Hi List, 
>>
>> when calling Org-mode functionality form an external program, some
>> functions seem to make use of 'org-cycle', what results in a lot of
>> "OVERVIEW" messages arriving at stdout/stderr
>>
>> ,---------
>> | OVERVIEW
>> | OVERVIEW
>> | OVERVIEW
>> | OVERVIEW
>> | OVERVIEW
>> | OVERVIEW
>> | OVERVIEW
>> | OVERVIEW
>> | OVERVIEW
>> | OVERVIEW
>> | OVERVIEW
>> | OVERVIEW
>> | OVERVIEW
>> | ....
>> `---------
>>
>>
>> that are not really helpful and a bit of a hassle.
>>
>> ,-------------------------------------------------------------------------
>> | (org-cycle &optional ARG)
>> |  ....
>> |
>> | - When this function is called with a prefix argument, rotate the entire
>> |   buffer through 3 states (global cycling)
>> |   1. OVERVIEW: Show only top-level headlines.
>> |   2. CONTENTS: Show all headlines of all levels, but no body text.
>> |   3. SHOW ALL: Show everything.
>> `-------------------------------------------------------------------------
>>
>> Is there a way to turn these message off? I found things like
>> 'org-no-popups or 'org-no-warnings but nothing like
>> "org-no-visibility-state-messages" or so. Its not really a big problem,
>> rather an inconvenience, but maybe its easy to solve when knowing where
>> to look.
>
>

-- 
cheers,
Thorsten

      reply	other threads:[~2013-07-19  6:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-17 14:13 How to turn off visibility-state messages from 'org-cycle? Thorsten Jolitz
2013-07-18  8:35 ` Eric S Fraga
2013-07-18  9:32   ` Thorsten Jolitz
2013-07-18  9:52     ` Thorsten Jolitz
2013-07-18  9:57       ` Thorsten Jolitz
2013-07-19  9:04         ` Eric S Fraga
2013-07-19 11:57           ` [PATCH] Enable silent visibility cycling (was: How to turn off visibility-state messages from 'org-cycle?) Thorsten Jolitz
2013-07-19 12:23             ` [PATCH] Enable silent visibility cycling Jambunathan K
2013-07-22  7:50               ` Thorsten Jolitz
2013-07-22  7:58                 ` Jambunathan K
2013-07-25 10:18                   ` Thorsten Jolitz
2013-07-19 17:54             ` Eric S Fraga
2013-09-02  6:50               ` Carsten Dominik
2013-07-18 11:40 ` How to turn off visibility-state messages from 'org-cycle? Jambunathan K
2013-07-19  6:18   ` Thorsten Jolitz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87li53ysvu.fsf@gmail.com \
    --to=tjolitz@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).