emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rick Moynihan <rick@calicojack.co.uk>
To: Bastien Guerry <bzg@altern.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: blorg.el
Date: Tue, 19 Feb 2008 10:18:37 +0000	[thread overview]
Message-ID: <47BAACFD.404@calicojack.co.uk> (raw)
In-Reply-To: <87ve5blrxt.fsf@bzg.ath.cx>

Bastien Guerry wrote:
> What about a simple dynamic block ?
> 
> (defun org-dblock-write:youtube (params)
>   "Insert a header from a file."
>   (let ((url (plist-get params :url)))
>     (insert 
>      (format "<object width=\"425\" height=\"355\"><param name=\"movie\"
> value=\"%s\"></param><param name=\"wmode\"
> value=\"transparent\"></param><embed src=\"%s\"
> type=\"application/x-shockwave-flash\" wmode=\"transparent\"
> width=\"425\" height=\"355\"></embed></object>" url url))))
> 
> #+BEGIN: youtube :url "http://www.youtube.com/watch?v=fu8rAWciQNs"
> #+END: 
> 
> Should expand in the correct block of text.

Hi, my apologies again for taking so long to getting round to trying 
this.  But there appear to be some problems.

I can get the above block to expand into the following text:

#+BEGIN: youtube :url "http://www.youtube.com/watch?v=fu8rAWciQNs"
<object width="425" height="355"><param name="movie"
value="http://www.youtube.com/watch?v=fu8rAWciQNs"></param><param
name="wmode" value="transparent"></param><embed
src="http://www.youtube.com/watch?v=fu8rAWciQNs"
type="application/x-shockwave-flash" wmode="transparent" width="425"
height="355"></embed></object>
#+END:

But the problem appears to be that the URL which appears twice in the 
block isn't inserted literally but is instead expanded into an <a 
href=""> in the source when M-x blorg-publish is run e.g:

<object width="425" height="355"><param name="movie" value="<a
href="http://www.youtube.com/watch?v=fu8rAWciQNs"">watch?v=fu8rAWciQNs"</a>></param><param
name="wmode"
value="transparent"></param><embed src="<a
href="http://www.youtube.com/watch?v=fu8rAWciQNs"">watch?v=fu8rAWciQNs"</a>

Is there a way to disable this when inside dynamic blocks?

Thanks again,

R.

  reply	other threads:[~2008-02-19 10:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-29 11:44 blorg.el Dimitris Kapetanakis
2008-01-29 15:18 ` blorg.el bzg
2008-01-29 15:09   ` blorg.el Rick Moynihan
2008-01-29 15:54     ` blorg.el Dimitris Kapetanakis
2008-01-30  6:59     ` blorg.el Bastien Guerry
2008-02-19 10:18       ` Rick Moynihan [this message]
2008-02-19 13:10         ` blorg.el Bastien Guerry
2008-02-21  0:44           ` blorg.el Steven Lumos
  -- strict thread matches above, loose matches on Subject: below --
2008-01-30  5:25 blorg.el Dimitris Kapetanakis
2008-01-30  6:29 ` blorg.el Bastien Guerry

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=47BAACFD.404@calicojack.co.uk \
    --to=rick@calicojack.co.uk \
    --cc=bzg@altern.org \
    --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).