emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Radio target appears as a link in html export (in Emacs stable)
@ 2016-01-25  8:00 H. Dieter Wilhelm
  2016-01-25 22:18 ` Nicolas Goaziou
  0 siblings, 1 reply; 8+ messages in thread
From: H. Dieter Wilhelm @ 2016-01-25  8:00 UTC (permalink / raw)
  To: emacs-orgmode

Hello (),

when exporting radio targets to PDF they appear as normal text.
Sometimes I wish I could make them invisible but this is a behaviour I
can live with.

Anyway, when exporting to html the radio targets appear like a regular
link (technically I think they are a named anchor, something like <a
id="bla" name="bla">bla</a>).  The apperance is not helpful, only
confusing.  I guess I could change this behaviour with some css trickery
but it might become complicated, at least for my little html knowledge.

Is it possible in org to change the appearance of radio targets in html
exports without loosing their behaviour?

Thanks a lot, Org-mode version 8.2.10 (release_8.2.10 @
/usr/local/src/emacs-24.5/lisp/org/) from Emacs stable

                                     Dieter
-- 
Best wishes
H. Dieter Wilhelm
Darmstadt, Germany

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

* Re: Radio target appears as a link in html export (in Emacs stable)
  2016-01-25  8:00 Radio target appears as a link in html export (in Emacs stable) H. Dieter Wilhelm
@ 2016-01-25 22:18 ` Nicolas Goaziou
  2016-01-27  8:00   ` H. Dieter Wilhelm
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2016-01-25 22:18 UTC (permalink / raw)
  To: H. Dieter Wilhelm; +Cc: emacs-orgmode

Hello,

dieter@duenenhof-wilhelm.de (H. Dieter Wilhelm) writes:

> when exporting radio targets to PDF they appear as normal text.
> Sometimes I wish I could make them invisible but this is a behaviour I
> can live with.

You should use regular targets, then.

> Anyway, when exporting to html the radio targets appear like a regular
> link (technically I think they are a named anchor, something like <a
> id="bla" name="bla">bla</a>).  The apperance is not helpful, only
> confusing.  I guess I could change this behaviour with some css trickery
> but it might become complicated, at least for my little html knowledge.

There are radio targets (e.g., <<<radio>>>) and radio links and (e.g.,
radio). The former are turned into anchors and the latter into links.
Don't you get the same?


Regards,

-- 
Nicolas Goaziou

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

* Re: Radio target appears as a link in html export (in Emacs stable)
  2016-01-25 22:18 ` Nicolas Goaziou
@ 2016-01-27  8:00   ` H. Dieter Wilhelm
  2016-01-27 13:21     ` Nicolas Goaziou
  0 siblings, 1 reply; 8+ messages in thread
From: H. Dieter Wilhelm @ 2016-01-27  8:00 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> dieter@duenenhof-wilhelm.de (H. Dieter Wilhelm) writes:
>
>> when exporting radio targets to PDF they appear as normal text.
>> Sometimes I wish I could make them invisible but this is a behaviour I
>> can live with.
>
> You should use regular targets, then.

But then I would have to turn all my radio links into proper links,
which I see no method - except with radio targets - to do this
automatically.

>> Anyway, when exporting to html the radio targets appear like a regular
>> link (technically I think they are a named anchor, something like <a
>> id="bla" name="bla">bla</a>).  The apperance is not helpful, only
>> confusing.  I guess I could change this behaviour with some css trickery
>> but it might become complicated, at least for my little html knowledge.
>
> There are radio targets (e.g., <<<radio>>>) and radio links and (e.g.,
> radio). The former are turned into anchors and the latter into links.
> Don't you get the same?

The radio links are turned correctly into links. :-)

But the targets (anchors) appear *also* as links (in HTML).  Which is
confusing and redundant because there are not linked to anything.

Here's an example:
http://duenenhof-wilhelm.de/dancing/date.html

E. g. _EDanceFever_ are links to their anchor below.

