emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Broken CUSTOMID links
@ 2010-11-05 17:53 Jambunathan K
  2010-11-06 19:36 ` Carsten Dominik
  0 siblings, 1 reply; 8+ messages in thread
From: Jambunathan K @ 2010-11-05 17:53 UTC (permalink / raw)
  To: emacs-orgmode


Note the 'H:1' in options line. Export this to HTML. Note that CUSTOMID
link is broken. A snippet of relevant HTML section is attached
below. 

Change 'H:1' to 'H:3' note that there is no more brokenness. 

Possible root cause: When headlines are turned to list 'extra-targets'
are not identified correctly.

(This bug is unrelated to any of the previous internal link bugs that I
have reported)

# Input file

#+OPTIONS:   H:1

* Links
** Targets
   
*** Fuzzy Target
    
*** Target with CUSTOMID
    :PROPERTIES:
    :CUSTOM_ID: aabbccddeeff
    :END:
    
*** Dedicated Target
#   <<Dedicated Target>>    
    
*** <<<Radioed Target>>>
    
** References

*** References to Fuzzy Target
    This is a link to [[Fuzzy Target]].
    
*** References to CUSTOMID links
    This link to  [[#aabbccddeeff][CUSTOMID Target]] is broken.
    
*** References to Dedicated Target
    There is a link to nodesc [[Dedicated Target]] here. There is a link
    to [[Dedicated%20Target][Jump to Dedicated Target]] here.
    
*** References to Radioed Links
    This section has references to Radioed Target. One more reference
    to Radioed Target.



#+begin_src html
  <!-- Headline defined here -->
  <ul>
    <li id="sec-1_1_2">
      <a name="sec-1_1_2" id="sec-1_1_2">
      </a>
      Target with CUSTOMID 
      <br/>
    </li>
  </ul>
  
  <!-- Headline referenced here   -->
  <ul>
    <li id="sec-1_2_2">
      References to CUSTOMID links 
      <br/>
      This link to  
      <a href="#aabbccddeeff">
        CUSTOMID Target
      </a>
      is broken.
    </li>
  </ul>
#+end_src


Jambunathan K.

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

* Re: Broken CUSTOMID links
  2010-11-05 17:53 Broken CUSTOMID links Jambunathan K
@ 2010-11-06 19:36 ` Carsten Dominik
  2010-11-08 13:39   ` [PATCH 2/2] Fix broken CUSTOM_ID links Jambunathan K
  0 siblings, 1 reply; 8+ messages in thread
From: Carsten Dominik @ 2010-11-06 19:36 UTC (permalink / raw)
  To: Jambunathan K; +Cc: emacs-orgmode


On Nov 5, 2010, at 6:53 PM, Jambunathan K wrote:

>
> Note the 'H:1' in options line. Export this to HTML. Note that  
> CUSTOMID
> link is broken. A snippet of relevant HTML section is attached
> below.
>
> Change 'H:1' to 'H:3' note that there is no more brokenness.
>
> Possible root cause: When headlines are turned to list 'extra-targets'
> are not identified correctly.

That is correct - Org does not assign IDs or names to list items,
so it has no place to link to.  This could probably be fixed - anyone  
would
like to fix this?

- Carsten

>
> (This bug is unrelated to any of the previous internal link bugs  
> that I
> have reported)
>
> # Input file
>
> #+OPTIONS:   H:1
>
> * Links
> ** Targets
>
> *** Fuzzy Target
>
> *** Target with CUSTOMID
>   :PROPERTIES:
>   :CUSTOM_ID: aabbccddeeff
>   :END:
>
> *** Dedicated Target
> #   <<Dedicated Target>>
>
> *** <<<Radioed Target>>>
>
> ** References
>
> *** References to Fuzzy Target
>   This is a link to [[Fuzzy Target]].
>
> *** References to CUSTOMID links
>   This link to  [[#aabbccddeeff][CUSTOMID Target]] is broken.
>
> *** References to Dedicated Target
>   There is a link to nodesc [[Dedicated Target]] here. There is a link
>   to [[Dedicated%20Target][Jump to Dedicated Target]] here.
>
> *** References to Radioed Links
>   This section has references to Radioed Target. One more reference
>   to Radioed Target.
>
>
>
> #+begin_src html
> <!-- Headline defined here -->
> <ul>
>   <li id="sec-1_1_2">
>     <a name="sec-1_1_2" id="sec-1_1_2">
>     </a>
>     Target with CUSTOMID
>     <br/>
>   </li>
> </ul>
>
> <!-- Headline referenced here   -->
> <ul>
>   <li id="sec-1_2_2">
>     References to CUSTOMID links
>     <br/>
>     This link to
>     <a href="#aabbccddeeff">
>       CUSTOMID Target
>     </a>
>     is broken.
>   </li>
> </ul>
> #+end_src
>
>
> Jambunathan K.
>
> _______________________________________________
> 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] 8+ messages in thread

* [PATCH 2/2] Fix broken CUSTOM_ID links
  2010-11-06 19:36 ` Carsten Dominik
@ 2010-11-08 13:39   ` Jambunathan K
  2010-11-12 15:50     ` Carsten Dominik
  0 siblings, 1 reply; 8+ messages in thread
From: Jambunathan K @ 2010-11-08 13:39 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

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


Carsten

