emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* A way to export agenda with links into org-files to html ?
@ 2011-02-05 21:46 Marc-Oliver Ihm
  2011-02-11 16:34 ` Bastien
  2011-02-21 21:40 ` Marc-Oliver Ihm
  0 siblings, 2 replies; 10+ messages in thread
From: Marc-Oliver Ihm @ 2011-02-05 21:46 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

I have some co-workers with whom I would like to share my notes from org 
and even some of the todos, which are recorded there.

Unfortunately they are not very emacs savy, so that I need another way 
besides emacs to give access to this information. Html is an obvious option.

The html exporter gives excellent results for all of my org-files and 
with org-write-agenda it is very easy to write the agenda to file.

However, in the html-version of the agenda there are no links.

Is there a way around this or is there another way to do this ?

I know, there have been discussions on this topic, but I have found no 
solution yet.

Is there a way ?

Any help would be appreciated.

with kind regards, Marc-Oliver Ihm

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

* Re: A way to export agenda with links into org-files to html ?
  2011-02-05 21:46 A way to export agenda with links into org-files to html ? Marc-Oliver Ihm
@ 2011-02-11 16:34 ` Bastien
  2011-02-16 20:06   ` Hrvoje Niksic
  2011-02-21 21:40 ` Marc-Oliver Ihm
  1 sibling, 1 reply; 10+ messages in thread
From: Bastien @ 2011-02-11 16:34 UTC (permalink / raw)
  To: Marc-Oliver Ihm; +Cc: Hrvoje Niksic, emacs-orgmode

Hi Marc-Oliver,

Marc-Oliver Ihm <marc-oliver.ihm@online.de> writes:

> The html exporter gives excellent results for all of my org-files and
> with org-write-agenda it is very easy to write the agenda to file.
>
> However, in the html-version of the agenda there are no links.

Actually, htmlize.el is designed to handle links.

  (setq htmlize-generate-hyperlinks t)

should do.

Sadly enough, htmlize.el only handles <http://orgmode.org> links. 

Patch to make htmlize.el handle org links welcome!

-- 
 Bastien

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

* Re: A way to export agenda with links into org-files to html ?
  2011-02-11 16:34 ` Bastien
@ 2011-02-16 20:06   ` Hrvoje Niksic
  2011-02-18  9:30     ` Bastien
  0 siblings, 1 reply; 10+ messages in thread
From: Hrvoje Niksic @ 2011-02-16 20:06 UTC (permalink / raw)
  To: Bastien; +Cc: Marc-Oliver Ihm, emacs-orgmode

Bastien <bastien.guerry@wikimedia.fr> writes:

> Sadly enough, htmlize.el only handles <http://orgmode.org> links. 
>
> Patch to make htmlize.el handle org links welcome!

htmlize looks for urls and converts them to links.  What are org links
that you refer to, and how should htmlize find them in the buffer?

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

* Re: A way to export agenda with links into org-files to html ?
  2011-02-16 20:06   ` Hrvoje Niksic
@ 2011-02-18  9:30     ` Bastien
  2011-02-18  9:42       ` Hrvoje Niksic
  0 siblings, 1 reply; 10+ messages in thread
From: Bastien @ 2011-02-18  9:30 UTC (permalink / raw)
  To: Hrvoje Niksic; +Cc: Marc-Oliver Ihm, emacs-orgmode

Hi Hrvoje,

Hrvoje Niksic <hniksic@xemacs.org> writes:

> Bastien <bastien.guerry@wikimedia.fr> writes:
>
>> Sadly enough, htmlize.el only handles <http://orgmode.org> links. 
>>
>> Patch to make htmlize.el handle org links welcome!
>
> htmlize looks for urls and converts them to links.  

Yes, some urls.

> What are org links that you refer to,

Links like [[http://orgmode.org][Org website]] or even raw links like
http://orgmode.org, with no <...> bracket.

See the manual:

  http://orgmode.org/manual/Link-format.html
  http://orgmode.org/manual/External-links.html

> and how should htmlize find them in the buffer?

See org-*-link-regexp regular expressions. 

We definitely don't need to match every (org-)link these expressions
match.  Only hyperlinks with external protocols (http, ftp, mailto,
etc.)

Thanks for taking a look at this!

-- 
 Bastien

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

* Re: A way to export agenda with links into org-files to html ?
  2011-02-18  9:30     ` Bastien
