* Problem with links whose description looks like a link
@ 2014-11-19 8:30 Daniel Bausch
2014-11-19 14:52 ` Nicolas Goaziou
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Bausch @ 2014-11-19 8:30 UTC (permalink / raw
To: emacs-orgmode
Hi!
I'm using Org from Git master. If I have a link like, e.g.
[[file:somefile.c::int whatsoever][file:somefile.c::int whatsoever]]
and a a file somefile.c with the lines
int some;
int whatsoever;
then opening the link with the cursor before the space jumps to the
first line, while opening the link on the word "whatsoever" jumps to the
second line. It seems like Org detects a link within the link as if the
brackets were missing.
This also happens if the link looks (non-sensically) like the following
[[file:somefile.c::int whatsoever][file:someotherfile.txt]]
. Then it would try to open someotherfile.txt instead of somefile.c.
In contrast, using
[[file:somefile.c::int whatsoever]]
works works as expected, i.e. it jumps to the second line.
Regards,
Daniel
--
MSc. Daniel Bausch
Research Assistant (Computer Science)
Technische Universität Darmstadt
http://www.dvs.tu-darmstadt.de/staff/dbausch
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Problem with links whose description looks like a link
2014-11-19 8:30 Problem with links whose description looks like a link Daniel Bausch
@ 2014-11-19 14:52 ` Nicolas Goaziou
2014-11-20 7:50 ` Daniel Bausch
0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2014-11-19 14:52 UTC (permalink / raw
To: Daniel Bausch; +Cc: emacs-orgmode
Hello,
Daniel Bausch <bausch@dvs.tu-darmstadt.de> writes:
> I'm using Org from Git master. If I have a link like, e.g.
>
> [[file:somefile.c::int whatsoever][file:somefile.c::int whatsoever]]
>
> and a a file somefile.c with the lines
>
> int some;
> int whatsoever;
>
> then opening the link with the cursor before the space jumps to the
> first line, while opening the link on the word "whatsoever" jumps to the
> second line. It seems like Org detects a link within the link as if the
> brackets were missing.
This is correct.
Org allows plain links (e.g. file:foo.org) within bracket links. This is
the sole way to have, for example, an inline image as a link.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Problem with links whose description looks like a link
2014-11-19 14:52 ` Nicolas Goaziou
@ 2014-11-20 7:50 ` Daniel Bausch
2014-11-20 22:39 ` Nicolas Goaziou
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Bausch @ 2014-11-20 7:50 UTC (permalink / raw
To: emacs-orgmode
Hello and thanks for the answer!
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Daniel Bausch <bausch@dvs.tu-darmstadt.de> writes:
>
>> I'm using Org from Git master. If I have a link like, e.g.
>>
>> [[file:somefile.c::int whatsoever][file:somefile.c::int whatsoever]]
>>
>> and a a file somefile.c with the lines
>>
>> int some;
>> int whatsoever;
>>
>> then opening the link with the cursor before the space jumps to the
>> first line, while opening the link on the word "whatsoever" jumps to the
>> second line. It seems like Org detects a link within the link as if the
>> brackets were missing.
>
> This is correct.
>
> Org allows plain links (e.g. file:foo.org) within bracket links. This is
> the sole way to have, for example, an inline image as a link.
Hmm, ok, I understand the intention regarding the detection and display
of inline images as part of a link description; however, even for inline
images following the link jumps to the target of the outer link and not
the image itself -- as long as inline images are toggled on. Without
showing inline images following the link opens the image regardless of
the original link target.
I think that the effective target of a link should never be affected by
its description. Even fontification and mouse hovering info thinks that
the link still targets at its target, i.e. when hovering over the link
the whole link gets highlighted and not just the inner one and the
tooltip shows the whole target of the outer link, while clicking jumps
to the link contained within the description.
If there is a real application/need for nested links (besides inline
images used as part of link description) I would rather expect them to
be written explicitly by typing another pair of brackets nested within
the description; however, this syntax is currently not parsed as such.
Regards,
Daniel
--
MSc. Daniel Bausch
Research Assistant (Computer Science)
Technische Universität Darmstadt
http://www.dvs.tu-darmstadt.de/staff/dbausch
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Problem with links whose description looks like a link
2014-11-20 7:50 ` Daniel Bausch
@ 2014-11-20 22:39 ` Nicolas Goaziou
2014-11-21 7:11 ` Daniel Bausch
0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2014-11-20 22:39 UTC (permalink / raw
To: Daniel Bausch; +Cc: emacs-orgmode
Daniel Bausch <bausch@dvs.tu-darmstadt.de> writes:
> Hmm, ok, I understand the intention regarding the detection and display
> of inline images as part of a link description; however, even for inline
> images following the link jumps to the target of the outer link and not
> the image itself -- as long as inline images are toggled on. Without
> showing inline images following the link opens the image regardless of
> the original link target.
You're right. The current behaviour doesn't make sense. This is fixed in
master. Thanks for suggesting it.
Regards,
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Problem with links whose description looks like a link
2014-11-20 22:39 ` Nicolas Goaziou
@ 2014-11-21 7:11 ` Daniel Bausch
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Bausch @ 2014-11-21 7:11 UTC (permalink / raw
To: emacs-orgmode
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Daniel Bausch <bausch@dvs.tu-darmstadt.de> writes:
>
>> Hmm, ok, I understand the intention regarding the detection and display
>> of inline images as part of a link description; however, even for inline
>> images following the link jumps to the target of the outer link and not
>> the image itself -- as long as inline images are toggled on. Without
>> showing inline images following the link opens the image regardless of
>> the original link target.
>
> You're right. The current behaviour doesn't make sense. This is fixed in
> master. Thanks for suggesting it.
I confirm that my code bookmarks now work as intended.
Thank you very much!
Regards,
Daniel
--
MSc. Daniel Bausch
Research Assistant (Computer Science)
Technische Universität Darmstadt
http://www.dvs.tu-darmstadt.de/staff/dbausch
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-11-21 7:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-19 8:30 Problem with links whose description looks like a link Daniel Bausch
2014-11-19 14:52 ` Nicolas Goaziou
2014-11-20 7:50 ` Daniel Bausch
2014-11-20 22:39 ` Nicolas Goaziou
2014-11-21 7:11 ` Daniel Bausch
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.