emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* bug with link following
@ 2010-08-29 15:36 Robert Goldman
  2010-08-29 23:27 ` bug with link following --- a (partial) solution Robert P. Goldman
  0 siblings, 1 reply; 9+ messages in thread
From: Robert Goldman @ 2010-08-29 15:36 UTC (permalink / raw)
  To: Org Mode

[-- Attachment #1: Type: text/plain, Size: 350 bytes --]

I used org-store-link and org-insert-link to make a link in the attached
document (I distilled it down from a real document).  In my org-mode
(pulled from git this morning), using Aquamacs 2.0 on Mac OSX Snow
Leopard (10.6), org-mode cannot follow the link I inserted with o-i-l,
and it pops up a dialog asking if I should add such a link target.

R

[-- Attachment #2: link-bug.org --]
[-- Type: text/plain, Size: 689 bytes --]

#+STARTUP: showall

* Notes:

* TODO Figure out org mode

Just do outlines with TODO's in them.  Change them to DONE when they are done.
You don't need to figure out how to use org-mode if you don't like.  We used it
on OBTW, and it worked fine.

If you like (I will probably do this), you can use the org-mode commands to add
deadlines and scheduling (or you can ignore them).  I will probably do this in
an incremental way so that I can further focus my mind on individual subsections
as they need to get written.  See example in [[*submit%20through%20submission%20site][submit through submission site:]]

* TODO submit through submission site:

  
# Local Variables:
# mode: org
# End:

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: bug with link following --- a (partial) solution
  2010-08-29 15:36 bug with link following Robert Goldman
@ 2010-08-29 23:27 ` Robert P. Goldman
  2010-09-12 12:16   ` David Maus
  0 siblings, 1 reply; 9+ messages in thread
From: Robert P. Goldman @ 2010-08-29 23:27 UTC (permalink / raw)
  To: Carsten Dominik, Org Mode

On 8/29/10 Aug 29 -10:36 AM, Robert Goldman wrote:
> I used org-store-link and org-insert-link to make a link in the attached
> document (I distilled it down from a real document).  In my org-mode
> (pulled from git this morning), using Aquamacs 2.0 on Mac OSX Snow
> Leopard (10.6), org-mode cannot follow the link I inserted with o-i-l,
> and it pops up a dialog asking if I should add such a link target.

A quick followup:

I had a shot with git blame, and it seems like the only thing that might
have interfered with this search recently is the commit with the SHA1
has starting a84c8a2c

And, indeed, when I comment out the block that was introduced in this
commit (starting at line 9389):

     ;; ((and (org-mode-p) org-link-search-must-match-exact-headline)
     ;;  (and (equal (string-to-char s) ?*) (setq s (substring s 1)))
     ;;  (goto-char (point-min))
     ;;  (cond
     ;;   ((let (case-fold-search)
     ;; 	  (re-search-forward (format org-complex-heading-regexp-format
     ;; 				     (regexp-quote s))
     ;; 			     nil t))
     ;; 	;; OK, found a match
     ;; 	(goto-char (match-beginning 0)))
     ;;   ((and (not org-link-search-inhibit-query)
     ;; 	     (eq org-link-search-must-match-exact-headline
'query-to-create)
     ;; 	     (y-or-n-p "No match - create this as a new heading? "))
     ;; 	(goto-char (point-max))
     ;; 	(or (bolp) (newline))
     ;; 	(insert "* " s "\n")
     ;; 	(beginning-of-line 0))
     ;;   (t
     ;; 	(goto-char pos)
     ;; 	(error "No match"))))

...then my link-following works again.

Carsten, could this patch be reverted until it can be fixed?

Best,
r

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: bug with link following --- a (partial) solution
  2010-08-29 23:27 ` bug with link following --- a (partial) solution Robert P. Goldman
@ 2010-09-12 12:16   ` David Maus
  2010-09-13  2:36     ` Robert Goldman
  0 siblings, 1 reply; 9+ messages in thread
From: David Maus @ 2010-09-12 12:16 UTC (permalink / raw)
  To: Robert P. Goldman; +Cc: Org Mode, Carsten Dominik


