emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <87vbpk61on.fsf_-_@gmail.com> (raw)
In-Reply-To: 8761hk7hqz.fsf@geodiff-mac3.ulb.ac.be

Nicolas Richard <theonewiththeevillook@yahoo.fr> writes:

> Thorsten Jolitz <tjolitz@gmail.com> 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

  parent reply	other threads:[~2014-08-22 14:26 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-20 12:00 org-element-at-point fails in programming-modes Thorsten Jolitz
2014-08-20 12:12 ` Thorsten Jolitz
2014-08-20 12:17   ` Nick Dokos
2014-08-20 12:39     ` Sebastien Vauban
2014-08-20 14:28       ` Nick Dokos
2014-08-22  4:02         ` Nick Dokos
2014-08-22  5:22           ` Nicolas Richard
2014-08-22 13:23             ` Nick Dokos
2014-08-22 10:28           ` Thorsten Jolitz
2014-08-22 13:46             ` Nick Dokos
2014-08-22 13:53             ` Nicolas Richard
2014-08-22 14:20               ` Nicolas Richard
2014-08-22 14:26               ` Thorsten Jolitz [this message]
2014-08-22 14:46               ` Nick Dokos
2014-08-22 17:07           ` Rasmus
2014-08-20 12:41   ` Nicolas Richard
2014-08-21 20:03   ` Rasmus
2014-08-21 20:13     ` Rasmus
2014-08-21 20:35     ` Thorsten Jolitz
2014-08-21 20:49       ` Rasmus
2014-08-20 12:40 ` Nicolas Richard
2014-08-20 13:52   ` Thorsten Jolitz
2014-08-21  8:58     ` Nicolas Goaziou
2014-08-21 11:22       ` Thorsten Jolitz
2014-08-22 13:47       ` Bastien
2014-09-23 10:29       ` Thorsten Jolitz
2014-09-23 21:27         ` Nicolas Goaziou

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=87vbpk61on.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).