> On Nov 5, 2010, at 6:53 PM, Jambunathan K wrote:
>
>>
>> Note the 'H:1' in options line. Export this to HTML. Note that
>> CUSTOMID
>> link is broken. A snippet of relevant HTML section is attached
>> below.
>>
>> Change 'H:1' to 'H:3' note that there is no more brokenness.
>>
>> Possible root cause: When headlines are turned to list 'extra-targets'
>> are not identified correctly.
>
> That is correct - Org does not assign IDs or names to list items,
> so it has no place to link to.  This could probably be fixed - anyone
> would
> like to fix this?
>

I am attaching a patch. Hope it does the right thing.


[-- Attachment #2: Input Org File --]
[-- Type: text/plain, Size: 1014 bytes --]

#+OPTIONS:   H:1

* Links
** Targets
   
*** Fuzzy Target
    
    One
    
    Two
    
    Three
    
    Four 
    
    Five
    
    
*** Target with CUSTOMID
    :PROPERTIES:
    :CUSTOM_ID: aabbccddeeff
    :END:
    
    One
    
    Two
    
    Three
    
    Four 
    
    Five

    
*** Dedicated Target
#   <<Dedicated Target>>    
    
    One
    
    Two
    
    Three
    
    Four 
    
    Five

    
*** <<<Radioed Target>>>
    
    One
    
    Two
    
    Three
    
    Four 
    
    Five
    
** References

*** References to Fuzzy Target
    This is a link to [[Fuzzy Target]].
    
*** References to CUSTOMID links
    This link to  [[#aabbccddeeff][CUSTOMID Target]] is broken.
    
*** References to Dedicated Target
    There is a link to nodesc [[Dedicated Target]] here. There is a link
    to [[Dedicated%20Target][Jump to Dedicated Target]] here.
    
*** References to Radioed Links
    This section has references to Radioed Target. One more reference
    to Radioed Target.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: before-after.diff --]
[-- Type: text/x-patch, Size: 1134 bytes --]

--- before.html	2010-11-08 19:01:13.796875000 +0530
+++ after.html	2010-11-08 19:00:57.859375000 +0530
@@ -7,7 +7,7 @@
     <title>tmp</title>
     <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>
     <meta name="generator" content="Org-mode"/>
-    <meta name="generated" content="2010-11-08 18:57:46 "/>
+    <meta name="generated" content="2010-11-08 18:56:05 "/>
     <meta name="author" content="Jambunathan K"/>
     <meta name="description" content=""/>
     <meta name="keywords" content=""/>
@@ -101,7 +101,7 @@
 	      </li>
 	    </ul>
 	    <ul>
-	      <li id="sec-1_1_2"><a name="sec-1_1_2" id="sec-1_1_2"></a>Target with CUSTOMID <br/>
+	      <li id="aabbccddeeff"><a name="sec-1_1_2" id="sec-1_1_2"></a>Target with CUSTOMID <br/>
 
 	      <p>
 		One
@@ -200,7 +200,7 @@
 	<p class="author"> Author: Jambunathan K
 	<a href="mailto:kjambunathan@gmail.com">&lt;kjambunathan@gmail.com&gt;</a>
 	</p>
-	<p class="date"> Date: 2010-11-08 18:57:46 </p>
+	<p class="date"> Date: 2010-11-08 18:56:05 </p>
 	<p class="creator">HTML generated by org-mode 7.3 in emacs 23</p>
       </div>
     </div>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: patch --]
[-- Type: text/x-patch, Size: 1218 bytes --]

From 896a97a00c28206a940bb935406c60f19db3de15 Mon Sep 17 00:00:00 2001
From: Jambunathan K <kjambunathan@gmail.com>
Date: Mon, 8 Nov 2010 18:33:29 +0530
Subject: [PATCH 2/2] Fix broken CUSTOM_ID links to outline levels exported as lists.

(org-html-level-start): Modified.

TINYCHANGE.
---
 lisp/org-html.el |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
 mode change 100644 => 100755 lisp/org-html.el

diff --git a/lisp/org-html.el b/lisp/org-html.el
old mode 100644
new mode 100755
index 68fee5b..2aea978
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -2358,12 +2358,12 @@ When TITLE is nil, just close all open levels."
 		(progn
 		  (org-close-li)
 		  (if target
-		      (insert (format "<li id=\"%s\">" target) extra-targets title "<br/>\n")
+		      (insert (format "<li id=\"%s\">" remove) extra-targets title "<br/>\n")
 		    (insert "<li>" title "<br/>\n")))
 	      (aset org-levels-open (1- level) t)
 	      (org-close-par-maybe)
 	      (if target
-		  (insert (format "<ul>\n<li id=\"%s\">" target)
+		  (insert (format "<ul>\n<li id=\"%s\">" remove)
 			  extra-targets title "<br/>\n")
 		(insert "<ul>\n<li>" title "<br/>\n"))))
 	(aset org-levels-open (1- level) t)
-- 
1.7.2.3


