Re: [O] Patch for testing `org-open-at-point'

2014-06-03 Thread Bastien
Hi Achim,

Achim Gratz  writes:

> Bastien writes:
>> Achim Gratz  writes:
>>> Shouldn't the test check that the desired target is actually
>>> reached?
>>
>> That would be too complicated.  Checking that `org-open-at-point'
>> does not throw an error is enough IMO.
>
> I don't think so.  Implemented a check for that in 8e72c8fcfa.

Okay, thanks.  I pushed a small update, separating tests where we test
that `org-open-at-point' correctly opens the link at point, and tests
where we only tests that it correctly runs in a specific context.

-- 
 Bastien



Re: [O] Patch for testing `org-open-at-point'

2014-06-02 Thread Achim Gratz
Bastien writes:
> Achim Gratz  writes:
>> Shouldn't the test check that the desired target is actually
>> reached?
>
> That would be too complicated.  Checking that `org-open-at-point'
> does not throw an error is enough IMO.

I don't think so.  Implemented a check for that in 8e72c8fcfa.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




Re: [O] Patch for testing `org-open-at-point'

2014-06-01 Thread Bastien
Achim Gratz  writes:

> York Zhao writes:
>> Thank you very much for implementing this. Really appreciated. So do you 
>> think
>> it is a good idea to add my test (the patch) now for testing this?
>
> Shouldn't the test check that the desired target is actually
> reached?

That would be too complicated.  Checking that `org-open-at-point'
does not throw an error is enough IMO.

-- 
 Bastien



Re: [O] Patch for testing `org-open-at-point'

2014-06-01 Thread Achim Gratz
York Zhao writes:
> Thank you very much for implementing this. Really appreciated. So do you think
> it is a good idea to add my test (the patch) now for testing this?

Shouldn't the test check that the desired target is actually reached?


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

DIY Stuff:
http://Synth.Stromeko.net/DIY.html




Re: [O] Patch for testing `org-open-at-point'

2014-06-01 Thread Bastien
Hi York,

York Zhao  writes:

> Thank you very much for implementing this. Really appreciated. So do you think
> it is a good idea to add my test (the patch) now for testing this?

Yes.

> For your convenience, I've attached again in this message the same patch I had
> sent on April 10.

Installed, thanks,

-- 
 Bastien



Re: [O] Patch for testing `org-open-at-point'

2014-05-31 Thread York Zhao
Hi Bastien,

Thank you very much for implementing this. Really appreciated. So do you think
it is a good idea to add my test (the patch) now for testing this?

For your convenience, I've attached again in this message the same patch I had
sent on April 10.

Thanks,

York


On Sun, Apr 20, 2014 at 3:56 PM, York Zhao  wrote:
> Hi Bastien,
>
> I apologize that I missed your reply, I discovered it until now when I was
> checking the replies in the "Sent" folder.
>
>> The question is this: are we fine handling raw links in properties,
>> or do we also need Org links (e.g. bracket links) there?
>
> To me, raw link is hardly useful because too often the web link is really 
> long,
> in which case the bracket link acts like a way of abstraction.
>
> Thank you very much for considering this fix.
>
> On Thu, Apr 17, 2014 at 2:48 PM, Bastien  wrote:
>> Hi York,
>>
>> York Zhao  writes:
>>
>>> * Peter
>>> :PROPERTIES:
>>> :ADDRESS: xxx xxx  
>>> :HOME_PHONE: xxx xxx xxx
>>> :WORK_PHONE: xxx xxx xxx
>>> :URL: www.foo.bar
>>> :END:
>>
>> The question is this: are we fine handling raw links in properties,
>> or do we also need Org links (e.g. bracket links) there?
>>
>> Speaking for me, raw links is enough, and this is what I plan to
>> implement.  But maybe other users have existing use-cases for Org
>> links there, I don't know.
>>
>> --
>>  Bastien
From df0788134a16baa9762616637c0fe7f568e3e63e Mon Sep 17 00:00:00 2001
From: York Zhao 
Date: Thu, 10 Apr 2014 21:21:15 -0400
Subject: [PATCH] test-org-element: Add test for `org-open-at-point' with link
 being heading property.

---
 testing/lisp/test-org-element.el | 9 +
 1 file changed, 9 insertions(+)

diff --git a/testing/lisp/test-org-element.el b/testing/lisp/test-org-element.el
index 576e3d3..8cfceac 100644
--- a/testing/lisp/test-org-element.el
+++ b/testing/lisp/test-org-element.el
@@ -1461,6 +1461,15 @@ e^{i\\pi}+1=0
 	(search-forward "file:")
 	(org-element-property :type (org-element-context))
 
+(ert-deftest test-org-element/org-open-at-point ()
+  "Test `org-open-at-point' with link being a heading property."
+  (org-test-with-temp-text
+  "* Headline
+:PROPERTIES:
+:URL: [[info:org#Top]]
+:END:"
+(org-open-at-point)))
+
 
  Macro
 
-- 
1.8.4



Re: [O] Patch for testing `org-open-at-point'

2014-04-20 Thread York Zhao
Hi Bastien,

I apologize that I missed your reply, I discovered it until now when I was
checking the replies in the "Sent" folder.

> The question is this: are we fine handling raw links in properties,
> or do we also need Org links (e.g. bracket links) there?

To me, raw link is hardly useful because too often the web link is really long,
in which case the bracket link acts like a way of abstraction.

Thank you very much for considering this fix.

On Thu, Apr 17, 2014 at 2:48 PM, Bastien  wrote:
> Hi York,
>
> York Zhao  writes:
>
>> * Peter
>> :PROPERTIES:
>> :ADDRESS: xxx xxx  
>> :HOME_PHONE: xxx xxx xxx
>> :WORK_PHONE: xxx xxx xxx
>> :URL: www.foo.bar
>> :END:
>
> The question is this: are we fine handling raw links in properties,
> or do we also need Org links (e.g. bracket links) there?
>
> Speaking for me, raw links is enough, and this is what I plan to
> implement.  But maybe other users have existing use-cases for Org
> links there, I don't know.
>
> --
>  Bastien



Re: [O] Patch for testing `org-open-at-point'

2014-04-20 Thread Michael Strey
Hi Bastien,

On 2014-04-17, Bastien wrote:
> The question is this: are we fine handling raw links in properties,
> or do we also need Org links (e.g. bracket links) there?
>
> Speaking for me, raw links is enough, and this is what I plan to
> implement.  But maybe other users have existing use-cases for Org
> links there, I don't know.

I have.  I'm using phone links (see
http://thread.gmane.org/gmane.emacs.orgmode/69406/focus=70484) in
conjunction with org-contacts in the properties of my contacts.

-- 
Michael Strey 
www.strey.biz




Re: [O] Patch for testing `org-open-at-point'

2014-04-17 Thread Bastien
Hi York,

York Zhao  writes:

> * Peter
> :PROPERTIES:
> :ADDRESS: xxx xxx  
> :HOME_PHONE: xxx xxx xxx
> :WORK_PHONE: xxx xxx xxx
> :URL: www.foo.bar
> :END:

The question is this: are we fine handling raw links in properties,
or do we also need Org links (e.g. bracket links) there?

Speaking for me, raw links is enough, and this is what I plan to
implement.  But maybe other users have existing use-cases for Org
links there, I don't know.

-- 
 Bastien



Re: [O] Patch for testing `org-open-at-point'

2014-04-12 Thread York Zhao
Hi Bastien,

Sorry that I didn't know this was a known issue and I appreciate that you are
willing to fix it.

While I agree with Nicolas that it is more appropriate to keep org schedule line
from being a headline property, I also think it is totally legitimate to have an
org link as headline property. Sure we can always move org links out of headline
properties, but I'm sure there are times we don't want to see some of the links
all the time, we really want to hide them inside the property tree. For example,
when we put a person's information as properties, like the following:

* Peter
:PROPERTIES:
:ADDRESS: xxx xxx  
:HOME_PHONE: xxx xxx xxx
:WORK_PHONE: xxx xxx xxx
:URL: www.foo.bar
:END:

We hope we don't have to always move the link (the URL line in the properties
tree) out, i.e., we don't want to see the link all the time.

