emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: "Дядов Васил Стоянов" <vdyadov@elvees.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug: [PATCH] Org-babel: separate #+attr_... for code block and for results block [7.9.3d (release_7.9.3d-834-g60083a.dirty @ /home/vdyadov/Work/Tools/emacs/org-mode/lisp/)]
Date: Wed, 23 Jan 2013 16:22:24 +0100	[thread overview]
Message-ID: <871udbapqn.fsf@gmail.com> (raw)
In-Reply-To: <s4y1udcq6uo.fsf@canopus-pc.elvees.com> ("Дядов Васил Стоянов"'s message of "Wed, 23 Jan 2013 19:03:43 +0400")

vdyadov@elvees.com (Дядов Васил Стоянов) writes:

> Why syntax is invalid? 

Affiliated keywords have to be put above elements they refer to, without
a blank line in-between.

> I've taken a look at the source code in org-elements.el and found that
> it is taking into account some expressions, like #+results: and so
> on(see org-element-affiliated-keywords, org-element--affiliated-re)
> when attaching properties to objects.
>
> And everything works fine (attributes were attached to right objects),
> except org-babel strategy for searching #+results: expression for
> updating results.
>
> What could you suggest in my case? When I put attributes right before
> link to the image file, I get:
>
> initial code:
>
> ,----
> | #+begin_src ditaa :file 123.png :cache yes
> | ...
> | #+end_src
> |  
> | #+results[f8f8...]:
> | #+attr_html: alt="big image" width="100%"
> | file:123.png
> `----
>
> C-c C-c, result:
>
> ,----
> | #+begin_src ditaa :file 123.png :cache yes
> | ...
> | #+end_src
> |  
> | #+results[f8f8...]:
> | file:123.png
> | 
> | #+attr_html: alt="big image" width="100%"
> | file:123.png
> `----

Elements doesn't care about order for affiliated keywords (here results
and attr_html), but Babel, which isn't built on Elements (yet), does.

Hence, I suggest:

  #+attr_html: ...
  #+results: ...
  file


Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2013-01-23 15:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-23 11:43 Bug: [PATCH] Org-babel: separate #+attr_... for code block and for results block [7.9.3d (release_7.9.3d-834-g60083a.dirty @ /home/vdyadov/Work/Tools/emacs/org-mode/lisp/)] Дядов Васил Стоянов
2013-01-23 13:15 ` Nicolas Goaziou
2013-01-23 15:03   ` Дядов Васил Стоянов
2013-01-23 15:22     ` Nicolas Goaziou [this message]
2013-01-24  7:58       ` Дядов Васил Стоянов
2013-01-24  7:59         ` Bastien
2013-01-24 13:20         ` Nicolas Goaziou
2013-01-24 14:10           ` Дядов Васил Стоянов
2013-01-24 14:13             ` Bastien

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=871udbapqn.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=vdyadov@elvees.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).