[-- Attachment #5: Type: text/plain, Size: 1615 bytes --]


> - Carsten
>
>>
>> (This bug is unrelated to any of the previous internal link bugs
>> that I
>> have reported)
>>
>> # Input file
>>
>> #+OPTIONS:   H:1
>>
>> * Links
>> ** Targets
>>
>> *** Fuzzy Target
>>
>> *** Target with CUSTOMID
>>   :PROPERTIES:
>>   :CUSTOM_ID: aabbccddeeff
>>   :END:
>>
>> *** Dedicated Target
>> #   <<Dedicated Target>>
>>
>> *** <<<Radioed Target>>>
>>
>> ** References
>>
>> *** References to Fuzzy Target
>>   This is a link to [[Fuzzy Target]].
>>
>> *** References to CUSTOMID links
>>   This link to  [[#aabbccddeeff][CUSTOMID Target]] is broken.
>>
>> *** References to Dedicated Target
>>   There is a link to nodesc [[Dedicated Target]] here. There is a link
>>   to [[Dedicated%20Target][Jump to Dedicated Target]] here.
>>
>> *** References to Radioed Links
>>   This section has references to Radioed Target. One more reference
>>   to Radioed Target.
>>
>>
>>
>> #+begin_src html
>> <!-- Headline defined here -->
>> <ul>
>>   <li id="sec-1_1_2">
>>     <a name="sec-1_1_2" id="sec-1_1_2">
>>     </a>
>>     Target with CUSTOMID
>>     <br/>
>>   </li>
>> </ul>
>>
>> <!-- Headline referenced here   -->
>> <ul>
>>   <li id="sec-1_2_2">
>>     References to CUSTOMID links
>>     <br/>
>>     This link to
>>     <a href="#aabbccddeeff">
>>       CUSTOMID Target
>>     </a>
>>     is broken.
>>   </li>
>> </ul>
>> #+end_src
>>
>>
>> Jambunathan K.
>>
>> _______________________________________________
>> 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

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

* Re: [PATCH 2/2] Fix broken CUSTOM_ID links
  2010-11-08 13:39   ` [PATCH 2/2] Fix broken CUSTOM_ID links Jambunathan K
@ 2010-11-12 15:50     ` Carsten Dominik
  2010-11-17 13:26       ` Carsten Dominik
  0 siblings, 1 reply; 8+ messages in thread
From: Carsten Dominik @ 2010-11-12 15:50 UTC (permalink / raw)
  To: Jambunathan K; +Cc: emacs-orgmode

Hi Jambunata,

this looks good,  However, I would like you to make a change to the  
patch more more clarity.

Could you please write

    (or preferred target)

instead of

    remove

as the ID to be inserted?  Even though these are the same, the first  
version is a lot clearer.

With this change, I will accept the patch.

Thanks!

- Carsten

On Nov 8, 2010, at 7:39 AM, Jambunathan K wrote:

>
> Carsten
>
>> On Nov 5, 2010, at 6:53 PM, Jambunathan K wrote:
>>
>>>
>>> Note the 'H:1' in options line. Export this to HTML. Note that
>>> CUSTOMID
>>> link is broken. A snippet of relevant HTML section is attached
>>> below.
>>>
>>> Change 'H:1' to 'H:3' note that there is no more brokenness.
>>>
>>> Possible root cause: When headlines are turned to list 'extra- 
>>> targets'
>>> are not identified correctly.
>>
>> That is correct - Org does not assign IDs or names to list items,
>> so it has no place to link to.  This could probably be fixed - anyone
>> would
>> like to fix this?
>>
>
> I am attaching a patch. Hope it does the right thing.
>
> <tmp.org>--- before.html	2010-11-08 19:01:13.796875000 +0530
> +++ after.html	2010-11-08 19:00:57.859375000 +0530
> @@ -7,7 +7,7 @@
>     <title>tmp</title>
>     <meta http-equiv="Content-Type" content="text/ 
> html;charset=iso-8859-1"/>
>     <meta name="generator" content="Org-mode"/>
> -    <meta name="generated" content="2010-11-08 18:57:46 "/>
> +    <meta name="generated" content="2010-11-08 18:56:05 "/>
>     <meta name="author" content="Jambunathan K"/>
>     <meta name="description" content=""/>
>     <meta name="keywords" content=""/>
> @@ -101,7 +101,7 @@
> 	      </li>
> 	    </ul>
> 	    <ul>
> -	      <li id="sec-1_1_2"><a name="sec-1_1_2" id="sec-1_1_2"></ 
> a>Target with CUSTOMID <br/>
> +	      <li id="aabbccddeeff"><a name="sec-1_1_2" id="sec-1_1_2"></ 
> a>Target with CUSTOMID <br/>
>
> 	      <p>
> 		One
> @@ -200,7 +200,7 @@
> 	<p class="author"> Author: Jambunathan K
> 	<a  
> href="mailto:kjambunathan@gmail.com">&lt;kjambunathan@gmail.com&gt;</ 
> a>
> 	</p>
> -	<p class="date"> Date: 2010-11-08 18:57:46 </p>
> +	<p class="date"> Date: 2010-11-08 18:56:05 </p>
> 	<p class="creator">HTML generated by org-mode 7.3 in emacs 23</p>
>       </div>
>     </div>
> <0002-Fix-broken-CUSTOM_ID-links-to-outline-levels-exporte.patch>
>> - Carsten
>>
>>>
>>> (This bug is unrelated to any of the previous internal link bugs
>>> that I
>>> have reported)
>>>
>>> # Input file
>>>
>>> #+OPTIONS:   H:1
>>>
>>> * Links
>>> ** Targets
>>>
>>> *** Fuzzy Target
>>>
>>> *** Target with CUSTOMID
>>>  :PROPERTIES:
>>>  :CUSTOM_ID: aabbccddeeff
>>>  :END:
>>>
>>> *** Dedicated Target
>>> #   <<Dedicated Target>>
>>>
>>> *** <<<Radioed Target>>>
>>>
>>> ** References
>>>
>>> *** References to Fuzzy Target
>>>  This is a link to [[Fuzzy Target]].
>>>
>>> *** References to CUSTOMID links
>>>  This link to  [[#aabbccddeeff][CUSTOMID Target]] is broken.
>>>
>>> *** References to Dedicated Target
>>>  There is a link to nodesc [[Dedicated Target]] here. There is a  
>>> link
>>>  to [[Dedicated%20Target][Jump to Dedicated Target]] here.
>>>
>>> *** References to Radioed Links
>>>  This section has references to Radioed Target. One more reference
>>>  to Radioed Target.
>>>
>>>
>>>
>>> #+begin_src html
>>> <!-- Headline defined here -->
>>> <ul>
>>>  <li id="sec-1_1_2">
>>>    <a name="sec-1_1_2" id="sec-1_1_2">
>>>    </a>
>>>    Target with CUSTOMID
>>>    <br/>
>>>  </li>
>>> </ul>
>>>
>>> <!-- Headline referenced here   -->
>>> <ul>
>>>  <li id="sec-1_2_2">
>>>    References to CUSTOMID links
>>>    <br/>
>>>    This link to
>>>    <a href="#aabbccddeeff">
>>>      CUSTOMID Target
>>>    </a>
>>>    is broken.
>>>  </li>
>>> </ul>
>>> #+end_src
>>>
>>>
>>> Jambunathan K.
>>>
>>> _______________________________________________
>>> 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] 8+ messages in thread

* Re: [PATCH 2/2] Fix broken CUSTOM_ID links
  2010-11-12 15:50     ` Carsten Dominik
@ 2010-11-17 13:26       ` Carsten Dominik
  2010-11-17 15:22         ` [PATCH: RESUBMITTED] " Jambunathan K
  2010-11-17 15:22         ` Jambunathan K
  0 siblings, 2 replies; 8+ messages in thread
From: Carsten Dominik @ 2010-11-17 13:26 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode, Jambunathan K

Hi Jambunathan,

did you already react on this message?  I cannot seem to find your  
reply.

Thanks!

- Carsten

On Nov 12, 2010, at 4:50 PM, Carsten Dominik wrote:

> Hi Jambunata,
>
> this looks good,  However, I would like you to make a change to the  
> patch more more clarity.
>
> Could you please write
>
>   (or preferred target)
>
> instead of
>
>   remove
>
> as the ID to be inserted?  Even though these are the same, the first  
> version is a lot clearer.
>
> With this change, I will accept the patch.
>
> Thanks!
>
> - Carsten
>
> On Nov 8, 2010, at 7:39 AM, Jambunathan K wrote:
>
>>
>> Carsten
>>
>>> On Nov 5, 2010, at 6:53 PM, Jambunathan K wrote:
>>>
>>>>
>>>> Note the 'H:1' in options line. Export this to HTML. Note that
>>>> CUSTOMID
>>>> link is broken. A snippet of relevant HTML section is attached
>>>> below.
>>>>
>>>> Change 'H:1' to 'H:3' note that there is no more brokenness.
>>>>
>>>> Possible root cause: When headlines are turned to list 'extra- 
>>>> targets'
>>>> are not identified correctly.
>>>
>>> That is correct - Org does not assign IDs or names to list items,
>>> so it has no place to link to.  This could probably be fixed -  
>>> anyone
>>> would
>>> like to fix this?
>>>
>>
>> I am attaching a patch. Hope it does the right thing.
>>
>> <tmp.org>--- before.html	2010-11-08 19:01:13.796875000 +0530
>> +++ after.html	2010-11-08 19:00:57.859375000 +0530
>> @@ -7,7 +7,7 @@
>>    <title>tmp</title>
>>    <meta http-equiv="Content-Type" content="text/ 
>> html;charset=iso-8859-1"/>
>>    <meta name="generator" content="Org-mode"/>
>> -    <meta name="generated" content="2010-11-08 18:57:46 "/>
>> +    <meta name="generated" content="2010-11-08 18:56:05 "/>
>>    <meta name="author" content="Jambunathan K"/>
>>    <meta name="description" content=""/>
>>    <meta name="keywords" content=""/>
>> @@ -101,7 +101,7 @@
>> 	      </li>
>> 	    </ul>
>> 	    <ul>
>> -	      <li id="sec-1_1_2"><a name="sec-1_1_2" id="sec-1_1_2"></ 
>> a>Target with CUSTOMID <br/>
>> +	      <li id="aabbccddeeff"><a name="sec-1_1_2" id="sec-1_1_2"></ 
>> a>Target with CUSTOMID <br/>
>>
>> 	      <p>
>> 		One
>> @@ -200,7 +200,7 @@
>> 	<p class="author"> Author: Jambunathan K
>> 	<a  
>> href 
>> ="mailto:kjambunathan@gmail.com">&lt;kjambunathan@gmail.com&gt;</a>
>> 	</p>
>> -	<p class="date"> Date: 2010-11-08 18:57:46 </p>
>> +	<p class="date"> Date: 2010-11-08 18:56:05 </p>
>> 	<p class="creator">HTML generated by org-mode 7.3 in emacs 23</p>
>>      </div>
>>    </div>
>> <0002-Fix-broken-CUSTOM_ID-links-to-outline-levels-exporte.patch>
>>> - Carsten
>>>
>>>>
>>>> (This bug is unrelated to any of the previous internal link bugs
>>>> that I
>>>> have reported)
>>>>
>>>> # Input file
>>>>
>>>> #+OPTIONS:   H:1
>>>>
>>>> * Links
>>>> ** Targets
>>>>
>>>> *** Fuzzy Target
>>>>
>>>> *** Target with CUSTOMID
>>>> :PROPERTIES:
>>>> :CUSTOM_ID: aabbccddeeff
>>>> :END:
>>>>
>>>> *** Dedicated Target
>>>> #   <<Dedicated Target>>
>>>>
>>>> *** <<<Radioed Target>>>
>>>>
>>>> ** References
>>>>
>>>> *** References to Fuzzy Target
>>>> This is a link to [[Fuzzy Target]].
>>>>
>>>> *** References to CUSTOMID links
>>>> This link to  [[#aabbccddeeff][CUSTOMID Target]] is broken.
>>>>
>>>> *** References to Dedicated Target
>>>> There is a link to nodesc [[Dedicated Target]] here. There is a  
>>>> link
>>>> to [[Dedicated%20Target][Jump to Dedicated Target]] here.
>>>>
>>>> *** References to Radioed Links
>>>> This section has references to Radioed Target. One more reference
>>>> to Radioed Target.
>>>>
>>>>
>>>>
>>>> #+begin_src html
>>>> <!-- Headline defined here -->
>>>> <ul>
>>>> <li id="sec-1_1_2">
>>>>   <a name="sec-1_1_2" id="sec-1_1_2">
>>>>   </a>
>>>>   Target with CUSTOMID
>>>>   <br/>
>>>> </li>
>>>> </ul>
>>>>
>>>> <!-- Headline referenced here   -->
>>>> <ul>
>>>> <li id="sec-1_2_2">
>>>>   References to CUSTOMID links
>>>>   <br/>
>>>>   This link to
>>>>   <a href="#aabbccddeeff">
>>>>     CUSTOMID Target
>>>>   </a>
>>>>   is broken.
>>>> </li>
>>>> </ul>
>>>> #+end_src
>>>>
>>>>
>>>> Jambunathan K.
>>>>
>>>> _______________________________________________
>>>> 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] 8+ messages in thread

* [PATCH: RESUBMITTED] Fix broken CUSTOM_ID links
  2010-11-17 13:26       ` Carsten Dominik
  2010-11-17 15:22         ` [PATCH: RESUBMITTED] " Jambunathan K
@ 2010-11-17 15:22         ` Jambunathan K
  1 sibling, 0 replies; 8+ messages in thread
From: Jambunathan K @ 2010-11-17 15:22 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

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


Carsten

>> this looks good,  However, I would like you to make a change to the
>> patch more more clarity.
>>
>> Could you please write
>>
>>   (or preferred target)
>>
>> instead of
>>
>>   remove
>>
>> as the ID to be inserted?  Even though these are the same, the first
>> version is a lot clearer.
>>
>> With this change, I will accept the patch.

I have made the modifications requested by you. Reproducing the original
report for the sake of record.

Jambunathan K.



# Bug Description: Note the 'H:1' option. Search for 'broken' in the
# the below org file.

#+OPTIONS:   H:1

* Links
** Targets
   
*** Fuzzy Target
    
    One
    
    Two
    
    Three
    
    Four 
    
    Five
    
    
*** Target with CUSTOMID
    :PROPERTIES:
    :CUSTOM_ID: aabbccddeeff
    :END:
    
    One
    
    Two
    
    Three
    
    Four 
    
    Five

    
*** Dedicated Target
#   <<Dedicated Target>>    
    
    One
    
    Two
    
    Three
    
    Four 
    
    Five

    
*** <<<Radioed Target>>>
    
    One
    
    Two
    
    Three
    
    Four 
    
    Five
    
** References

*** References to Fuzzy Target
    This is a link to [[Fuzzy Target]].
    
*** References to CUSTOMID links
    This link to  [[#aabbccddeeff][CUSTOMID Target]] is broken.
    
*** References to Dedicated Target
    There is a link to nodesc [[Dedicated Target]] here. There is a link
    to [[Dedicated%20Target][Jump to Dedicated Target]] here.
    
*** References to Radioed Links
    This section has references to Radioed Target. One more reference
    to Radioed Target.

Verification:

bash-3.2$ diff -pub customid-before.html customid-after.html 
--- customid-before.html	2010-11-17 20:36:20.140625000 +0530
+++ customid-after.html	2010-11-17 20:39:45.234375000 +0530
@@ -1,3 +1,4 @@
+
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml"
@@ -6,7 +7,7 @@
     <title>customid</title>
     <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>
     <meta name="generator" content="Org-mode"/>
-    <meta name="generated" content="2010-11-17 20:35:58 "/>
+    <meta name="generated" content="2010-11-17 20:39:11 "/>
     <meta name="author" content="Jambunathan K"/>
     <meta name="description" content=""/>
     <meta name="keywords" content=""/>
@@ -100,7 +101,7 @@
 	      </li>
 	    </ul>
 	    <ul>
-	      <li id="sec-1_1_2"><a name="sec-1_1_2" id="sec-1_1_2"></a>Target with CUSTOMID <br/>
+	      <li id="aabbccddeeff"><a name="sec-1_1_2" id="sec-1_1_2"></a>Target with CUSTOMID <br/>
 
 	      <p>
 		One
@@ -199,7 +200,7 @@
 	<p class="author"> Author: Jambunathan K
 	<a href="mailto:kjambunathan@gmail.com">&lt;kjambunathan@gmail.com&gt;</a>
 	</p>
-	<p class="date"> Date: 2010-11-17 20:35:58 </p>
+	<p class="date"> Date: 2010-11-17 20:39:11 </p>
 	<p class="creator">HTML generated by org-mode 7.3 in emacs 23</p>
       </div>
     </div>

Attachments:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: customid.patch --]
[-- Type: text/x-patch, Size: 1218 bytes --]

From 896a97a00c28206a940bb935406c60f19db3de15 Mon Sep 17 00:00:00 2001
From: Jambunathan K <kjambunathan@gmail.com>
Date: Mon, 8 Nov 2010 18:33:29 +0530
Subject: [PATCH 2/2] Fix broken CUSTOM_ID links to outline levels exported as lists.

(org-html-level-start): Modified.

TINYCHANGE.
---
 lisp/org-html.el |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
 mode change 100644 => 100755 lisp/org-html.el

diff --git a/lisp/org-html.el b/lisp/org-html.el
old mode 100644
new mode 100755
index 68fee5b..2aea978
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -2358,12 +2358,12 @@ When TITLE is nil, just close all open levels."
 		(progn
 		  (org-close-li)
 		  (if target
-		      (insert (format "<li id=\"%s\">" target) extra-targets title "<br/>\n")
+		      (insert (format "<li id=\"%s\">" remove) extra-targets title "<br/>\n")
 		    (insert "<li>" title "<br/>\n")))
 	      (aset org-levels-open (1- level) t)
 	      (org-close-par-maybe)
 	      (if target
-		  (insert (format "<ul>\n<li id=\"%s\">" target)
+		  (insert (format "<ul>\n<li id=\"%s\">" remove)
 			  extra-targets title "<br/>\n")
 		(insert "<ul>\n<li>" title "<br/>\n"))))
 	(aset org-levels-open (1- level) t)
-- 
1.7.2.3


[-- 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] 8+ messages in thread

* [PATCH: RESUBMITTED] Fix broken CUSTOM_ID links
  2010-11-17 13:26       ` Carsten Dominik
@ 2010-11-17 15:22         ` Jambunathan K
  2010-11-21  8:45           ` Carsten Dominik
  2010-11-17 15:22         ` Jambunathan K
  1 sibling, 1 reply; 8+ messages in thread
From: Jambunathan K @ 2010-11-17 15:22 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

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


Carsten

>> this looks good,  However, I would like you to make a change to the
>> patch more more clarity.
>>
>> Could you please write
>>
>>   (or preferred target)
>>
>> instead of
>>
>>   remove
>>
>> as the ID to be inserted?  Even though these are the same, the first
>> version is a lot clearer.
>>
>> With this change, I will accept the patch.

My bad ... Ignore my previous mail. I accidentally attached the older
version that was lurking in my work area. 

Here is the newer version.

I have made the modifications requested by you. Reproducing the original
report for the sake of record.

Jambunathan K.



# Bug Description: Note the 'H:1' option. Search for 'broken' in the
# the below org file.

#+OPTIONS:   H:1

* Links
** Targets
   
*** Fuzzy Target
    
    One
    
    Two
    
    Three
    
    Four 
    
    Five
    
    
*** Target with CUSTOMID
    :PROPERTIES:
    :CUSTOM_ID: aabbccddeeff
    :END:
    
    One
    
    Two
    
    Three
    
    Four 
    
    Five

    
*** Dedicated Target
#   <<Dedicated Target>>    
    
    One
    
    Two
    
    Three
    
    Four 
    
    Five

    
*** <<<Radioed Target>>>
    
    One
    
    Two
    
    Three
    
    Four 
    
    Five
    
** References

*** References to Fuzzy Target
    This is a link to [[Fuzzy Target]].
    
*** References to CUSTOMID links
    This link to  [[#aabbccddeeff][CUSTOMID Target]] is broken.
    
*** References to Dedicated Target
    There is a link to nodesc [[Dedicated Target]] here. There is a link
    to [[Dedicated%20Target][Jump to Dedicated Target]] here.
    
*** References to Radioed Links
    This section has references to Radioed Target. One more reference
    to Radioed Target.

Verification:

bash-3.2$ diff -pub customid-before.html customid-after.html 
--- customid-before.html	2010-11-17 20:36:20.140625000 +0530
+++ customid-after.html	2010-11-17 20:39:45.234375000 +0530
@@ -1,3 +1,4 @@
+
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml"
@@ -6,7 +7,7 @@
     <title>customid</title>
     <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>
     <meta name="generator" content="Org-mode"/>
-    <meta name="generated" content="2010-11-17 20:35:58 "/>
+    <meta name="generated" content="2010-11-17 20:39:11 "/>
     <meta name="author" content="Jambunathan K"/>
     <meta name="description" content=""/>
     <meta name="keywords" content=""/>
@@ -100,7 +101,7 @@
 	      </li>
 	    </ul>
 	    <ul>
-	      <li id="sec-1_1_2"><a name="sec-1_1_2" id="sec-1_1_2"></a>Target with CUSTOMID <br/>
+	      <li id="aabbccddeeff"><a name="sec-1_1_2" id="sec-1_1_2"></a>Target with CUSTOMID <br/>
 
 	      <p>
 		One
@@ -199,7 +200,7 @@
 	<p class="author"> Author: Jambunathan K
 	<a href="mailto:kjambunathan@gmail.com">&lt;kjambunathan@gmail.com&gt;</a>
 	</p>
-	<p class="date"> Date: 2010-11-17 20:35:58 </p>
+	<p class="date"> Date: 2010-11-17 20:39:11 </p>
 	<p class="creator">HTML generated by org-mode 7.3 in emacs 23</p>
       </div>
     </div>

Attachments:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: customid.patch --]
[-- Type: text/x-patch, Size: 1757 bytes --]

From 7e18408ee3250ce829dba3585ac83d13dcc11bb2 Mon Sep 17 00:00:00 2001
From: Jambunathan K <kjambunathan@gmail.com>
Date: Wed, 17 Nov 2010 20:34:17 +0530
Subject: [PATCH 2/2] Fix broken CUSTOM_ID links to outline levels exported as lists

(org-html-level-start): Modified.

TINYCHANGE.
---
 lisp/org-html.el |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/org-html.el b/lisp/org-html.el
index 4305af2..d1fe06d 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -2320,10 +2320,9 @@ When TITLE is nil, just close all open levels."
 	 (extra-class (and title (org-get-text-property-any 0 'html-container-class title)))
 	 (preferred (and target
 			 (cdr (assoc target org-export-preferred-target-alist))))
-	 (remove (or preferred target))
 	 (l org-level-max)
 	 snumber snu href suffix)
-    (setq extra-targets (remove remove extra-targets))
+    (setq extra-targets (remove (or preferred target) extra-targets))
     (setq extra-targets
 	  (mapconcat (lambda (x)
 		       (if (org-uuidgen-p x) (setq x (concat "ID-" x)))
@@ -2362,12 +2361,13 @@ When TITLE is nil, just close all open levels."
 		(progn
 		  (org-close-li)
 		  (if target
-		      (insert (format "<li id=\"%s\">" target) extra-targets title "<br/>\n")
+		      (insert (format "<li id=\"%s\">" (or preferred target))
+			      extra-targets title "<br/>\n")
 		    (insert "<li>" title "<br/>\n")))
 	      (aset org-levels-open (1- level) t)
 	      (org-close-par-maybe)
 	      (if target
-		  (insert (format "<ul>\n<li id=\"%s\">" target)
+		  (insert (format "<ul>\n<li id=\"%s\">" (or preferred target))
 			  extra-targets title "<br/>\n")
 		(insert "<ul>\n<li>" title "<br/>\n"))))
 	(aset org-levels-open (1- level) t)
-- 
1.7.2.3


[-- 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] 8+ messages in thread

* Re: [PATCH: RESUBMITTED] Fix broken CUSTOM_ID links
  2010-11-17 15:22         ` [PATCH: RESUBMITTED] " Jambunathan K
@ 2010-11-21  8:45           ` Carsten Dominik
  0 siblings, 0 replies; 8+ messages in thread
From: Carsten Dominik @ 2010-11-21  8:45 UTC (permalink / raw)
  To: Jambunathan K; +Cc: emacs-orgmode

Applied, thanks!

- Carsten

On Nov 17, 2010, at 4:22 PM, Jambunathan K wrote:

>
> Carsten
>
>>> this looks good,  However, I would like you to make a change to the
>>> patch more more clarity.
>>>
>>> Could you please write
>>>
>>>  (or preferred target)
>>>
>>> instead of
>>>
>>>  remove
>>>
>>> as the ID to be inserted?  Even though these are the same, the first
>>> version is a lot clearer.
>>>
>>> With this change, I will accept the patch.
>
> My bad ... Ignore my previous mail. I accidentally attached the older
> version that was lurking in my work area.
>
> Here is the newer version.
>
> I have made the modifications requested by you. Reproducing the  
> original
> report for the sake of record.
>
> Jambunathan K.
>
>
>
> # Bug Description: Note the 'H:1' option. Search for 'broken' in the
> # the below org file.
>
> #+OPTIONS:   H:1
>
> * Links
> ** Targets
>
> *** Fuzzy Target
>
>    One
>
>    Two
>
>    Three
>
>    Four
>
>    Five
>
>
> *** Target with CUSTOMID
>    :PROPERTIES:
>    :CUSTOM_ID: aabbccddeeff
>    :END:
>
>    One
>
>    Two
>
>    Three
>
>    Four
>
>    Five
>
>
> *** Dedicated Target
> #   <<Dedicated Target>>
>
>    One
>
>    Two
>
>    Three
>
>    Four
>
>    Five
>
>
> *** <<<Radioed Target>>>
>
>    One
>
>    Two
>
>    Three
>
>    Four
>
>    Five
>
> ** References
>
> *** References to Fuzzy Target
>    This is a link to [[Fuzzy Target]].
>
> *** References to CUSTOMID links
>    This link to  [[#aabbccddeeff][CUSTOMID Target]] is broken.
>
> *** References to Dedicated Target
>    There is a link to nodesc [[Dedicated Target]] here. There is a  
> link
>    to [[Dedicated%20Target][Jump to Dedicated Target]] here.
>
> *** References to Radioed Links
>    This section has references to Radioed Target. One more reference
>    to Radioed Target.
>
> Verification:
>
> bash-3.2$ diff -pub customid-before.html customid-after.html
> --- customid-before.html	2010-11-17 20:36:20.140625000 +0530
> +++ customid-after.html	2010-11-17 20:39:45.234375000 +0530
> @@ -1,3 +1,4 @@
> +
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml"
> @@ -6,7 +7,7 @@
>     <title>customid</title>
>     <meta http-equiv="Content-Type" content="text/ 
> html;charset=iso-8859-1"/>
>     <meta name="generator" content="Org-mode"/>
> -    <meta name="generated" content="2010-11-17 20:35:58 "/>
> +    <meta name="generated" content="2010-11-17 20:39:11 "/>
>     <meta name="author" content="Jambunathan K"/>
>     <meta name="description" content=""/>
>     <meta name="keywords" content=""/>
> @@ -100,7 +101,7 @@
> 	      </li>
> 	    </ul>
> 	    <ul>
> -	      <li id="sec-1_1_2"><a name="sec-1_1_2" id="sec-1_1_2"></ 
> a>Target with CUSTOMID <br/>
> +	      <li id="aabbccddeeff"><a name="sec-1_1_2" id="sec-1_1_2"></ 
> a>Target with CUSTOMID <br/>
>
> 	      <p>
> 		One
> @@ -199,7 +200,7 @@
> 	<p class="author"> Author: Jambunathan K
> 	<a  
> href="mailto:kjambunathan@gmail.com">&lt;kjambunathan@gmail.com&gt;</ 
> a>
> 	</p>
> -	<p class="date"> Date: 2010-11-17 20:35:58 </p>
> +	<p class="date"> Date: 2010-11-17 20:39:11 </p>
> 	<p class="creator">HTML generated by org-mode 7.3 in emacs 23</p>
>       </div>
>     </div>
>
> Attachments:
>
> From 7e18408ee3250ce829dba3585ac83d13dcc11bb2 Mon Sep 17 00:00:00 2001
> From: Jambunathan K <kjambunathan@gmail.com>
> Date: Wed, 17 Nov 2010 20:34:17 +0530
> Subject: [PATCH 2/2] Fix broken CUSTOM_ID links to outline levels  
> exported as lists
>
> (org-html-level-start): Modified.
>
> TINYCHANGE.
> ---
> lisp/org-html.el |    8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/lisp/org-html.el b/lisp/org-html.el
> index 4305af2..d1fe06d 100644
> --- a/lisp/org-html.el
> +++ b/lisp/org-html.el
> @@ -2320,10 +2320,9 @@ When TITLE is nil, just close all open levels."
> 	 (extra-class (and title (org-get-text-property-any 0 'html- 
> container-class title)))
> 	 (preferred (and target
> 			 (cdr (assoc target org-export-preferred-target-alist))))
> -	 (remove (or preferred target))
> 	 (l org-level-max)
> 	 snumber snu href suffix)
> -    (setq extra-targets (remove remove extra-targets))
> +    (setq extra-targets (remove (or preferred target) extra-targets))
>     (setq extra-targets
> 	  (mapconcat (lambda (x)
> 		       (if (org-uuidgen-p x) (setq x (concat "ID-" x)))
> @@ -2362,12 +2361,13 @@ When TITLE is nil, just close all open  
> levels."
> 		(progn
> 		  (org-close-li)
> 		  (if target
> -		      (insert (format "<li id=\"%s\">" target) extra-targets  
> title "<br/>\n")
> +		      (insert (format "<li id=\"%s\">" (or preferred target))
> +			      extra-targets title "<br/>\n")
> 		    (insert "<li>" title "<br/>\n")))
> 	      (aset org-levels-open (1- level) t)
> 	      (org-close-par-maybe)
> 	      (if target
> -		  (insert (format "<ul>\n<li id=\"%s\">" target)
> +		  (insert (format "<ul>\n<li id=\"%s\">" (or preferred target))
> 			  extra-targets title "<br/>\n")
> 		(insert "<ul>\n<li>" title "<br/>\n"))))
> 	(aset org-levels-open (1- level) t)
> -- 
> 1.7.2.3
>

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

end of thread, other threads:[~2010-11-21  8:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-05 17:53 Broken CUSTOMID links Jambunathan K
2010-11-06 19:36 ` Carsten Dominik
2010-11-08 13:39   ` [PATCH 2/2] Fix broken CUSTOM_ID links Jambunathan K
2010-11-12 15:50     ` Carsten Dominik
2010-11-17 13:26       ` Carsten Dominik
2010-11-17 15:22         ` [PATCH: RESUBMITTED] " Jambunathan K
2010-11-21  8:45           ` Carsten Dominik
2010-11-17 15:22         ` Jambunathan K

Code repositories for project(s) associated with this 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).