Maybe the following would be a good idea for org in general: A radio
target with an optional address argument like babel src blocks
<<<target>>>[http://targetaddresse.com] and upgrading the anchor to a
real, working link.

Thank you Nicolas

-- 
Best wishes
H. Dieter Wilhelm
Darmstadt, Germany

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

* Re: Radio target appears as a link in html export (in Emacs stable)
  2016-01-27  8:00   ` H. Dieter Wilhelm
@ 2016-01-27 13:21     ` Nicolas Goaziou
  2016-02-01  7:04       ` H. Dieter Wilhelm
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2016-01-27 13:21 UTC (permalink / raw)
  To: H. Dieter Wilhelm; +Cc: emacs-orgmode

Hello,

dieter@duenenhof-wilhelm.de (H. Dieter Wilhelm) writes:

> But then I would have to turn all my radio links into proper links,
> which I see no method - except with radio targets - to do this
> automatically.

Instead of 

  <<<radio>>> ... radio

you would have to type

  <<radio>>   ... [[radio]]

which, IMO, is almost equally simple.

> The radio links are turned correctly into links. :-)
>
> But the targets (anchors) appear *also* as links (in HTML).  Which is
> confusing and redundant because there are not linked to anything.

I'm confused, mainly because I'm not well versed in HTML. Let's consider
the following document:

  <<<radio>>> :target link: radio

When exporting it to HTML, I get the following:

  <a id="orgradiotarget1">radio</a> :target link: <a href="#orgradiotarget1">radio</a>

What would you expect instead?


Regards,

-- 
Nicolas Goaziou

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

* Re: Radio target appears as a link in html export (in Emacs stable)
  2016-01-27 13:21     ` Nicolas Goaziou
@ 2016-02-01  7:04       ` H. Dieter Wilhelm
  2016-02-01 11:21         ` Nicolas Goaziou
  0 siblings, 1 reply; 8+ messages in thread
From: H. Dieter Wilhelm @ 2016-02-01  7:04 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> dieter@duenenhof-wilhelm.de (H. Dieter Wilhelm) writes:
>
>> But then I would have to turn all my radio links into proper links,
>> which I see no method - except with radio targets - to do this
>> automatically.
>
> Instead of 
>
>   <<<radio>>> ... radio
>
> you would have to type
>
>   <<radio>>   ... [[radio]]
>
> which, IMO, is almost equally simple.

Hmmm, that is true.  In the worst case I've to get used to it...

>> The radio links are turned correctly into links. :-)
>>
>> But the targets (anchors) appear *also* as links (in HTML).  Which is
>> confusing and redundant because there are not linked to anything.
>
> I'm confused, mainly because I'm not well versed in HTML. Let's consider
> the following document:
>
>   <<<radio>>> :target link: radio
>
> When exporting it to HTML, I get the following:
>
>   <a id="orgradiotarget1">radio</a> :target link: <a href="#orgradiotarget1">radio</a>


I'm getting <a id="orgradiotarget1" name="orgradiotarget1"</a> instead,
which *appears* in my html page as a link (which is wrong IMHO, Org-mode
version 8.2.10, Emacs stable).

> What would you expect instead?

I would expect an invisible html entity or just the apperance of the
text "orgradiotarget1".

Thanks
   Dieter

-- 

Best wishes
H. Dieter Wilhelm
Darmstadt, Germany

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

* Re: Radio target appears as a link in html export (in Emacs stable)
  2016-02-01  7:04       ` H. Dieter Wilhelm
@ 2016-02-01 11:21         ` Nicolas Goaziou
  2016-02-01 11:23           ` Nicolas Goaziou
  2016-02-02  7:38           ` H. Dieter Wilhelm
  0 siblings, 2 replies; 8+ messages in thread
From: Nicolas Goaziou @ 2016-02-01 11:21 UTC (permalink / raw)
  To: H. Dieter Wilhelm; +Cc: emacs-orgmode

Hello,

dieter@duenenhof-wilhelm.de (H. Dieter Wilhelm) writes:

> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>
>> dieter@duenenhof-wilhelm.de (H. Dieter Wilhelm) writes:
>>
>>> But then I would have to turn all my radio links into proper links,
>>> which I see no method - except with radio targets - to do this
>>> automatically.
>>
>> Instead of 
>>
>>   <<<radio>>> ... radio
>>
>> you would have to type
>>
>>   <<radio>>   ... [[radio]]
>>
>> which, IMO, is almost equally simple.
>
> Hmmm, that is true.  In the worst case I've to get used to it...

