emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Is there possibility to provide back links to each finely grained part of Org file?
@ 2020-11-08 20:40 Jean Louis
  2020-11-09 11:38 ` Eric S Fraga
  0 siblings, 1 reply; 6+ messages in thread
From: Jean Louis @ 2020-11-08 20:40 UTC (permalink / raw)
  To: emacs-orgmode

In reference to Doug Engelbart's vision:
https://www.dougengelbart.org/content/view/116/#7j

I am asking if there is feature in Org mode that could generate a back
link or #name or other tags in export so that each part of Org file
can be later finely referenced?

Example may be seen on the above link. On the right side there are 7j
or 7d names to which anybody can link to pin point specific paragraph.

I know that #names exist in HTML export for *** headings. Do they or
can they exist for every paragraph or item listed?

Jean


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

* Re: Is there possibility to provide back links to each finely grained part of Org file?
  2020-11-08 20:40 Is there possibility to provide back links to each finely grained part of Org file? Jean Louis
@ 2020-11-09 11:38 ` Eric S Fraga
  2020-11-09 12:01   ` Ken Mankoff
  2020-11-09 12:04   ` Jean Louis
  0 siblings, 2 replies; 6+ messages in thread
From: Eric S Fraga @ 2020-11-09 11:38 UTC (permalink / raw)
  To: Jean Louis; +Cc: emacs-orgmode

On Sunday,  8 Nov 2020 at 23:40, Jean Louis wrote:
> I know that #names exist in HTML export for *** headings. Do they or
> can they exist for every paragraph or item listed?

Maybe not quite what you want but you can place anchors (aka targets)
anywhere you want in your document using <<targetname>>.  I use these
for within-document linking but I imagine you can link to these from
other documents as well (untested).

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4-61-ga88806.dirty


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

* Re: Is there possibility to provide back links to each finely grained part of Org file?
  2020-11-09 11:38 ` Eric S Fraga
@ 2020-11-09 12:01   ` Ken Mankoff
  2020-11-09 12:04   ` Jean Louis
  1 sibling, 0 replies; 6+ messages in thread
From: Ken Mankoff @ 2020-11-09 12:01 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-orgmode, Jean Louis


On 2020-11-09 at 03:38 -08, Eric S Fraga <e.fraga@ucl.ac.uk> wrote...
> On Sunday,  8 Nov 2020 at 23:40, Jean Louis wrote:
>> I know that #names exist in HTML export for *** headings. Do they or
>> can they exist for every paragraph or item listed?
>
> Maybe not quite what you want but you can place anchors (aka targets)
> anywhere you want in your document using <<targetname>>. I use these
> for within-document linking but I imagine you can link to these from
> other documents as well (untested).

Also I imagine https://github.com/alphapapa/org-make-toc or https://github.com/snosov1/toc-org that already auto-make TOCs to every header could be hacked to add paragraph-level links?

  -k.



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

* Re: Is there possibility to provide back links to each finely grained part of Org file?
  2020-11-09 11:38 ` Eric S Fraga
  2020-11-09 12:01   ` Ken Mankoff
@ 2020-11-09 12:04   ` Jean Louis
  2020-11-09 12:45     ` Eric S Fraga
  1 sibling, 1 reply; 6+ messages in thread
From: Jean Louis @ 2020-11-09 12:04 UTC (permalink / raw)
  To: emacs-orgmode

* Eric S Fraga <e.fraga@ucl.ac.uk> [2020-11-09 14:39]:
> On Sunday,  8 Nov 2020 at 23:40, Jean Louis wrote:
> > I know that #names exist in HTML export for *** headings. Do they or
> > can they exist for every paragraph or item listed?
> 
> Maybe not quite what you want but you can place anchors (aka targets)
> anywhere you want in your document using <<targetname>>.  I use these
> for within-document linking but I imagine you can link to these from
> other documents as well (untested).

Thank you.

That forms foundation for final solution as then it could be possible
to define special export that finds each new line after empty lines
and automatically adds specific anchor or target name to document.

I have tried using it in that manner as below and exported it to HTML
and #names are inside HTML. In the final solution I may need to adopt
CSS to place named anchors on the right side and to display them as
they are usually not displayed.

<<anchor1>>
Paragraph 

<<anchor2>>
Paragraph 

Links:

- [[anchor1][anchor1]]

- [[anchor2][anchor2]]

Before the export, I would like to filter the text and add anchors
automatically.

If you have any pointer where I could insert a filter before
exporting, let me know.

Thanks,
Jean



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

* Re: Is there possibility to provide back links to each finely grained part of Org file?
  2020-11-09 12:04   ` Jean Louis
@ 2020-11-09 12:45     ` Eric S Fraga
  2020-11-09 15:38       ` Jean Louis
  0 siblings, 1 reply; 6+ messages in thread
From: Eric S Fraga @ 2020-11-09 12:45 UTC (permalink / raw)
  To: Jean Louis; +Cc: emacs-orgmode

On Monday,  9 Nov 2020 at 15:04, Jean Louis wrote:
> If you have any pointer where I could insert a filter before
> exporting, let me know.

You could use the org-export-before-processing-hook to process the
document.  It works on a copy of the buffer.  I've used this in the
past.  There are other hooks which come in at different times in the
export process.  There are also filters which process specific org
elements and I'm sure there is one for anchors... yes,
org-export-filter-target-functions.

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4-61-ga88806.dirty


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

* Re: Is there possibility to provide back links to each finely grained part of Org file?
  2020-11-09 12:45     ` Eric S Fraga
@ 2020-11-09 15:38       ` Jean Louis
  0 siblings, 0 replies; 6+ messages in thread
From: Jean Louis @ 2020-11-09 15:38 UTC (permalink / raw)
  To: emacs-orgmode

* Eric S Fraga <e.fraga@ucl.ac.uk> [2020-11-09 15:45]:
> On Monday,  9 Nov 2020 at 15:04, Jean Louis wrote:
> > If you have any pointer where I could insert a filter before
> > exporting, let me know.
> 
> You could use the org-export-before-processing-hook to process the
> document.  It works on a copy of the buffer.  I've used this in the
> past.  There are other hooks which come in at different times in the
> export process.  There are also filters which process specific org
> elements and I'm sure there is one for anchors... yes,
> org-export-filter-target-functions.

Thank you! Reference taken.

I hope I will be able to customize the anchors myself in the filter.


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

end of thread, other threads:[~2020-11-09 16:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-08 20:40 Is there possibility to provide back links to each finely grained part of Org file? Jean Louis
2020-11-09 11:38 ` Eric S Fraga
2020-11-09 12:01   ` Ken Mankoff
2020-11-09 12:04   ` Jean Louis
2020-11-09 12:45     ` Eric S Fraga
2020-11-09 15:38       ` Jean Louis

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