emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [Patch] file protocol in HTML links
@ 2010-05-26  9:37 Sebastian Rose
  2010-05-26  9:51 ` Sebastian Rose
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Rose @ 2010-05-26  9:37 UTC (permalink / raw)
  To: Emacs-orgmode mailing list

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

The appended patch removes the protocol part from link URIs, if the
protocol is file. Neccessary, to show images again and make links work.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-diff, Size: 384 bytes --]

diff --git a/lisp/org-html.el b/lisp/org-html.el
index d5f4775..8f7d0f3 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -640,7 +640,7 @@ MAY-INLINE-P allows inlining it as an image."
 	 (setq thefile 
 	    (let
 	       ((str (org-export-html-format-href thefile)))
-	       (if type
+	       (if (and type (not (string= "file" type)))
 		  (concat type ":" str)
 		  str)))

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




Best wishes

    Sebastian

[-- Attachment #4: 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] 5+ messages in thread

* Re: [Patch] file protocol in HTML links
  2010-05-26  9:37 [Patch] file protocol in HTML links Sebastian Rose
@ 2010-05-26  9:51 ` Sebastian Rose
  2010-05-27  8:57   ` Carsten Dominik
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Rose @ 2010-05-26  9:51 UTC (permalink / raw)
  To: Emacs-orgmode mailing list

Sebastian Rose <sebastian_rose@gmx.de> writes:
> The appended patch removes the protocol part from link URIs, if the
> protocol is file. Neccessary, to show images again and make links work.
>
>
> diff --git a/lisp/org-html.el b/lisp/org-html.el
> index d5f4775..8f7d0f3 100644
> --- a/lisp/org-html.el
> +++ b/lisp/org-html.el
> @@ -640,7 +640,7 @@ MAY-INLINE-P allows inlining it as an image."
>  	 (setq thefile 
>  	    (let
>  	       ((str (org-export-html-format-href thefile)))
> -	       (if type
> +	       (if (and type (not (string= "file" type)))
>  		  (concat type ":" str)
>  		  str)))

Hi,


I just pulled and saw it was fixed already - but in a wrong way, I
believe. How  about an absolute link URL with a different protocol like
gopher?

I think adding the protocol should be done, if the protocol is different
from that used to deliver the file which contains the link.

There's no need to add the protocol to an absolute path.



  Sebastian

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

* Re: [Patch] file protocol in HTML links
  2010-05-26  9:51 ` Sebastian Rose
@ 2010-05-27  8:57   ` Carsten Dominik
  2010-05-27 21:34     ` Sebastian Rose
  0 siblings, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2010-05-27  8:57 UTC (permalink / raw)
  To: Sebastian Rose; +Cc: Emacs-orgmode mailing list

Hi Sebastian,

can you then please make a patch that reverts the incorrect fix and  
installs your better version?  Against the current master?

Thanks!

- Carsten

On May 26, 2010, at 11:51 AM, Sebastian Rose wrote:

