emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Radio targets in comment lines
@ 2013-08-21 23:05 Steen Hoyer
  2013-08-22  8:56 ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Steen Hoyer @ 2013-08-21 23:05 UTC (permalink / raw)
  To: emacs-orgmode

Org 8 seems to have changed the way radio links in comment lines work.

# <<<target>>> No longer creates a link - 'C-c C-c can do nothing useful at this location'

#+test <<<target>>> Works within org for some reason, but then the line will be exported...

I was curious if this was intentional, because I have many (now broken) links of the first kind in my org files, and because of this line in the org FAQ:
"The usual way of turning radio links invisible is to comment them,"

Best wishes,
     Steen

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

* Re: Radio targets in comment lines
  2013-08-21 23:05 Radio targets in comment lines Steen Hoyer
@ 2013-08-22  8:56 ` Nicolas Goaziou
  2013-08-22 14:16   ` Steen Hoyer
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2013-08-22  8:56 UTC (permalink / raw)
  To: Steen Hoyer; +Cc: emacs-orgmode

Hello,

Steen Hoyer <j.s.hoyer@wustl.edu> writes:

> Org 8 seems to have changed the way radio links in comment lines work.
>
> # <<<target>>> No longer creates a link - 'C-c C-c can do nothing useful at this location'
>
> #+test <<<target>>> Works within org for some reason, but then the line will be exported...
>
> I was curious if this was intentional,

This is intentional. No Org syntax is recognized in a comment anymore.
On the other hand, all targets (not radio targets) are invisible now.
Therefore, you can write:

  Some text<<invsible>> in a paragraph.

And "invisible" (note the double brackets) will not appear during
export.

"#+test <<<target>>>" has wrong syntax since the colons are mandatory:
"#+test: <<<target>>>". It will not be exported (as a keyword), but it
cannot hold radio targets (or targets) either.

> because I have many (now broken) links of the first kind in my org
> files, and because of this line in the org FAQ: "The usual way of
> turning radio links invisible is to comment them,"

FAQ is not up-to-date. Also, note that there is a confusion between
targets (double brackets) and radio targets (triple brackets). There is
no point in making radio targets invisible. There is also no need for
the (INVISIBLE) hack anymore.

Patches welcome wrt the FAQ.


Regards,

-- 
Nicolas Goaziou

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

* Re: Radio targets in comment lines
  2013-08-22  8:56 ` Nicolas Goaziou
@ 2013-08-22 14:16   ` Steen Hoyer
  2013-08-22 18:40     ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Steen Hoyer @ 2013-08-22 14:16 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Thank you Nicolas! I will think about a patch for the FAQ. I don't quite understand one of your comments:

> There is no point in making radio targets invisible. 

I think that invisible radio targets are precisely what I want - that's why I made so many of them in comments under the old system. Am I missing something? I've tried putting the radio targets in a :LOGBOOK:, which works fine in Emacs, but not after export. Perhaps I should use some other type of non-exported drawer?

For what it is worth, I am trying to able to paste text from academic papers (with multiple possible citation styles) and have links to notes elsewhere in the file appear automatically.

* Author Year
<<<Author et al., Year>>>
<<<Author et al. (Year)>>>

I am not using the radio targets in a sentence and therefore I don't want them to be visible. I could use <<Author et al., Year>> to make an invisible target (or use a custom ID), but then to link I would need [[Author et al., Year]], instead of simply Author et al., Year. Does this make sense, is there some workaround I'm missing, or should I give up on this clumsy system?

Best,
  Steen

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

* Re: Radio targets in comment lines
  2013-08-22 14:16   ` Steen Hoyer
@ 2013-08-22 18:40     ` Nicolas Goaziou
  0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2013-08-22 18:40 UTC (permalink / raw)
  To: Steen Hoyer; +Cc: emacs-orgmode

Steen Hoyer <j.s.hoyer@wustl.edu> writes:

> Thank you Nicolas! I will think about a patch for the FAQ. I don't quite understand one of your comments:
>
>> There is no point in making radio targets invisible. 
>
> I think that invisible radio targets are precisely what I want -
> that's why I made so many of them in comments under the old system. Am
> I missing something? I've tried putting the radio targets in
> a :LOGBOOK:, which works fine in Emacs, but not after export. Perhaps
> I should use some other type of non-exported drawer?
>
> For what it is worth, I am trying to able to paste text from academic papers (with multiple possible citation styles) and have links to notes elsewhere in the file appear automatically.
>
> * Author Year
> <<<Author et al., Year>>>
> <<<Author et al. (Year)>>>
>
> I am not using the radio targets in a sentence and therefore I don't
> want them to be visible. I could use <<Author et al., Year>> to make
> an invisible target (or use a custom ID), but then to link I would
> need [[Author et al., Year]], instead of simply Author et al., Year.
> Does this make sense, is there some workaround I'm missing, or should
> I give up on this clumsy system?

I'm not sure to understand. With this method, you're just creating
broken links since the source (the radio target) will be removed upon
exporting. All these links will have no destination.

If you just want the links when writing the document and have them
turned into plain text when exporting the document, you can simply
delete the radio targets using a function within
`org-export-before-processing-hook'.


Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2013-08-22 18:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-21 23:05 Radio targets in comment lines Steen Hoyer
2013-08-22  8:56 ` Nicolas Goaziou
2013-08-22 14:16   ` Steen Hoyer
2013-08-22 18:40     ` Nicolas Goaziou

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