@ 2011-02-18  9:42       ` Hrvoje Niksic
  2011-02-26  9:45         ` Bastien
  0 siblings, 1 reply; 10+ messages in thread
From: Hrvoje Niksic @ 2011-02-18  9:42 UTC (permalink / raw)
  To: Bastien; +Cc: hniksic, Marc-Oliver Ihm, emacs-orgmode

[ Please keep me in the Cc when replying ]

Bastien <bastien.guerry@wikimedia.fr> writes:

>> and how should htmlize find them in the buffer?
>
> See org-*-link-regexp regular expressions.

I was thinking in a more general way.

Maybe applications such as orgmode could mark hyperlinks with text
properties and htmlize could recognize them and convert them to real
links, without fragile (and slow) regexp magic.

For example, Gnus uses the `mouse-face' property to highlight the URLs
in the article buffer.  The `button' property contains the details about
the "button".

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

* Re: A way to export agenda with links into org-files to html ?
  2011-02-05 21:46 A way to export agenda with links into org-files to html ? Marc-Oliver Ihm
  2011-02-11 16:34 ` Bastien
@ 2011-02-21 21:40 ` Marc-Oliver Ihm
  1 sibling, 0 replies; 10+ messages in thread
From: Marc-Oliver Ihm @ 2011-02-21 21:40 UTC (permalink / raw)
  To: emacs-orgmode

Am 05.02.2011 22:46, schrieb Marc-Oliver Ihm:
> Hello,
>
> I have some co-workers with whom I would like to share my notes from org
> and even some of the todos, which are recorded there.
>
> Unfortunately they are not very emacs savy, so that I need another way
> besides emacs to give access to this information. Html is an obvious
> option.
>
> The html exporter gives excellent results for all of my org-files and
> with org-write-agenda it is very easy to write the agenda to file.
>
> However, in the html-version of the agenda there are no links.
>
> Is there a way around this or is there another way to do this ?
>
> I know, there have been discussions on this topic, but I have found no
> solution yet.
>
> Is there a way ?
>
> Any help would be appreciated.
>
> with kind regards, Marc-Oliver Ihm
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>

Thanx for holding up this thread while I was away :-)

To be me more precise than my original posting: With "links" in the 
agenda buffer, I meant the feature, that precssing return in the agenda 
buffer sends one to the corresponding position in the original buffer.

It would be very useful, if such "links" could be converted to 
html-links when exporting the agenda.

Thanx for considering such a feature.

kind regards, Marc-Oliver Ihm

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

* Re: A way to export agenda with links into org-files to html ?
  2011-02-18  9:42       ` Hrvoje Niksic
@ 2011-02-26  9:45         ` Bastien
  2011-02-28 23:00           ` Hrvoje Niksic
  0 siblings, 1 reply; 10+ messages in thread
From: Bastien @ 2011-02-26  9:45 UTC (permalink / raw)
  To: Hrvoje Niksic; +Cc: Marc-Oliver Ihm, emacs-orgmode

Hi Hrvoje,

thanks for your reply.

Hrvoje Niksic <hniksic@xemacs.org> writes:

> I was thinking in a more general way.

Yes, that'd be better.

> Maybe applications such as orgmode could mark hyperlinks with text
> properties and htmlize could recognize them and convert them to real
> links, without fragile (and slow) regexp magic.

This are the typical text properties for an Org-mode link:

  face                 org-link
  help-echo            "LINK: http://bonjour.fr"
  mouse-face           highlight

HTH,

-- 
 Bastien

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

* Re: A way to export agenda with links into org-files to html ?
  2011-02-26  9:45         ` Bastien
@ 2011-02-28 23:00           ` Hrvoje Niksic
  2011-03-01 17:57             ` Bastien
  0 siblings, 1 reply; 10+ messages in thread
From: Hrvoje Niksic @ 2011-02-28 23:00 UTC (permalink / raw)
  To: emacs-orgmode

Bastien <bzg@altern.org> writes:

> This are the typical text properties for an Org-mode link:
>
>   face                 org-link
>   help-echo            "LINK: http://bonjour.fr"
>   mouse-face           highlight