[-- Attachment #1.1: Type: text/plain, Size: 1068 bytes --]

Robert P. Goldman wrote:
>On 8/29/10 Aug 29 -10:36 AM, Robert Goldman wrote:
>> I used org-store-link and org-insert-link to make a link in the attached
>> document (I distilled it down from a real document).  In my org-mode
>> (pulled from git this morning), using Aquamacs 2.0 on Mac OSX Snow
>> Leopard (10.6), org-mode cannot follow the link I inserted with o-i-l,
>> and it pops up a dialog asking if I should add such a link target.

>A quick followup:

>I had a shot with git blame, and it seems like the only thing that might
>have interfered with this search recently is the commit with the SHA1
>has starting a84c8a2c

>And, indeed, when I comment out the block that was introduced in this
>commit (starting at line 9389):

> ...

>Carsten, could this patch be reverted until it can be fixed?

It's not a bug, it's a feature: To revert to the old behaviour you
can customize the variable `org-link-search-must-match-exact-headline'
and set it to nil.

Best,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: bug with link following --- a (partial) solution
  2010-09-12 12:16   ` David Maus
@ 2010-09-13  2:36     ` Robert Goldman
  2010-09-15  9:18       ` David Maus
  0 siblings, 1 reply; 9+ messages in thread
From: Robert Goldman @ 2010-09-13  2:36 UTC (permalink / raw)
  To: David Maus; +Cc: Org Mode, Carsten Dominik

[-- Attachment #1: Type: text/plain, Size: 1698 bytes --]

On 9/12/10 Sep 12 -7:16 AM, David Maus wrote:
> Robert P. Goldman wrote:
>> On 8/29/10 Aug 29 -10:36 AM, Robert Goldman wrote:
>>> I used org-store-link and org-insert-link to make a link in the attached
>>> document (I distilled it down from a real document).  In my org-mode
>>> (pulled from git this morning), using Aquamacs 2.0 on Mac OSX Snow
>>> Leopard (10.6), org-mode cannot follow the link I inserted with o-i-l,
>>> and it pops up a dialog asking if I should add such a link target.
> 
>> A quick followup:
> 
>> I had a shot with git blame, and it seems like the only thing that might
>> have interfered with this search recently is the commit with the SHA1
>> has starting a84c8a2c
> 
>> And, indeed, when I comment out the block that was introduced in this
>> commit (starting at line 9389):
> 
>> ...
> 
>> Carsten, could this patch be reverted until it can be fixed?
> 
> It's not a bug, it's a feature: To revert to the old behaviour you
> can customize the variable `org-link-search-must-match-exact-headline'
> and set it to nil.

I believe I have narrowed down the problem to a more specific case.

I have reexamined the bug I had, and as far as I can tell, it occurs
because of the punctuation at the end of the header line.  I am
attaching a file that shows the funny behavior.  I can link to a header
titled "Foobar" correctly, but not one titled "submit through submission
site:"  Attempts to link to the one word header "Bletch:" also fail.

I conjecture that the problem is the final ":" as punctuation.  Does
that seem plausible?  If so, should we simply extend the escaping in the
links to handle this case (akin to the way spaces are escaping)?  Or am
I off base here?

[-- Attachment #2: link-bug.org --]
[-- Type: text/plain, Size: 848 bytes --]

#+STARTUP: showall

* Notes:

* TODO Figure out org mode

Just do outlines with TODO's in them.  Change them to DONE when they are done.
You don't need to figure out how to use org-mode if you don't like.  We used it
on OBTW, and it worked fine.

If you like (I will probably do this), you can use the org-mode commands to add
deadlines and scheduling (or you can ignore them).  I will probably do this in
an incremental way so that I can further focus my mind on individual subsections
as they need to get written.  See example in [[*submit%20through%20submission%20site][submit through submission site:]]

* TODO submit through submission site:

* TODO Foobar

* Reference to foobar

[[*Foobar][Foobar]]

* Reference to submit...

[[*submit%20through%20submission%20site][submit through submission site]]
  
# Local Variables:
# mode: org
# End:

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: bug with link following --- a (partial) solution
  2010-09-13  2:36     ` Robert Goldman
@ 2010-09-15  9:18       ` David Maus
  2010-09-22 18:11         ` David Maus
  0 siblings, 1 reply; 9+ messages in thread
From: David Maus @ 2010-09-15  9:18 UTC (permalink / raw)
  To: rpgoldman; +Cc: David Maus, Org Mode, Carsten Dominik


[-- Attachment #1.1: Type: text/plain, Size: 783 bytes --]

Robert Goldman wrote:

>I believe I have narrowed down the problem to a more specific case.

>I have reexamined the bug I had, and as far as I can tell, it occurs
>because of the punctuation at the end of the header line.  I am
>attaching a file that shows the funny behavior.  I can link to a header
>titled "Foobar" correctly, but not one titled "submit through submission
>site:"  Attempts to link to the one word header "Bletch:" also fail.

Ah, now I see the problem: For some reason `org-store-link' removes
the colon at the end of the headline.  I reopended the issue as a bug;
setting the aforementioned variable to nil might be considered a
temporary work-around.

Thanks,
  -- David

--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: bug with link following --- a (partial) solution
  2010-09-15  9:18       ` David Maus
@ 2010-09-22 18:11         ` David Maus
  2010-09-22 18:36           ` Robert Goldman
  0 siblings, 1 reply; 9+ messages in thread
From: David Maus @ 2010-09-22 18:11 UTC (permalink / raw)
  To: David Maus; +Cc: Carsten Dominik, Org Mode, rpgoldman


[-- Attachment #1.1: Type: text/plain, Size: 544 bytes --]

David Maus wrote:
>Ah, now I see the problem: For some reason `org-store-link' removes
>the colon at the end of the headline.  I reopended the issue as a bug;
>setting the aforementioned variable to nil might be considered a
>temporary work-around.

Okay, pushed a patch to master that should fix this problem.
`org-store-link' now keeps the headline string intact when storing a
link.

Could you test if this fixes the problem for you?

Best,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: bug with link following --- a (partial) solution
  2010-09-22 18:11         ` David Maus
@ 2010-09-22 18:36           ` Robert Goldman
  2010-09-22 18:38             ` Robert Goldman
  2010-09-22 18:44             ` David Maus
  0 siblings, 2 replies; 9+ messages in thread
From: Robert Goldman @ 2010-09-22 18:36 UTC (permalink / raw)
  To: David Maus; +Cc: Org Mode, Carsten Dominik

[-- Attachment #1: Type: text/plain, Size: 712 bytes --]

On 9/22/10 Sep 22 -1:11 PM, David Maus wrote:
> David Maus wrote:
>> Ah, now I see the problem: For some reason `org-store-link' removes
>> the colon at the end of the headline.  I reopended the issue as a bug;
>> setting the aforementioned variable to nil might be considered a
>> temporary work-around.
> 
> Okay, pushed a patch to master that should fix this problem.
> `org-store-link' now keeps the headline string intact when storing a
> link.
> 
> Could you test if this fixes the problem for you?

I'm afraid it doesn't seem to.  I am attaching a copy of my link-bug.org
file.  When I click on the links to "submit through submission site:" or
"Bletch:" headlines, I get the no such link error.

Best,
r

[-- Attachment #2: link-bug.org --]
[-- Type: text/plain, Size: 927 bytes --]

#+STARTUP: showall

* Notes:

* TODO Figure out org mode

Just do outlines with TODO's in them.  Change them to DONE when they are done.
You don't need to figure out how to use org-mode if you don't like.  We used it
on OBTW, and it worked fine.

If you like (I will probably do this), you can use the org-mode commands to add
deadlines and scheduling (or you can ignore them).  I will probably do this in
an incremental way so that I can further focus my mind on individual subsections
as they need to get written.  See example in [[*submit%20through%20submission%20site][submit through submission site:]]

* TODO submit through submission site:

* TODO Foobar

* Reference to foobar

[[*Foobar][Foobar]]

* Reference to submit...

[[*submit%20through%20submission%20site][submit through submission site]]
  
* Bletch:


* reference

[[*Bletch][Bletch:]]

* COMMENT Local variables block
# Local Variables:
# mode: org
# End:

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: bug with link following --- a (partial) solution
  2010-09-22 18:36           ` Robert Goldman
@ 2010-09-22 18:38             ` Robert Goldman
  2010-09-22 18:44             ` David Maus
  1 sibling, 0 replies; 9+ messages in thread
From: Robert Goldman @ 2010-09-22 18:38 UTC (permalink / raw)
  To: David Maus; +Cc: Org Mode, Carsten Dominik

On 9/22/10 Sep 22 -1:36 PM, Robert Goldman wrote:
> On 9/22/10 Sep 22 -1:11 PM, David Maus wrote:
>> David Maus wrote:
>>> Ah, now I see the problem: For some reason `org-store-link' removes
>>> the colon at the end of the headline.  I reopended the issue as a bug;
>>> setting the aforementioned variable to nil might be considered a
>>> temporary work-around.
>>
>> Okay, pushed a patch to master that should fix this problem.
>> `org-store-link' now keeps the headline string intact when storing a
>> link.
>>
>> Could you test if this fixes the problem for you?
> 
> I'm afraid it doesn't seem to.  I am attaching a copy of my link-bug.org
> file.  When I click on the links to "submit through submission site:" or
> "Bletch:" headlines, I get the no such link error.

D'oh.  I'm sorry.  I didn't read carefully enough.  This DOES fix my
problem.

The problem is in STORING the link, not in matching.  I was
misdiagnosing the problem.

So when I stored a NEW link, the problem goes away.  Sorry.  I was not
clearly realizing that old links would still be busted.

Patch is good!

r

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: bug with link following --- a (partial) solution
  2010-09-22 18:36           ` Robert Goldman
  2010-09-22 18:38             ` Robert Goldman
@ 2010-09-22 18:44             ` David Maus
  1 sibling, 0 replies; 9+ messages in thread
From: David Maus @ 2010-09-22 18:44 UTC (permalink / raw)
  To: rpgoldman; +Cc: David Maus, Org Mode, Carsten Dominik


[-- Attachment #1.1: Type: text/plain, Size: 1256 bytes --]

Robert Goldman wrote:
>On 9/22/10 Sep 22 -1:11 PM, David Maus wrote:
>> David Maus wrote:
>>> Ah, now I see the problem: For some reason `org-store-link' removes
>>> the colon at the end of the headline.  I reopended the issue as a bug;
>>> setting the aforementioned variable to nil might be considered a
>>> temporary work-around.
>>
>> Okay, pushed a patch to master that should fix this problem.
>> `org-store-link' now keeps the headline string intact when storing a
>> link.
>>
>> Could you test if this fixes the problem for you?

>I'm afraid it doesn't seem to.  I am attaching a copy of my link-bug.org
>file.  When I click on the links to "submit through submission site:" or
>"Bletch:" headlines, I get the no such link error.

This is expected.  I've fixed the function that stores links.  As you
can see in the link to the "Bletch:" headline the colon is missing in
the link (first pair of brackets).  That's why Org does not find the
headline when you try to open the link.

If you now store a link to "Bletch:" the colon is included in the link, e.g.

[[*Bletch][Bletch:]] (does not find headline)

vs.

[[*Bletch:][Bletch:]] (works)

Best,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-09-22 18:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-29 15:36 bug with link following Robert Goldman
2010-08-29 23:27 ` bug with link following --- a (partial) solution Robert P. Goldman
2010-09-12 12:16   ` David Maus
2010-09-13  2:36     ` Robert Goldman
2010-09-15  9:18       ` David Maus
2010-09-22 18:11         ` David Maus
2010-09-22 18:36           ` Robert Goldman
2010-09-22 18:38             ` Robert Goldman
2010-09-22 18:44             ` David Maus

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).