all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [Bug] html-export mangels mailto: links
@ 2010-09-01 20:26 Achim Gratz
  2010-09-02  6:35 ` [PATCH] " Noorul Islam K M
  0 siblings, 1 reply; 12+ messages in thread
From: Achim Gratz @ 2010-09-01 20:26 UTC (permalink / raw)
  To: emacs-orgmode

HTML export removes the "mailto:" from a link, which will then be
interpreted as a local link by the browser.

For an example, see the link to this mailing list in
ORGWEBPAGE/index.org and the corresponding HTML export on orgmode-org
(or just the local file).


Achim.

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

* [PATCH] Re: html-export mangels mailto: links
  2010-09-01 20:26 [Bug] html-export mangels mailto: links Achim Gratz
@ 2010-09-02  6:35 ` Noorul Islam K M
  2010-09-02 15:33   ` [Accepted] " Bastien Guerry
  2010-09-02 15:35   ` [PATCH] " Bastien
  0 siblings, 2 replies; 12+ messages in thread
From: Noorul Islam K M @ 2010-09-02  6:35 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

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

Achim Gratz <Stromeko@nexgo.de> writes:

> HTML export removes the "mailto:" from a link, which will then be
> interpreted as a local link by the browser.
>
> For an example, see the link to this mailing list in
> ORGWEBPAGE/index.org and the corresponding HTML export on orgmode-org
> (or just the local file).
>

org-html.el : Fix exporting file, mailto, news and ftp protocols.

* lisp/org-html.el (org-html-make-link): (expand-file-name
) removes one "/" from "///path-to-file", so add one. Anything other
than 'file' type should be exported along with the type.

TINYCHANGE

Thanks and Regards
Noorul


[-- Attachment #2: org-html.el.txt --]
[-- Type: text/plain, Size: 813 bytes --]

diff --git a/lisp/org-html.el b/lisp/org-html.el
index 099b2e3..4430768 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -720,7 +720,7 @@ MAY-INLINE-P allows inlining it as an image."
 			   ;;Substitute just if original path was absolute.
 			   ;;(Otherwise path must remain relative)
 			   (if (file-name-absolute-p path)
-			      (expand-file-name path)
+			      (concat "/" (expand-file-name path))
 			      path)))
 		     ((string= type "")
 			(list nil path))
