From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Article Mode eats newlines between src-blocks (was Re: org-element-at-point fails in programming-modes) Date: Fri, 22 Aug 2014 16:26:00 +0200 Message-ID: <87vbpk61on.fsf_-_@gmail.com> References: <87zjez9xqc.fsf@gmail.com> <87vbpn9x6u.fsf@gmail.com> <87ppfvxslz.fsf@pierrot.dokosmarshall.org> <86ppfvjpwk.fsf@somewhere.org> <87tx57me13.fsf@alphaville.bos.redhat.com> <87d2btxjbn.fsf@pierrot.dokosmarshall.org> <87ha147r8z.fsf@gmail.com> <8761hk7hqz.fsf@geodiff-mac3.ulb.ac.be> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKpnR-0003E7-8c for emacs-orgmode@gnu.org; Fri, 22 Aug 2014 10:26:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XKpnL-0006RS-Fq for emacs-orgmode@gnu.org; Fri, 22 Aug 2014 10:26:29 -0400 Received: from plane.gmane.org ([80.91.229.3]:33490) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKpnL-0006RI-9o for emacs-orgmode@gnu.org; Fri, 22 Aug 2014 10:26:23 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XKpnI-00007s-QL for emacs-orgmode@gnu.org; Fri, 22 Aug 2014 16:26:20 +0200 Received: from e178058053.adsl.alicedsl.de ([85.178.58.53]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 Aug 2014 16:26:20 +0200 Received: from tjolitz by e178058053.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 Aug 2014 16:26:20 +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 Richard writes: > Thorsten Jolitz writes: >> Maybe they switched to the new parser between versions, that parses a >> src-block with :post-blank's, but does not take them into account when >> interpreting? > > I tried an experiment : (defun org-mode (&rest _) t) and refresh. The > newlines didn't come back (but fontification obviously disappeared). So > I guess it isn't org-mode's fault. > > I would like to blame (mm-uu-dissect) but I didn't look into it. I'll > take the opportunity to test if it'll also eat multiple blank lines (I > think it will) : > > #+BEGIN_QUOTE > hallo world > #+END_QUOTE > #+BEGIN_COMMENT > hallo world > #+END_COMMENT > #+BEGIN_EXAMPLE > hallo world > #+END_EXAMPLE > #+BEGIN_SRC emacs-lisp > hallo world > #+END_SRC > > (There should be 1, then 2, then 3 blanks lines between the successives > blocks above.) I don't see any blank lines between the blocks. This is how a string that is fontified in mm-view.el looks like, no matter if there are trailing blank lines: ,---- | "#+BEGIN_SRC emacs-lisp\n (- 2 2)\n#+END_SRC\n" `---- i.e. thats the value of HANDLE in this function: ,---- | (mm-display-inline-fontify HANDLE &optional MODE) `---- So either they missed the additional final "\n"'s for all but the last block when parsing, or they forgot to handle them when inserting the fontified string again. PS I renamed this thread because the original topic, which is still more important for me (!), is not discussed anymore. -- cheers, Thorsten