These three properties (face, help-echo, mouse-face) are general, which
would require htmlize to deduce URLs from them much like it now deduces
URLs by examining buffer text.  I would like to offer a better
alternative.

What I had in mind is a general property that marks a URI reference.
For example, a `uri-ref' property could refer to the URI that would
cause htmlize to generate an <a href="..."> link, `browse-url' to react
to mouse clicks to that area, etc.  The property value would typically
be a string containing the URI, but could also be a plist describing the
reference.

;; just the URI
(put-text-property beg end 'uri-ref "http://bonjour.fr")

;; the same, with the ability to specify additional props of this ref
(put-text-property beg end 'uri-ref '(:uri "http://bonjour.fr"))

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

* Re: Re: A way to export agenda with links into org-files to html ?
  2011-02-28 23:00           ` Hrvoje Niksic
@ 2011-03-01 17:57             ` Bastien
  2011-03-02  8:48               ` Hrvoje Niksic
  0 siblings, 1 reply; 10+ messages in thread
From: Bastien @ 2011-03-01 17:57 UTC (permalink / raw)
  To: Hrvoje Niksic; +Cc: emacs-orgmode

Hi Hrvoje,

Hrvoje Niksic <hniksic@xemacs.org> writes:

>> This are the typical text properties for an Org-mode link:
>>
>>   face                 org-link
>>   help-echo            "LINK: http://bonjour.fr"
>>   mouse-face           highlight
>
> These three properties (face, help-echo, mouse-face) are general, which
> would require htmlize to deduce URLs from them much like it now deduces
> URLs by examining buffer text.  I would like to offer a better
> alternative.
>
> What I had in mind is a general property that marks a URI reference.
> For example, a `uri-ref' property could refer to the URI that would
> cause htmlize to generate an <a href="..."> link, `browse-url' to react
> to mouse clicks to that area, etc.  The property value would typically
> be a string containing the URI, but could also be a plist describing the
> reference.
>
> ;; just the URI
> (put-text-property beg end 'uri-ref "http://bonjour.fr")

I see.  So (thing-at-point 'url) would return the url/uri depending on
that 'uri-ref property.  But as far as I've understood, thing-at-point
does not rely on properties -- am I wrong?

Unless such a property can be used with thing-at-point (for `browse-url'
and other commands), I'd rather put the burden of finding the proper ref
to htmlize, based on the help-echo area... 

What do you think?

-- 
 Bastien

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

* Re: Re: A way to export agenda with links into org-files to html ?
  2011-03-01 17:57             ` Bastien
@ 2011-03-02  8:48               ` Hrvoje Niksic
  0 siblings, 0 replies; 10+ messages in thread
From: Hrvoje Niksic @ 2011-03-02  8:48 UTC (permalink / raw)
  To: emacs-orgmode

Bastien <bzg@altern.org> writes:

> I see.  So (thing-at-point 'url) would return the url/uri depending on
> that 'uri-ref property.  But as far as I've understood, thing-at-point
> does not rely on properties -- am I wrong?

I am proposing a new property which currently available software of
course does not support.  If we promote it, maybe programmers of these
other modes will like it enough to support it.

> Unless such a property can be used with thing-at-point (for
> `browse-url' and other commands), I'd rather put the burden of finding
> the proper ref to htmlize, based on the help-echo area...
>
> What do you think?

I think that the help-echo text is not a robust way to detect URLs.  For
example, org-mode's help-echo text is "LINK: url", someone else will use
just the URL, others will translate "link", and yet others will not use
help-echo at all.

Modes need a reliable way to tell htmlize (and other interesting
parties) about URI references in the buffer.  A property seems like an
obvious way to do so, and I'd prefer the property not to be specific to
htmlize.

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

end of thread, other threads:[~2011-03-02  9:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-05 21:46 A way to export agenda with links into org-files to html ? Marc-Oliver Ihm
2011-02-11 16:34 ` Bastien
2011-02-16 20:06   ` Hrvoje Niksic
2011-02-18  9:30     ` Bastien
2011-02-18  9:42       ` Hrvoje Niksic
2011-02-26  9:45         ` Bastien
2011-02-28 23:00           ` Hrvoje Niksic
2011-03-01 17:57             ` Bastien
2011-03-02  8:48               ` Hrvoje Niksic
2011-02-21 21:40 ` Marc-Oliver Ihm

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