Re: [Orgmode] blorg.el
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\/paramparam name=\wmode\ value=\transparent\/paramembed 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=355param name=movie value=http://www.youtube.com/watch?v=fu8rAWciQNs;/paramparam name=wmode value=transparent/paramembed 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=355param name=movie value=a href=http://www.youtube.com/watch?v=fu8rAWciQNs;watch?v=fu8rAWciQNs/a/paramparam name=wmode value=transparent/paramembed 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. ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] blorg.el
Rick Moynihan [EMAIL PROTECTED] writes: 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=355param name=movie value=a href=http://www.youtube.com/watch?v=fu8rAWciQNs;watch?v=fu8rAWciQNs/a/paramparam name=wmode value=transparent/paramembed src=a href=http://www.youtube.com/watch?v=fu8rAWciQNs;watch?v=fu8rAWciQNs/a Argh. I see. Is there a way to disable this when inside dynamic blocks? Not one that I will work on now. But please be patient, I'm coding the new export engine and it will be much easier to publish a blog with it. -- Bastien ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] blorg.el
thanks Bastien, but it still says, Compiling file g:/Emacs/site-lisp/blorg.el at Tue Jan 29 13:23:46 2008 blorg.el:1405:1:Error: Invalid read syntax: ? I guess that it is the function (defun blorg-make-post-url (blorgv-post-title) it looks like this in my system (defun blorg-make-post-url (blorgv-post-title) Make a permanent url from BLORGV-POST-TITLE. (with-temp-buffer (insert blorgv-post-title) (goto-char (point-min)) (while ( (point) (point-max)) (cond ((member (char-after) '(?Γ(c) ?Γ¨ ?Γ� ?Γ ?Γ΄ ?Γ― ?ΓΉ)) (progn (delete-char 1) (insert e))) ((member (char-after) '(? ?\' ?/ ?% ?# ?= ?+)) (progn (delete-char 1) (insert -))) ((member (char-after) '(?\ ?, ?\; ?: ?? ?! ?. ?$ ?\t)) (progn (delete-char 1))) ((not (eq (car (split-char (char-after))) 'ascii)) (delete-char 1)) (t (forward-char 1 (concat (replace-regexp-in-string -+$ (buffer-string)) (plist-get blorg-strings :page-extension what are these strange characters in the 7th line? in another editor (notepad++) looks like (cond ((member (char-after) '(?é ?è ?ê ?à ?ô ?ï ?ù)) Do you do something with the vowels in french? Also I can see page breaks in the file ^L is that normal? As I am writing this I think that perhaps this problem is caused because I have set the mule to be greek (iso-8859-7) and that scrambled the function definition. Should I change this to the english vowels or the greek ones (since I am also writing in greek ...) Dimitris 2008/1/29, Bastien Guerry [EMAIL PROTECTED]: Hi Dimitri, Dimitris Kapetanakis [EMAIL PROTECTED] writes: This is really a question for Bastien I tried to use blorg.el but I can't load it it says Compiling file g:/Emacs/site-lisp/blorg.el at Mon Jan 28 13:17:20 2008 blorg.el:133:1:Warning: value returned from (fboundp (quote replace-regexp-in-string)) is unused blorg.el:1405:1:Error: Invalid read syntax: ? can you help me? I've uploaded a small fix for this. Please check blorg.el 0.75b: http://www.cogintion.ens.fr/~guerry/u/blorg.el HTH, -- Bastien ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] blorg.el
Thanks it works now! I am trying it! Dimitris 2008/1/29, Rick Moynihan [EMAIL PROTECTED]: Hi, I've been meaning to mention that blorg produces invalid XML for atom feeds (perhaps also RSS/HTML). Most obviously it doesn't appear to entity escape characters the following characters properly '', '', '', which should be rendered as gt; lt; and amp; respectively. Also I think img tags aren't closed properly, i.e. they're rendered as img src=foo.jpg rather than the correct: img src=foo.jpg/ Another issue I have, is that sometimes when calling blorg-publish it doesn't render links properly, i.e. [[http://foo.com/][foo]] will be displayed in the HTML/XML rather than: a href=http://foo.com;foo/a This doesn't always happen, but seems to occur when either: - you run blorg-publish without a C-u prefix argument. - or, you have an orglink which runs across a line break, e.g. [[http://foo.com/]| --- newline [foo]] Also, it'd be great if there was a way to easily embed flash video content onto the pages, by using custom links, e.g. [[youtube:http://www.youtube.com/watch?v=fu8rAWciQNs]] Which would be expanded into the appropriate embeded object: object width=425 height=355param name=movie value=http://www.youtube.com/v/fu8rAWciQNsrel=1;/paramparam name=wmode value=transparent/paramembed src=http://www.youtube.com/v/fu8rAWciQNsrel=1; type=application/x-shockwave-flash wmode=transparent width=425 height=355/embed/object [EMAIL PROTECTED] wrote: thanks Bastien, but it still says, Yes, I made the mistake of using accentuated characters inside the source, the file being encoded in utf-8. I replaced this with the integer representation of characters in 0.75c -- see attached file. Sorry for the mess, but I'm writing from Nancy, was in Paris this morning, and in London this night... :) ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode -- Rick Moynihan http://sourcesmouth.co.uk/blog/ ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] blorg.el
Hi, I've been meaning to mention that blorg produces invalid XML for atom feeds (perhaps also RSS/HTML). Most obviously it doesn't appear to entity escape characters the following characters properly '', '', '', which should be rendered as gt; lt; and amp; respectively. Also I think img tags aren't closed properly, i.e. they're rendered as img src=foo.jpg rather than the correct: img src=foo.jpg/ Another issue I have, is that sometimes when calling blorg-publish it doesn't render links properly, i.e. [[http://foo.com/][foo]] will be displayed in the HTML/XML rather than: a href=http://foo.com;foo/a This doesn't always happen, but seems to occur when either: - you run blorg-publish without a C-u prefix argument. - or, you have an orglink which runs across a line break, e.g. [[http://foo.com/]| --- newline [foo]] Also, it'd be great if there was a way to easily embed flash video content onto the pages, by using custom links, e.g. [[youtube:http://www.youtube.com/watch?v=fu8rAWciQNs]] Which would be expanded into the appropriate embeded object: object width=425 height=355param name=movie value=http://www.youtube.com/v/fu8rAWciQNsrel=1;/paramparam name=wmode value=transparent/paramembed src=http://www.youtube.com/v/fu8rAWciQNsrel=1; type=application/x-shockwave-flash wmode=transparent width=425 height=355/embed/object [EMAIL PROTECTED] wrote: thanks Bastien, but it still says, Yes, I made the mistake of using accentuated characters inside the source, the file being encoded in utf-8. I replaced this with the integer representation of characters in 0.75c -- see attached file. Sorry for the mess, but I'm writing from Nancy, was in Paris this morning, and in London this night... :) ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode -- Rick Moynihan http://sourcesmouth.co.uk/blog/ ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] blorg.el
Hi Rick, Rick Moynihan [EMAIL PROTECTED] writes: I've been meaning to mention that blorg produces invalid XML for atom feeds (perhaps also RSS/HTML). Most obviously it doesn't appear to entity escape characters the following characters properly '', '', '', which should be rendered as gt; lt; and amp; respectively. Trying to fix this is dangerous, it might break other things. If the issue is just XML validation, I won't do it for now - sorry. Also I think img tags aren't closed properly, i.e. they're rendered as img src=foo.jpg rather than the correct: img src=foo.jpg/ Fixed in 0.75d. Another issue I have, is that sometimes when calling blorg-publish it doesn't render links properly, i.e. [[http://foo.com/][foo]] will be displayed in the HTML/XML rather than: a href=http://foo.com;foo/a This doesn't always happen, but seems to occur when either: - you run blorg-publish without a C-u prefix argument. - or, you have an orglink which runs across a line break, e.g. [[http://foo.com/]| --- newline [foo]] (Of course, blorg should use Org's HTML converter. This is in the plan for the next org-based blogging system, so I'm not willing to try fixing this neither...) Also, it'd be great if there was a way to easily embed flash video content onto the pages, by using custom links, e.g. [[youtube:http://www.youtube.com/watch?v=fu8rAWciQNs]] Which would be expanded into the appropriate embeded object: object width=425 height=355param name=movie value=http://www.youtube.com/v/fu8rAWciQNsrel=1;/paramparam name=wmode value=transparent/paramembed src=http://www.youtube.com/v/fu8rAWciQNsrel=1; type=application/x-shockwave-flash wmode=transparent width=425 height=355/embed/object 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\/paramparam name=\wmode\ value=\transparent\/paramembed 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. HTH, -- Bastien ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode