From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: How to turn off visibility-state messages from 'org-cycle? Date: Thu, 18 Jul 2013 11:32:21 +0200 Message-ID: <87txjsgqmy.fsf@gmail.com> References: <878v158eag.fsf@gmail.com> <87a9lkmfk0.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55171) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzkZk-0005WL-5x for emacs-orgmode@gnu.org; Thu, 18 Jul 2013 05:32:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzkZi-00084Y-NO for emacs-orgmode@gnu.org; Thu, 18 Jul 2013 05:32:40 -0400 Received: from plane.gmane.org ([80.91.229.3]:53878) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzkZi-00084B-Hn for emacs-orgmode@gnu.org; Thu, 18 Jul 2013 05:32:38 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UzkZh-0007wg-3Y for emacs-orgmode@gnu.org; Thu, 18 Jul 2013 11:32:37 +0200 Received: from g231107052.adsl.alicedsl.de ([92.231.107.52]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 18 Jul 2013 11:32:37 +0200 Received: from tjolitz by g231107052.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 18 Jul 2013 11:32:37 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Eric S Fraga writes: > Thorsten Jolitz 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 > > [...] > >> Is there a way to turn these message off? I found things like > > Unfortunately, no. The code that outputs these messages does have a > hack to turn off the output when the org file is an attachment in a gnus > message but that's about it. > > I also would like to have these turned off when using an emacs batch > command which I often do to synchronise my diary with various online > calendars... > > Should be easy to add a variable and then a condition on each > (message...) line in org-cycle-internal-global as all of the relevant > message lines are already within a conditional. yes, adding this defcustom to org.el #+begin_src emacs-lisp (defcustom org-cycle-silently nil "Non-nil means `org-cycle-internal-global' cycles silently. No messages about changing visibility state of the Org-mode buffer will be outputted anymore in that case. This is especially useful to avoid having these messages arrive at stdout or stderr when calling Org-mode functionality from an external program." :group 'org-cycle :type 'boolean) #+end_src and then changing the four #+begin_src emacs-lisp (unless ga (message "CONTENTS...")) #+end_src lines in `org-cycle-internal-global' to something like #+begin_src emacs-lisp (unless (or ga org-cycle-silently) (message "CONTENTS...")) #+end_src would do the job. -- cheers, Thorsten