Re: [O] [bug] org 9 hangs on link search

2016-12-17 Thread Samuel Wales
On 12/17/16, Nicolas Goaziou  wrote:
> Currently Org has no satisfactory way to handle square brackets within
> links' path or description. Percent-escaping (e.g., "%5B")is not one.

hmm.  seems links are not, or at least not yet, a complete syntactic solution.

> I suggest to use a custom ID for the time being.

i do but i don't want to clutter org with properties drawers.  i
already have a lot of ids and when org needs to search them it can
take some time.

basically i use non-id links for ephemeral tasks or to point to
ephemeral tasks.  i know i won't change the headers, but i want the
links there.

>> ("n" "note" entry (file+headline ,todo "xyzzy-remember")
>>  ;; unrelated issue is if i do spc bef and after ? then
>>  ;; double space; else ret will follow link.  i make
>>  ;; capture not follow.
>>  "* %?%a\n%i")
>
> If you think there is another bug, please start another thread and
> provide as much information as you can.

nah, making capture not follow is sufficient.  i don't know the
optimal solution.



Re: [O] [bug] org 9 hangs on link search

2016-12-17 Thread Nicolas Goaziou
Hello,

Samuel Wales  writes:

> * bug
> *** 
> [[file:$dorg/executive--a.org::*%5B%5Bfile:$dorg/executive--a.org::*test%5D%5Btest%5D%5D][test]]
> link to next header
> captured
> says no match for fuzzy expression
> *** [[file:$dorg/executive--a.org::*test][test]]
> works
> *** test
> *** template

Currently Org has no satisfactory way to handle square brackets within
links' path or description. Percent-escaping (e.g., "%5B")is not one.

I suggest to use a custom ID for the time being.

> i substituted $dorg but would prefer it to
> literally put "$dorg".
>
> ("n" "note" entry (file+headline ,todo "xyzzy-remember")
>  ;; unrelated issue is if i do spc bef and after ? then
>  ;; double space; else ret will follow link.  i make
>  ;; capture not follow.
>  "* %?%a\n%i")

If you think there is another bug, please start another thread and
provide as much information as you can.

Regards,

-- 
Nicolas Goaziou



Re: [O] [bug] org 9 hangs on link search

2016-12-15 Thread Samuel Wales
On 12/15/16, Nicolas Goaziou  wrote:
> Could you fill in the dots and give the capture template you're using?

* bug
*** 
[[file:$dorg/executive--a.org::*%5B%5Bfile:$dorg/executive--a.org::*test%5D%5Btest%5D%5D][test]]
link to next header
captured
says no match for fuzzy expression
*** [[file:$dorg/executive--a.org::*test][test]]
works
*** test
*** template
i substituted $dorg but would prefer it to
literally put "$dorg".

("n" "note" entry (file+headline ,todo "xyzzy-remember")
 ;; unrelated issue is if i do spc bef and after ? then
 ;; double space; else ret will follow link.  i make
 ;; capture not follow.
 "* %?%a\n%i")



Re: [O] [bug] org 9 hangs on link search

2016-12-15 Thread Nicolas Goaziou
Hello,

Samuel Wales  writes:

> header a has a link on it.
>
>   * [...]
>
> header b is created by capture and points to header a.
>
>   * [...]
>
> this goes to the file but fails to find header a.

Could you fill in the dots and give the capture template you're using?

Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] [bug] org 9 hangs on link search

2016-12-15 Thread Samuel Wales
header a has a link on it.

  * [...]

header b is created by capture and points to header a.

  * [...]

this goes to the file but fails to find header a.


On 12/15/16, Nicolas Goaziou  wrote:
> Hello,
>
> Samuel Wales  writes:
>
>> file links don't hang now, thanks.
>>
>> however, if the header to be searched consists of only a link, it
>> fails to find the link.  perhaps it needs regexp-quote.
>>
>>   * [[file:/home/a/b.org::*add%20another%20link%20bug][add another
>> link bug]]
>
> I'm not sure to understand. Is the example above self-contained, i.e.,
> is the link supposed to match the same headline?
>
> If so, it cannot work since you are not looking for the exact title. You
> may want to use a custom-id.
>
> Regards,
>
> --
> Nicolas Goaziou
>


-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  And
ANYBODY can get it.

Denmark: free Karina Hansen NOW.
  UPDATE 2016-10: home, but not fully free



Re: [O] [bug] org 9 hangs on link search

2016-12-15 Thread Nicolas Goaziou
Hello,

Samuel Wales  writes:

> file links don't hang now, thanks.
>
> however, if the header to be searched consists of only a link, it
> fails to find the link.  perhaps it needs regexp-quote.
>
>   * [[file:/home/a/b.org::*add%20another%20link%20bug][add another
> link bug]]

I'm not sure to understand. Is the example above self-contained, i.e.,
is the link supposed to match the same headline?

If so, it cannot work since you are not looking for the exact title. You
may want to use a custom-id.

Regards,

-- 
Nicolas Goaziou



Re: [O] [bug] org 9 hangs on link search

2016-12-12 Thread Samuel Wales
file links don't hang now, thanks.

however, if the header to be searched consists of only a link, it
fails to find the link.  perhaps it needs regexp-quote.

  * [[file:/home/a/b.org::*add%20another%20link%20bug][add another
link bug]]



Re: [O] [bug] org 9 hangs on link search

2016-12-08 Thread Nicolas Goaziou
Hello,

Samuel Wales  writes:

> in emacs -Q, with my org files, (org-link-search "*test") will hang in
> org 9maint, but not in org 8.  debug on quit produces this re.
>
>   re-search-forward("^\\*+ +.*\\(?:COMMENT[   ]+\\)?\\(?:\\(?:[
>   ]\\|\\(?:[  ]*\\[[0-9]*\\(?:%\\|/[0-9]*\\)\\][
>   ]*\\)\\)+\\)?*test\\(?:\\(?:[   ]\\|\\(?:[
>   ]*\\[[0-9]*\\(?:%\\|/[0-9]*\\)\\][  ]*\\)\\)+\\)?" nil t)

I committed a simplification of `org-link-search' so it no longer
produces this kind of regexp.

Anyway, please report if you encounter the freeze whenever you get the
chance to test the fix.


Regards,

-- 
Nicolas Goaziou