@@ -756,8 +756,7 @@ MAY-INLINE-P allows inlining it as an image."
 	 (setq thefile
 	    (let
 	       ((str (org-export-html-format-href thefile)))
-	      (if (and type (not (string= "file" type))
-		       (org-string-match-p "^//" str))
+	      (if (and type (not (string= "file" type)))
 		  (concat type ":" str)
 		  str)))
 

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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

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

* [Accepted] Re: html-export mangels mailto: links
  2010-09-02  6:35 ` [PATCH] " Noorul Islam K M
@ 2010-09-02 15:33   ` Bastien Guerry
  2010-09-02 15:35   ` [PATCH] " Bastien
  1 sibling, 0 replies; 12+ messages in thread
From: Bastien Guerry @ 2010-09-02 15:33 UTC (permalink / raw)
  To: emacs-orgmode

Patch 251 (http://patchwork.newartisans.com/patch/251/) is now "Accepted".

Maintainer comment: Applied a slightly modified version: better handling of absolute filenames.

This relates to the following submission:

http://mid.gmane.org/%3C87iq2o3b5s.fsf%40noorul.maa.corp.collab.net%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [Orgmode] Re: html-export mangels mailto: links
> Date: Thu, 02 Sep 2010 11:35:43 -0000
> From: Noorul Islam <noorul@noorul.com>
> X-Patchwork-Id: 251
> Message-Id: <87iq2o3b5s.fsf@noorul.maa.corp.collab.net>
> To: Achim Gratz <Stromeko@nexgo.de>
> Cc: emacs-orgmode@gnu.org
> 
> Achim Gratz <Stromeko@nexgo.de> writes:
> 
> > HTML export removes the "mailto:" from a link, which will then be
> > interpreted as a local link by the browser.
> >
> > For an example, see the link to this mailing list in
> > ORGWEBPAGE/index.org and the corresponding HTML export on orgmode-org
> > (or just the local file).
> >
> 
> org-html.el : Fix exporting file, mailto, news and ftp protocols.
> 
> * lisp/org-html.el (org-html-make-link): (expand-file-name
> ) removes one "/" from "///path-to-file", so add one. Anything other
> than 'file' type should be exported along with the type.
> 
> TINYCHANGE
> 
> Thanks and Regards
> Noorul
> 
> 
> diff --git a/lisp/org-html.el b/lisp/org-html.el
> index 099b2e3..4430768 100644
> --- a/lisp/org-html.el
> +++ b/lisp/org-html.el
> @@ -720,7 +720,7 @@ MAY-INLINE-P allows inlining it as an image."
>  			   ;;Substitute just if original path was absolute.
>  			   ;;(Otherwise path must remain relative)
>  			   (if (file-name-absolute-p path)
> -			      (expand-file-name path)
> +			      (concat "/" (expand-file-name path))
>  			      path)))
>  		     ((string= type "")
>  			(list nil path))
> @@ -756,8 +756,7 @@ MAY-INLINE-P allows inlining it as an image."
>  	 (setq thefile
>  	    (let
>  	       ((str (org-export-html-format-href thefile)))
> -	      (if (and type (not (string= "file" type))
> -		       (org-string-match-p "^//" str))
> +	      (if (and type (not (string= "file" type)))
>  		  (concat type ":" str)
>  		  str)))
>  
> 

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

* Re: [PATCH] Re: html-export mangels mailto: links
  2010-09-02  6:35 ` [PATCH] " Noorul Islam K M
  2010-09-02 15:33   ` [Accepted] " Bastien Guerry
@ 2010-09-02 15:35   ` Bastien
  2010-09-12 18:29     ` Achim Gratz
  1 sibling, 1 reply; 12+ messages in thread
From: Bastien @ 2010-09-02 15:35 UTC (permalink / raw)
  To: Noorul Islam K M; +Cc: Achim Gratz, emacs-orgmode

Noorul Islam K M <noorul@noorul.com> writes:

> org-html.el : Fix exporting file, mailto, news and ftp protocols.
>
> * lisp/org-html.el (org-html-make-link): (expand-file-name
> ) removes one "/" from "///path-to-file", so add one. Anything other
> than 'file' type should be exported along with the type.

I applied it -- thanks.

I modified it further so that absolute filenames are exported as
"file:///filename" links.

-- 
 Bastien

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

* Re: [PATCH] Re: html-export mangels mailto: links
  2010-09-02 15:35   ` [PATCH] " Bastien
@ 2010-09-12 18:29     ` Achim Gratz
  2010-09-12 19:02       ` David Maus
  0 siblings, 1 reply; 12+ messages in thread
From: Achim Gratz @ 2010-09-12 18:29 UTC (permalink / raw)
  To: emacs-orgmode

These two commits break exporting of local links as reported elsewhere
on this list.

Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada

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

* Re: Re: [PATCH] Re: html-export mangels mailto: links
  2010-09-12 18:29     ` Achim Gratz
@ 2010-09-12 19:02       ` David Maus
  2010-09-12 19:23         ` Achim Gratz
  0 siblings, 1 reply; 12+ messages in thread
From: David Maus @ 2010-09-12 19:02 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 273 bytes --]

Achim Gratz wrote:
>These two commits break exporting of local links as reported elsewhere
>on this list.

The problem with exporting local links is fixed in master.

Best,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]

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

_______________________________________________
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

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

* Re: [PATCH] Re: html-export mangels mailto: links
  2010-09-12 19:02       ` David Maus
@ 2010-09-12 19:23         ` Achim Gratz
  2010-09-12 19:29           ` Eric S Fraga
  0 siblings, 1 reply; 12+ messages in thread
From: Achim Gratz @ 2010-09-12 19:23 UTC (permalink / raw)
  To: emacs-orgmode

David Maus <dmaus@ictsoc.de> writes:
> The problem with exporting local links is fixed in master.

Thanks, although I don't see that particular commit yet... :-)

One other question: I often see org-mode version reported like this:

Org-mode version 7.01trans (release_7.01h.497.g59fa)

All I get is 7.01trans sans the "release" part, is there some makefile
target I'm missing or some configuration to extend the version string
that org-mode reports?


Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

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

* Re: Re: [PATCH] Re: html-export mangels mailto: links
  2010-09-12 19:23         ` Achim Gratz
@ 2010-09-12 19:29           ` Eric S Fraga
  2010-09-12 19:36             ` Achim Gratz
  0 siblings, 1 reply; 12+ messages in thread
From: Eric S Fraga @ 2010-09-12 19:29 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

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

On Sun, 12 Sep 2010 21:23:23 +0200, Achim Gratz <Stromeko@nexgo.de> wrote:
> 
> David Maus <dmaus@ictsoc.de> writes:
> > The problem with exporting local links is fixed in master.
> 
> Thanks, although I don't see that particular commit yet... :-)
> 
> One other question: I often see org-mode version reported like this:
> 
> Org-mode version 7.01trans (release_7.01h.497.g59fa)
> 
> All I get is 7.01trans sans the "release" part, is there some makefile
> target I'm missing or some configuration to extend the version string
> that org-mode reports?

it's the output of "M-x org-version RET" as opposed to the value of
org-version.

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

-- 
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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

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

* Re: [PATCH] Re: html-export mangels mailto: links
  2010-09-12 19:29           ` Eric S Fraga
@ 2010-09-12 19:36             ` Achim Gratz
  2010-09-13  1:24               ` Nick Dokos
  0 siblings, 1 reply; 12+ messages in thread
From: Achim Gratz @ 2010-09-12 19:36 UTC (permalink / raw)
  To: emacs-orgmode

Eric S Fraga <ucecesf@ucl.ac.uk> writes:
> it's the output of "M-x org-version RET" as opposed to the value of
> org-version.

They both deliver the same result "7.01trans" for me, that's why I'm
asking...

Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves

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

* Re: Re: [PATCH] Re: html-export mangels mailto: links
  2010-09-12 19:36             ` Achim Gratz
@ 2010-09-13  1:24               ` Nick Dokos
  2010-09-13  4:56                 ` Achim Gratz
  0 siblings, 1 reply; 12+ messages in thread
From: Nick Dokos @ 2010-09-13  1:24 UTC (permalink / raw)
  To: Achim Gratz; +Cc: nicholas.dokos, emacs-orgmode

Achim Gratz <Stromeko@nexgo.de> wrote:

> Eric S Fraga <ucecesf@ucl.ac.uk> writes:
> > it's the output of "M-x org-version RET" as opposed to the value of
> > org-version.
> 
> They both deliver the same result "7.01trans" for me, that's why I'm
> asking...
> 

org-version makes some assumptions: it calculates a directory as follows

   (concat (file-name-directory (locate-library "org")) "../" ))

and then looks for a ``.git'' subdirectory in that directory. If it is
found, then all is good: it does a ``git describe'' variation to get the
release part.  But if it is not found, then it falls back to the bare
version (without the release part).

E.g. if you git pull into one place and then install the .el files
somewhere else, the .git subdirectory will not be found.

So evaluate these two expressions:

(setq dir (concat (file-name-directory (locate-library "org")) "../" )))
(file-exists-p (expand-file-name ".git" dir))

and you'll probably find that the second one returns nil in your case.

One way to get the release part: arrange your load-path to load org.el[c]
(and the other org .el or .elc files) from the lisp subdirectory of your
git repository.

HTH,
Nick

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

* Re: [PATCH] Re: html-export mangels mailto: links
  2010-09-13  1:24               ` Nick Dokos
@ 2010-09-13  4:56                 ` Achim Gratz
  2010-09-13 18:34                   ` Achim Gratz
  0 siblings, 1 reply; 12+ messages in thread
From: Achim Gratz @ 2010-09-13  4:56 UTC (permalink / raw)
  To: emacs-orgmode

Nick Dokos <nicholas.dokos@hp.com> writes:
[...]
> E.g. if you git pull into one place and then install the .el files
> somewhere else, the .git subdirectory will not be found.

Thanks for the explanation, I do indeed have the source in one place and
then just proceed to "make install" into my site-lisp directory.  I'll
see how to modify my load-path a bit differently to accommodate this
slightly different workflow that org assumes.


Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves

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

* Re: [PATCH] Re: html-export mangels mailto: links
  2010-09-13  4:56                 ` Achim Gratz
@ 2010-09-13 18:34                   ` Achim Gratz
  0 siblings, 0 replies; 12+ messages in thread
From: Achim Gratz @ 2010-09-13 18:34 UTC (permalink / raw)
  To: emacs-orgmode

I've decided to keep my standard load-path. Instead I just put

(setq load-path (cons (expand-file-name "~/lisp/org-mode/user-lisp") load-path))
(setq load-path (cdr load-path))

in the scratch buffer and execute one line or the other whenever I want
to switch and then do a C-c C-x ! in an org-buffer.  That way I can keep
a clean install in site-lisp.  I might make these two lines into
functions I can call directly from org-mode (and bind to keys), but for
now that's working well enough to be no bother.

Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves

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

end of thread, other threads:[~2010-09-13 18:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-01 20:26 [Bug] html-export mangels mailto: links Achim Gratz
2010-09-02  6:35 ` [PATCH] " Noorul Islam K M
2010-09-02 15:33   ` [Accepted] " Bastien Guerry
2010-09-02 15:35   ` [PATCH] " Bastien
2010-09-12 18:29     ` Achim Gratz
2010-09-12 19:02       ` David Maus
2010-09-12 19:23         ` Achim Gratz
2010-09-12 19:29           ` Eric S Fraga
2010-09-12 19:36             ` Achim Gratz
2010-09-13  1:24               ` Nick Dokos
2010-09-13  4:56                 ` Achim Gratz
2010-09-13 18:34                   ` Achim Gratz

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.