emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Question regarding link text in HTML export
@ 2013-04-24  5:39 Erik Hetzner
  2013-04-24  7:17 ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Erik Hetzner @ 2013-04-24  5:39 UTC (permalink / raw)
  To: emacs-orgmode

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

Hi,

When trying to export the following org file as HTML (C-e h o), using
out of the box latest org-mode:

```
* Foo
  :PROPERTIES:
  :ID:       aaccd0f3-3eff-4f38-ad83-bc51b8444d73
  :END:
* Bar
  :PROPERTIES:
  :ID:       0a428695-b829-4f8b-a689-1bc22491d13f
  :END:
Link to [[id:aaccd0f3-3eff-4f38-ad83-bc51b8444d73][Foo]].
```

the HTML looks like:

  ...
  Link to 1.

while I would expect it to say: “Link to Foo.”.

If I change the link text to anything other than “Foo”, e.g.,
[[id:aaccd0f3-3eff-4f38-ad83-bc51b8444d73][Baz]],
the link text is as expected.

This seems like a bug to me, but I may be mistaken! Thanks for any
help you can provide.

org-version => Org-mode version 8.0.1 (release_8.0.1-22-gfea4b5 @ /home/egh/.emacs.d/el-get-24.3.1/org-mode/lisp/)
emacs-version => GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.6.4) of 2013-04-14 on marid, modified by Debian

best, Erik

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

Sent from my free software system <http://fsf.org/>.

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

* Re: Question regarding link text in HTML export
  2013-04-24  5:39 Question regarding link text in HTML export Erik Hetzner
@ 2013-04-24  7:17 ` Nicolas Goaziou
  2013-04-24  7:37   ` Sebastien Vauban
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2013-04-24  7:17 UTC (permalink / raw)
  To: Erik Hetzner; +Cc: emacs-orgmode

Hello,

Erik Hetzner <egh@e6h.org> writes:

> When trying to export the following org file as HTML (C-e h o), using
> out of the box latest org-mode:
>
> ```
> * Foo
>   :PROPERTIES:
>   :ID:       aaccd0f3-3eff-4f38-ad83-bc51b8444d73
>   :END:
> * Bar
>   :PROPERTIES:
>   :ID:       0a428695-b829-4f8b-a689-1bc22491d13f
>   :END:
> Link to [[id:aaccd0f3-3eff-4f38-ad83-bc51b8444d73][Foo]].
> ```
>
> the HTML looks like:
>
>   ...
>   Link to 1.
>
> while I would expect it to say: “Link to Foo.”.
>
> If I change the link text to anything other than “Foo”, e.g.,
> [[id:aaccd0f3-3eff-4f38-ad83-bc51b8444d73][Baz]],
> the link text is as expected.
>
> This seems like a bug to me, but I may be mistaken! Thanks for any
> help you can provide.

This is not a bug. This is how cross references work: any link to an
internal target without a description will become a number referring to
the target. It works for headlines and many other things,

Note that the HTML is smart enough to not do that when headlines are not
numbered.


Regards,

-- 
Nicolas Goaziou

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

* Re: Question regarding link text in HTML export
  2013-04-24  7:17 ` Nicolas Goaziou
@ 2013-04-24  7:37   ` Sebastien Vauban
  2013-04-24  7:55     ` Nicolas Goaziou
  2013-04-24 14:24     ` Erik Hetzner
  0 siblings, 2 replies; 5+ messages in thread
From: Sebastien Vauban @ 2013-04-24  7:37 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello Nicolas,

Nicolas Goaziou wrote:
> Erik Hetzner <egh-r1v5srsr4wc@public.gmane.org> writes:
>
>> When trying to export the following org file as HTML (C-e h o), using
>> out of the box latest org-mode:
>>
>> ```
>> * Foo
>>   :PROPERTIES:
>>   :ID:       aaccd0f3-3eff-4f38-ad83-bc51b8444d73
>>   :END:
>> * Bar
>>   :PROPERTIES:
>>   :ID:       0a428695-b829-4f8b-a689-1bc22491d13f
>>   :END:
>> Link to [[id:aaccd0f3-3eff-4f38-ad83-bc51b8444d73][Foo]].
                                                     ^^^^^

>> ```
>>
>> the HTML looks like:
>>
>>   ...
>>   Link to 1.
>>
>> while I would expect it to say: “Link to Foo.”.
>>
>> If I change the link text to anything other than “Foo”, e.g.,
>> [[id:aaccd0f3-3eff-4f38-ad83-bc51b8444d73][Baz]],
>> the link text is as expected.
>>
>> This seems like a bug to me, but I may be mistaken! Thanks for any
>> help you can provide.
>
> This is not a bug. This is how cross references work: any link to an
> internal target without a description will become a number referring to
> the target. It works for headlines and many other things,

He does well have a description part, doesn't he?

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: Question regarding link text in HTML export
  2013-04-24  7:37   ` Sebastien Vauban
@ 2013-04-24  7:55     ` Nicolas Goaziou
  2013-04-24 14:24     ` Erik Hetzner
  1 sibling, 0 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2013-04-24  7:55 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ



Hello,

"Sebastien Vauban"
<wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:

> He does well have a description part, doesn't he?

Duh. Yes. Then it is a bug, which should now be fixed.

Thanks for insisting on the problem.


Regards,

-- 
Nicolas Goaziou

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

* Re: Question regarding link text in HTML export
  2013-04-24  7:37   ` Sebastien Vauban
  2013-04-24  7:55     ` Nicolas Goaziou
@ 2013-04-24 14:24     ` Erik Hetzner
  1 sibling, 0 replies; 5+ messages in thread
From: Erik Hetzner @ 2013-04-24 14:24 UTC (permalink / raw)
  To: emacs-orgmode

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

At Wed, 24 Apr 2013 09:37:57 +0200,
Sebastien Vauban wrote:
> 
> Hello Nicolas,
> 
> Nicolas Goaziou wrote:
> >
> > This is not a bug. This is how cross references work: any link to an
> > internal target without a description will become a number referring to
> > the target. It works for headlines and many other things,
> 
> He does well have a description part, doesn't he?

Thanks, Sebastien and Nicholas.

I should have checked the source first, of course. There is a very
helpful comment:

  ;; Case 1: Headline is numbered and LINK has no
  ;; description or LINK's description matches
  ;; headline's title.  Display section number.

Clearly the behavior is intended (“LINK’s description matches
headline’s title”. However, it does not seem expected behavior to me.
It differs from latex output, for instance.

best, Erik

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

Sent from my free software system <http://fsf.org/>.

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

end of thread, other threads:[~2013-04-24 14:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-24  5:39 Question regarding link text in HTML export Erik Hetzner
2013-04-24  7:17 ` Nicolas Goaziou
2013-04-24  7:37   ` Sebastien Vauban
2013-04-24  7:55     ` Nicolas Goaziou
2013-04-24 14:24     ` Erik Hetzner

Code repositories for project(s) associated with this 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).