From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Jambunathan K <kjambunathan@gmail.com>
Cc: Orgmode <emacs-orgmode@gnu.org>
Subject: Re: comments and attributes
Date: Wed, 01 Feb 2012 14:04:08 +0100 [thread overview]
Message-ID: <878vkmso1j.fsf@gmail.com> (raw)
In-Reply-To: <81aa52vrpz.fsf_-_@gmail.com> (Jambunathan K.'s message of "Wed, 01 Feb 2012 14:46:24 +0530")
Hello,
Jambunathan K <kjambunathan@gmail.com> writes:
> On a related note,
>
> * Example
>
> This
> is
> a
> single
> # some comment
> paragraph.
>
>
> This
> is
> another
> #+attr_odt: t
> paragraph.
>
> if I parse the above buffer, I get
>
> #+begin_src emacs-lisp
> (paragraph
> (:begin 412 :end 431 :contents-begin 412 :contents-end 430 :post-blank 0)
> "This \nis \na\nsingle")
> (comment
> (:begin 431 :end 446 :value "# some comment\n" :post-blank 0))
> (paragraph
> (:begin 446 :end 459 :contents-begin 446 :contents-end 456 :post-blank 2)
> "paragraph.")
> (paragraph
> (:begin 459 :end 477 :contents-begin 459 :contents-end 476 :post-blank 0)
> "This \nis \nanother")
> (paragraph
> (:begin 477 :end 502 :contents-begin 491 :contents-end 501 :post-blank 0 :attr_odt
> ("t"))
> "paragraph.")
> #+end_src
>
> I see that the new export engine treats comment and control lines as par
> breakers. The backends that are in production treats the first paragraph
> as but a single paragraph.
Not the export engine, but the parser. Comment is an element type, as is
Paragraph. Beginning an element ends the previous one.
This has always been true in Org. For example, you may look at
`paragraph-start' and `paragraph-separate' values in an Org buffer:
comments (and many other things) are clearly separating and ending
paragraphs.
Also, it is consistent with other elements. Indeed, consider the
following example:
--8<---------------cut here---------------start------------->8---
: fixed-width line 1
# Commented line
: fixed-width line 2
--8<---------------cut here---------------end--------------->8---
If you use C-c ' on the first fixed-width line, you won't be offered to
edit also the second one.
Though, you're right, current exporter indeed ignores that Org feature.
> There is already a way by which parbreaks can be introduced. Do you
> think there could be some useful behaviour achieved - side by side
> export of images came up in this thread - by not having commented
> elements introduce parbreaks.
I think that it's a mistake to rely on comments to define semantics.
Anyway, I suggested something already about the problem of side by side
paragraphs. What was wrong with it? If it wasn't clear, I'll try to
provide an example. If it was flawed, we may try to improve it.
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2012-02-01 13:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-18 8:52 [ODT] image scaling overridden by long caption Andreas Leha
2012-01-19 20:03 ` Jambunathan K
2012-01-21 10:18 ` Andreas Leha
2012-01-23 19:53 ` Jambunathan K
2012-01-23 21:20 ` Nicolas Goaziou
2012-02-01 9:16 ` comments and attributes Jambunathan K
2012-02-01 13:04 ` Nicolas Goaziou [this message]
2012-02-15 0:03 ` [ODT] image scaling overridden by long caption Andreas Leha
2012-01-27 14:40 ` Jambunathan K
2012-01-27 22:41 ` Andreas Leha
2012-01-31 4:59 ` Jambunathan K
2012-02-07 10:04 ` Andreas Leha
2012-01-23 1:53 ` Side-by-side support (was:Re: [ODT] image scaling overridden by long caption) Christian Wittern
2012-01-23 16:34 ` Side-by-side support Jambunathan K
2012-01-23 23:51 ` Christian Wittern
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=878vkmso1j.fsf@gmail.com \
--to=n.goaziou@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=kjambunathan@gmail.com \
/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).