> Let's add tests when they don't fail :)

Fair enough, just make sure it will not be forgotten.

Thanks

On Fri, Apr 11, 2014 at 6:25 AM, Bastien  wrote:
> Hi York,
>
> York Zhao  writes:
>
>> I found a bug that `org-open-at-point' doesn't work if the link is a
>> heading property.
>
> This is a known issue and we will address it soon.
>
>> This used to work and was broken recently. I have written a test for
>> this. The test is suppose to fail in current org-mode version. Please find
>> attached my patch for the test. Hopefully I I didn't place the test in the 
>> wrong
>> file.
>
> Let's add tests when they don't fail :)
>
> --
>  Bastien



Re: [O] Patch for testing `org-open-at-point'

2014-04-11 Thread Bastien
Hi York,

York Zhao  writes:

> I found a bug that `org-open-at-point' doesn't work if the link is a
> heading property.

This is a known issue and we will address it soon.

> This used to work and was broken recently. I have written a test for
> this. The test is suppose to fail in current org-mode version. Please find
> attached my patch for the test. Hopefully I I didn't place the test in the 
> wrong
> file.

Let's add tests when they don't fail :)

-- 
 Bastien



Re: [O] Patch for testing `org-open-at-point'

2014-04-11 Thread Nicolas Goaziou
Hello,

York Zhao  writes:

> I found a bug that `org-open-at-point' doesn't work if the link is a heading
> property.

This is expected, as node properties cannot contain Org syntax.  See
also

  http://permalink.gmane.org/gmane.emacs.orgmode/84300


Regards,

-- 
Nicolas Goaziou



[O] Patch for testing `org-open-at-point'

2014-04-10 Thread York Zhao
Hi,

I found a bug that `org-open-at-point' doesn't work if the link is a heading
property. This used to work and was broken recently. I have written a test for
this. The test is suppose to fail in current org-mode version. Please find
attached my patch for the test. Hopefully I I didn't place the test in the wrong
file.

York
From df0788134a16baa9762616637c0fe7f568e3e63e Mon Sep 17 00:00:00 2001
From: York Zhao 
Date: Thu, 10 Apr 2014 21:21:15 -0400
Subject: [PATCH] test-org-element: Add test for `org-open-at-point' with link
 being heading property.

---
 testing/lisp/test-org-element.el | 9 +
 1 file changed, 9 insertions(+)

diff --git a/testing/lisp/test-org-element.el b/testing/lisp/test-org-element.el
index 576e3d3..8cfceac 100644
--- a/testing/lisp/test-org-element.el
+++ b/testing/lisp/test-org-element.el
@@ -1461,6 +1461,15 @@ e^{i\\pi}+1=0
 	(search-forward "file:")
 	(org-element-property :type (org-element-context))
 
+(ert-deftest test-org-element/org-open-at-point ()
+  "Test `org-open-at-point' with link being a heading property."
+  (org-test-with-temp-text
+  "* Headline
+:PROPERTIES:
+:URL: [[info:org#Top]]
+:END:"
+(org-open-at-point)))
+
 
  Macro
 
-- 
1.8.4