> Sebastian Rose <sebastian_rose@gmx.de> writes:
>> The appended patch removes the protocol part from link URIs, if the
>> protocol is file. Neccessary, to show images again and make links  
>> work.
>>
>>
>> diff --git a/lisp/org-html.el b/lisp/org-html.el
>> index d5f4775..8f7d0f3 100644
>> --- a/lisp/org-html.el
>> +++ b/lisp/org-html.el
>> @@ -640,7 +640,7 @@ MAY-INLINE-P allows inlining it as an image."
>> 	 (setq thefile
>> 	    (let
>> 	       ((str (org-export-html-format-href thefile)))
>> -	       (if type
>> +	       (if (and type (not (string= "file" type)))
>> 		  (concat type ":" str)
>> 		  str)))
>
> Hi,
>
>
> I just pulled and saw it was fixed already - but in a wrong way, I
> believe. How  about an absolute link URL with a different protocol  
> like
> gopher?
>
> I think adding the protocol should be done, if the protocol is  
> different
> from that used to deliver the file which contains the link.
>
> There's no need to add the protocol to an absolute path.
>
>
>
>  Sebastian
>
> _______________________________________________
> 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

- Carsten

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

* Re: [Patch] file protocol in HTML links
  2010-05-27  8:57   ` Carsten Dominik
@ 2010-05-27 21:34     ` Sebastian Rose
  2010-05-27 21:51       ` Carsten Dominik
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Rose @ 2010-05-27 21:34 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Emacs-orgmode mailing list

Carsten Dominik <carsten.dominik@gmail.com> writes:
> Hi Sebastian,
>
> can you then please make a patch that reverts the incorrect fix and installs
> your better version?  Against the current master?


Hi Carsten,


I saw you applied the patch.  There is nothing I'd want to remove in the
code, as it is indeed OK to prepend the protocol part to all the other
URIs.
Is there still something I should do?


   Sebastian


> Thanks!
>
> - Carsten
>
> On May 26, 2010, at 11:51 AM, Sebastian Rose wrote:
>
>> Sebastian Rose <sebastian_rose@gmx.de> writes:
>>> The appended patch removes the protocol part from link URIs, if the
>>> protocol is file. Neccessary, to show images again and make links work.
>>>
>>>
>>> diff --git a/lisp/org-html.el b/lisp/org-html.el
>>> index d5f4775..8f7d0f3 100644
>>> --- a/lisp/org-html.el
>>> +++ b/lisp/org-html.el
>>> @@ -640,7 +640,7 @@ MAY-INLINE-P allows inlining it as an image."
>>> 	 (setq thefile
>>> 	    (let
>>> 	       ((str (org-export-html-format-href thefile)))
>>> -	       (if type
>>> +	       (if (and type (not (string= "file" type)))
>>> 		  (concat type ":" str)
>>> 		  str)))
>>
>> Hi,
>>
>>
>> I just pulled and saw it was fixed already - but in a wrong way, I
>> believe. How  about an absolute link URL with a different protocol like
>> gopher?
>>
>> I think adding the protocol should be done, if the protocol is different
>> from that used to deliver the file which contains the link.
>>
>> There's no need to add the protocol to an absolute path.
>>
>>
>>
>>  Sebastian
>>
>> _______________________________________________
>> 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
>
> - Carsten

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

* Re: [Patch] file protocol in HTML links
  2010-05-27 21:34     ` Sebastian Rose
@ 2010-05-27 21:51       ` Carsten Dominik
  0 siblings, 0 replies; 5+ messages in thread
From: Carsten Dominik @ 2010-05-27 21:51 UTC (permalink / raw)
  To: Sebastian Rose; +Cc: Emacs-orgmode mailing list


On May 27, 2010, at 11:34 PM, Sebastian Rose wrote:

> Carsten Dominik <carsten.dominik@gmail.com> writes:
>> Hi Sebastian,
>>
>> can you then please make a patch that reverts the incorrect fix and  
>> installs
>> your better version?  Against the current master?
>
>
> Hi Carsten,
>
>
> I saw you applied the patch.  There is nothing I'd want to remove in  
> the
> code, as it is indeed OK to prepend the protocol part to all the other
> URIs.
> Is there still something I should do?

Inly if there are further bug reports.  Thanks for looking into this.

- Carsten


>
>
>   Sebastian
>
>
>> Thanks!
>>
>> - Carsten
>>
>> On May 26, 2010, at 11:51 AM, Sebastian Rose wrote:
>>
>>> Sebastian Rose <sebastian_rose@gmx.de> writes:
>>>> The appended patch removes the protocol part from link URIs, if the
>>>> protocol is file. Neccessary, to show images again and make links  
>>>> work.
>>>>
>>>>
>>>> diff --git a/lisp/org-html.el b/lisp/org-html.el
>>>> index d5f4775..8f7d0f3 100644
>>>> --- a/lisp/org-html.el
>>>> +++ b/lisp/org-html.el
>>>> @@ -640,7 +640,7 @@ MAY-INLINE-P allows inlining it as an image."
>>>> 	 (setq thefile
>>>> 	    (let
>>>> 	       ((str (org-export-html-format-href thefile)))
>>>> -	       (if type
>>>> +	       (if (and type (not (string= "file" type)))
>>>> 		  (concat type ":" str)
>>>> 		  str)))
>>>
>>> Hi,
>>>
>>>
>>> I just pulled and saw it was fixed already - but in a wrong way, I
>>> believe. How  about an absolute link URL with a different protocol  
>>> like
>>> gopher?
>>>
>>> I think adding the protocol should be done, if the protocol is  
>>> different
>>> from that used to deliver the file which contains the link.
>>>
>>> There's no need to add the protocol to an absolute path.
>>>
>>>
>>>
>>> Sebastian
>>>
>>> _______________________________________________
>>> 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
>>
>> - Carsten

- Carsten

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

end of thread, other threads:[~2010-05-27 21:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-26  9:37 [Patch] file protocol in HTML links Sebastian Rose
2010-05-26  9:51 ` Sebastian Rose
2010-05-27  8:57   ` Carsten Dominik
2010-05-27 21:34     ` Sebastian Rose
2010-05-27 21:51       ` Carsten Dominik

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