From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: [PATCH 2/2] Fix broken CUSTOM_ID links Date: Mon, 08 Nov 2010 19:09:34 +0530 Message-ID: <81oca0rl2h.fsf_-_@gmail.com> References: <81mxpnwtah.fsf@gmail.com> <43EFAC24-FD29-4565-AB08-0C6F2AF6CBA5@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from [140.186.70.92] (port=52802 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PFRwv-0005Ti-OY for emacs-orgmode@gnu.org; Mon, 08 Nov 2010 08:39:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PFRwu-0003Xs-0V for emacs-orgmode@gnu.org; Mon, 08 Nov 2010 08:39:53 -0500 Received: from mail-yw0-f41.google.com ([209.85.213.41]:36711) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PFRwt-0003Xd-T5 for emacs-orgmode@gnu.org; Mon, 08 Nov 2010 08:39:51 -0500 Received: by ywl5 with SMTP id 5so4149422ywl.0 for ; Mon, 08 Nov 2010 05:39:51 -0800 (PST) In-Reply-To: <43EFAC24-FD29-4565-AB08-0C6F2AF6CBA5@gmail.com> (Carsten Dominik's message of "Sat, 6 Nov 2010 15:36:42 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Carsten Dominik Cc: emacs-orgmode@gnu.org --=-=-= 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. --=-=-= Content-Disposition: attachment; filename=tmp.org Content-Description: Input 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 # <> One Two Three Four Five *** <<>> 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. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=changes.html.diff Content-Transfer-Encoding: 8bit Content-Description: before-after.diff --- before.html 2010-11-08 19:01:13.796875000 +0530 +++ after.html 2010-11-08 19:00:57.859375000 +0530 @@ -7,7 +7,7 @@ tmp - + @@ -101,7 +101,7 @@
    -
  • Target with CUSTOMID
    +
  • Target with CUSTOMID

    One @@ -200,7 +200,7 @@

    Author: Jambunathan K <kjambunathan@gmail.com>

    -

    Date: 2010-11-08 18:57:46

    +

    Date: 2010-11-08 18:56:05

    HTML generated by org-mode 7.3 in emacs 23

    --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-Fix-broken-CUSTOM_ID-links-to-outline-levels-exporte.patch Content-Description: patch >From 896a97a00c28206a940bb935406c60f19db3de15 Mon Sep 17 00:00:00 2001 From: Jambunathan K 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 "
  • " target) extra-targets title "
    \n") + (insert (format "
  • " remove) extra-targets title "
    \n") (insert "
  • " title "
    \n"))) (aset org-levels-open (1- level) t) (org-close-par-maybe) (if target - (insert (format "
      \n
    • " target) + (insert (format "
        \n
      • " remove) extra-targets title "
        \n") (insert "
          \n
        • " title "
          \n")))) (aset org-levels-open (1- level) t) -- 1.7.2.3 --=-=-= > - 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 >> # <> >> >> *** <<>> >> >> ** 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 >> >>
            >>
          • >> >> >> Target with CUSTOMID >>
            >>
          • >>
          >> >> >> >> #+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 --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --=-=-=--