From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: M-: (org-display-outline-path) doesn't work correctly Date: Thu, 13 Mar 2014 12:38:36 +0100 Message-ID: <878usepbur.fsf@gmail.com> References: <8738inscnt.fsf@gmail.com> <87zjkvxxnb.fsf@bzg.ath.cx> <87siqnquyh.fsf@gmail.com> <87d2hrwg3m.fsf@bzg.ath.cx> <87eh27qrxd.fsf@gmail.com> <87mwgvia6t.fsf@bzg.ath.cx> <87a9cvqo2k.fsf@gmail.com> <87fvmmih18.fsf@yahoo.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60144) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WO3xF-0007Hp-Gh for emacs-orgmode@gnu.org; Thu, 13 Mar 2014 07:37:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WO3x8-0002RM-SE for emacs-orgmode@gnu.org; Thu, 13 Mar 2014 07:37:41 -0400 Received: from plane.gmane.org ([80.91.229.3]:50038) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WO3x8-0002RD-Lr for emacs-orgmode@gnu.org; Thu, 13 Mar 2014 07:37:34 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WO3x7-0001UR-9I for emacs-orgmode@gnu.org; Thu, 13 Mar 2014 12:37:33 +0100 Received: from e178061230.adsl.alicedsl.de ([85.178.61.230]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 13 Mar 2014 12:37:33 +0100 Received: from tjolitz by e178061230.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 13 Mar 2014 12:37:33 +0100 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 Nicolas Richard writes: > Thorsten Jolitz writes: >> Ok, I see ... that seems to be a common pattern in Org-mode to make >> functions behave differently if called (non-)interactively, that >> sometimes causes confusion when using M-: instead of M-x. > > Note that using M-: will always hide any (message "foo") might have > been called because M-: outputs the return value of the function. > Usually you can recover those by inspecting the *Messages* buffer, but > in this case org uses org-unlogged-message so you can't see it there > either. > > Try this : > M-: (prog1 (org-display-outline-path) (sit-for 2)) RET > It shows the message (for up to 2 seconds), and then it is hidden by the > return value (a string with properties) when the call to M-: terminates. Thanks for the hint, this does the job: #+begin_src emacs-lisp (" " . (outshine-use-outorg (lambda () (message "%s" (substring-no-properties (org-display-outline-path)))) 'WHOLE-BUFFER-P)) #+end_src only that promptly another message is shown (I can't use sit-for in the program): ,----------------------------- | Wrote /home/my/tmpdir/myfile `----------------------------- I have to get rid of that one ... -- cheers, Thorsten