Re: [O] freemind.el does not convert org links to links in Freemind

2012-09-19 Thread Bastien
Hi Bill,

Bill Day  writes:

> This is how Freedmind natively outputs the same link:

Thanks -- I've now implemented this.

I won't fix org-freemind.el any further though, first because
going through the code is quite adventurous (congrats for your
courage here) and second because I think org-e-freemind.el is
under its way.

Thanks for giving the helpful example,

-- 
 Bastien



Re: [O] freemind.el does not convert org links to links in Freemind

2012-09-19 Thread Bastien
Hi Bill,

Bill Day  writes:

> Sorry, yes, I mistyped -- it is org-freemind.el.
>
> When I type:
>
> * Mind Map
> ** test [[http://orgmode.org][Org Mode]]
>
> I get this:
>
> 
> 
> 
> http://orgmode.org][Org Mode]]">
> 
> 
> 
>
> Is this the expected behavior?

Nope.  I fixed this by inserting the label of the link instead.

So you should get 



HTH,

-- 
 Bastien



Re: [O] freemind.el does not convert org links to links in Freemind

2012-09-19 Thread Bill Day
This is how Freedmind natively outputs the same link:




http://orgmode.org";
MODIFIED="1348041668536" POSITION="right" TEXT="test"/>



I am not much at reading elisp, but it seems that the following code in
org-freemind.el might be intended to achieve the above result.

(defun org-freemind-convert-links-helper (matched)
  "Helper for `org-freemind-convert-links-from-org'.
MATCHED is the link just matched."
  (let* ((link (match-string 1 matched))
 (text (match-string 2 matched))
 (ext (file-name-extension link))
 (col-pos (org-string-match-p ":" link))
 (is-img (and (image-type-from-file-name link)
  (let ((url-type (substring link 0 col-pos)))
(member url-type '("file" "http" "https")
 )
(if is-img
;; Fix-me: I can't find a way to get the border to "shrink
;; wrap" around the image using .
;;
;; (concat ""
;; ""
;; ""
;; "" text ""
;; "")
(concat ""
""
""
"" text ""
"")
  (concat "" text ""

(defun org-freemind-convert-links-from-org (org-str)
  "Convert org links in ORG-STR to freemind links and return the result."
  (let ((fm-str (replace-regexp-in-string
 ;;(rx (not (any "[\""))
 ;;(submatch
 ;; "http"
 ;; (opt ?\s)
 ;; "://"
 ;; (1+
 ;;  (any "-%.?@a-zA-Z0-9()_/:~=&#"
 "[^\"[]\\(http ?://[--:#%&()=?-Z_a-z~]+\\)"
 "[[\\1][\\1]]"
 org-str
 nil ;; fixedcase
 nil ;; literal
 1   ;; subexp
 )))
(replace-regexp-in-string
 ;;(rx "[["
 ;; (submatch (*? nonl))
 ;; "]["
 ;; (submatch (*? nonl))
 ;; "]]")
 "\\[\\[\\(.*?\\)]\\[\\(.*?\\)]]"
 ;;"\\2"
 'org-freemind-convert-links-helper
 fm-str t t)))


I am not trying to muddy the waters here, it is just that when I type a
link into org-mode, I do not seem to get a usable freemind link as a result.


On Tue, Sep 18, 2012 at 10:12 PM, Bill Day  wrote:

> Sorry, yes, I mistyped -- it is org-freemind.el.
>
> When I type:
>
> * Mind Map
> ** test [[http://orgmode.org][Org Mode]]
>
> I get this:
>
> 
> 
> 
> http://orgmode.org][Org Mode]]">
> 
> 
> 
>
> Is this the expected behavior?
>
>
>
> On Tue, Sep 18, 2012 at 3:30 AM, Bastien  wrote:
>
>> Hi Bill,
>>
>> Bill Day  writes:
>>
>> > I am using org-mode 7.9.1 and Freemind 0.9.0.  Freemind.el seems to
>> > convert nodes from org to Freemind with no problem, but it simply
>> > copies the code for links from org to Freemind without converting
>> > it.
>>
>> I'm not sure i understand -- are you talking about org-freemind.el?
>>
>>
>> http://orgmode.org/w/?p=org-mode.git;a=blob_plain;f=lisp/org-freemind.el;hb=HEAD
>>
>> > Has anyone else had this problem?
>>
>> AFAIU I don't.
>>
>> This link in .org:
>>
>>   A [[http://orgmode.org][link]].
>>
>> gets exported as
>>
>>   A http://orgmode.org";>link.
>>
>> in .mm
>>
>> HTH,
>>
>> --
>>  Bastien
>>
>
>
>
> --
> Bill Day
> williamson@gmail.com
>



-- 
Bill Day
williamson@gmail.com


Re: [O] freemind.el does not convert org links to links in Freemind

2012-09-18 Thread Bill Day
Sorry, yes, I mistyped -- it is org-freemind.el.

When I type:

* Mind Map
** test [[http://orgmode.org][Org Mode]]

I get this:




http://orgmode.org][Org Mode]]">




Is this the expected behavior?


On Tue, Sep 18, 2012 at 3:30 AM, Bastien  wrote:

> Hi Bill,
>
> Bill Day  writes:
>
> > I am using org-mode 7.9.1 and Freemind 0.9.0.  Freemind.el seems to
> > convert nodes from org to Freemind with no problem, but it simply
> > copies the code for links from org to Freemind without converting
> > it.
>
> I'm not sure i understand -- are you talking about org-freemind.el?
>
>
> http://orgmode.org/w/?p=org-mode.git;a=blob_plain;f=lisp/org-freemind.el;hb=HEAD
>
> > Has anyone else had this problem?
>
> AFAIU I don't.
>
> This link in .org:
>
>   A [[http://orgmode.org][link]].
>
> gets exported as
>
>   A http://orgmode.org";>link.
>
> in .mm
>
> HTH,
>
> --
>  Bastien
>



-- 
Bill Day
williamson@gmail.com


Re: [O] freemind.el does not convert org links to links in Freemind

2012-09-18 Thread Bastien
Hi Bill,

Bill Day  writes:

> I am using org-mode 7.9.1 and Freemind 0.9.0.  Freemind.el seems to
> convert nodes from org to Freemind with no problem, but it simply
> copies the code for links from org to Freemind without converting
> it. 

I'm not sure i understand -- are you talking about org-freemind.el?

http://orgmode.org/w/?p=org-mode.git;a=blob_plain;f=lisp/org-freemind.el;hb=HEAD

> Has anyone else had this problem?

AFAIU I don't.

This link in .org:

  A [[http://orgmode.org][link]].

gets exported as

  A http://orgmode.org";>link.

in .mm

HTH,

-- 
 Bastien



[O] freemind.el does not convert org links to links in Freemind

2012-09-11 Thread Bill Day
I am using org-mode 7.9.1 and Freemind 0.9.0.  Freemind.el seems to convert
nodes from org to Freemind with no problem, but it simply copies the code
for links from org to Freemind without converting it.

Has anyone else had this problem?

Any workarounds?

-- 
Bill Day
williamson@gmail.com