Actually, it is slightly more complicated:

  <<radio>> ... [[radio][radio]]

>>> The radio links are turned correctly into links. :-)
>>>
>>> But the targets (anchors) appear *also* as links (in HTML).  Which is
>>> confusing and redundant because there are not linked to anything.
>>
>> I'm confused, mainly because I'm not well versed in HTML. Let's consider
>> the following document:
>>
>>   <<<radio>>> :target link: radio
>>
>> When exporting it to HTML, I get the following:
>>
>>   <a id="orgradiotarget1">radio</a> :target link: <a href="#orgradiotarget1">radio</a>
>
>
> I'm getting <a id="orgradiotarget1" name="orgradiotarget1"</a> instead,
> which *appears* in my html page as a link (which is wrong IMHO, Org-mode
> version 8.2.10, Emacs stable).

IIUC, the only difference with my output is the "name" attribute. You
may want to check `org-html-allow-name-attribute-in-anchors'.

> I would expect an invisible html entity or just the apperance of the
> text "orgradiotarget1".

The latter is indeed expected. 

Assuming the variable above is non-nil, which would explain your output,
we could consider to ignore it altogether for radio targets. Again, I'm
not much into HTML so I don't know if that's a good idea (e.g., is there
any use for an anchor with both an id and a name attribute in the
context of radio targets?).

Regards,

-- 
Nicolas Goaziou

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

* Re: Radio target appears as a link in html export (in Emacs stable)
  2016-02-01 11:21         ` Nicolas Goaziou
@ 2016-02-01 11:23           ` Nicolas Goaziou
  2016-02-02  7:38           ` H. Dieter Wilhelm
  1 sibling, 0 replies; 8+ messages in thread
From: Nicolas Goaziou @ 2016-02-01 11:23 UTC (permalink / raw)
  To: H. Dieter Wilhelm; +Cc: emacs-orgmode

Correcting myself,

>> I would expect an invisible html entity or just the apperance of the
>> text "orgradiotarget1".
>
> The latter is indeed expected.

What is really expected is to display the contents of the radio target,
without being a link.

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

* Re: Radio target appears as a link in html export (in Emacs stable)
  2016-02-01 11:21         ` Nicolas Goaziou
  2016-02-01 11:23           ` Nicolas Goaziou
@ 2016-02-02  7:38           ` H. Dieter Wilhelm
  1 sibling, 0 replies; 8+ messages in thread
From: H. Dieter Wilhelm @ 2016-02-02  7:38 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

>> I would expect an invisible html entity or just the apperance of the
>> text "orgradiotarget1".
>
> The latter is indeed expected. 

Thanks for the confirmation

> Assuming the variable above is non-nil, which would explain your output,
> we could consider to ignore it altogether for radio targets. Again, I'm

  org-html-allow-name-attribute-in-anchors is a variable defined in `ox-html.el'.
  Its value is t

Thanks, didn't know about this config. variable and it's working, the
anchor is then exported without a name...  But still appears as a link
in *my* html page :-(.  I conclude the problem is within the css file
I'm using for this particular site. (Please see the following comment)

> not much into HTML so I don't know if that's a good idea (e.g., is there
> any use for an anchor with both an id and a name attribute in the
> context of radio targets?).

I don't think so, with a simple org test file I'm getting the behaviour
you would expect - despite a named anchor - the target doesn't appear as
link, just a regular text.  Thank you very much, I have now a path to
look for.

  Dieter

-- 
Best wishes
H. Dieter Wilhelm
Darmstadt, Germany

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

end of thread, other threads:[~2016-02-02  7:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-25  8:00 Radio target appears as a link in html export (in Emacs stable) H. Dieter Wilhelm
2016-01-25 22:18 ` Nicolas Goaziou
2016-01-27  8:00   ` H. Dieter Wilhelm
2016-01-27 13:21     ` Nicolas Goaziou
2016-02-01  7:04       ` H. Dieter Wilhelm
2016-02-01 11:21         ` Nicolas Goaziou
2016-02-01 11:23           ` Nicolas Goaziou
2016-02-02  7:38           ` H. Dieter Wilhelm

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