From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: Exzessive newlines in org-element item interpreter? Date: Sun, 19 Oct 2014 09:21:04 +0200 Message-ID: <87vbng7cf3.fsf@gmail.com> References: <87tx312j04.fsf@gmail.com> <87k33w36ci.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56817) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xfknw-0003Il-EY for emacs-orgmode@gnu.org; Sun, 19 Oct 2014 03:21:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xfknq-00064Z-Cy for emacs-orgmode@gnu.org; Sun, 19 Oct 2014 03:21:28 -0400 Received: from plane.gmane.org ([80.91.229.3]:39295) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xfknq-00064V-6B for emacs-orgmode@gnu.org; Sun, 19 Oct 2014 03:21:22 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Xfknm-0008K7-VW for emacs-orgmode@gnu.org; Sun, 19 Oct 2014 09:21:19 +0200 Received: from e178191179.adsl.alicedsl.de ([85.178.191.179]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 19 Oct 2014 09:21:18 +0200 Received: from tjolitz by e178191179.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 19 Oct 2014 09:21:18 +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 Nicolas Goaziou writes: > Hello, > > Thorsten Jolitz writes: > >> Hi List, >> >> evaluating this >> >> #+BEGIN_SRC emacs-lisp >> (org-element-interpret-data >> '(item (:bullet "1" :tag "hello" :checkbox "trans" :counter 2) >> (section nil "world"))) >> #+END_SRC >> >> #+results: >> : 1. [@2] hello :: >> : world >> >> the content is always placed on a newline, which looks strange in my >> eyes. Is that intended? > > It is. You include a `section' in an `item', which is syntactically > wrong. Only headlines can contain sections. I see. So when creating an element with interpreted content (that is given as plain string), I use - headlines :: (section nil "foo") - others :: (paragraph nil "foo") or should it rather be - headlines :: (section nil (paragraph nil "foo")) ? >> PS >> and checkbox is ignored, no matter if I give 'on, 'off and 'trans as >> symbols or strings. > > You should not provide 'on, 'off or 'trans, and even less strings, but > on, off or trans since your expression is already quoted. ups ... of course. One more question: the :tag property of items is parsed as list (of sec. string(s)) - is it sufficient for interpreting to give it a plain string: tag: "foo" instead of tag: ("foo")? It seems to work ... -- cheers, Thorsten