emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] [PATCH: RESUBMITTED] Fix broken CUSTOM_ID links


From: Jambunathan K
Subject: [Orgmode] [PATCH: RESUBMITTED] Fix broken CUSTOM_ID links
Date: Wed, 17 Nov 2010 20:52:51 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (windows-nt)

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:address@hidden";>&lt;address@hidden&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 896a97a00c28206a940bb935406c60f19db3de15 Mon Sep 17 00:00:00 2001
From: Jambunathan K <address@hidden>
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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]