emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jambunathan K <kjambunathan@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] Fix broken internal links on export
Date: Tue, 12 Oct 2010 21:30:12 +0530	[thread overview]
Message-ID: <81mxqj1jw3.fsf@gmail.com> (raw)

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


Summary: Fix broken internal links on export

Test case.

(setq org-link-search-must-match-exact-headline t)

# file temp.org

* Heading 1
  Some content.

* Heading 2
  There is a link to [[Heading 1]] here.

Export this to html and note that [[Heading 1]] is wrongly
translated. Apply the patch. See that the internal link is correctly
exported.

 <p>
-There is a link to <a href="#Heading==1">Heading 1</a> here.
+There is a link to <a href="#sec-1">Heading 1</a> here.
 </p></div>
 </div>

Note: 
Is 'dedicated the right value to return?


Jambunathan K.


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

From 82fcc473277c2a1c5647820c19eff0f0e11582c9 Mon Sep 17 00:00:00 2001
From: Jambunathan K <kjambunathan@gmail.com>
Date: Tue, 12 Oct 2010 21:17:09 +0530
Subject: [PATCH] Fix broken internal links on export

* org.el (org-link-search): Return 'dedicated on successful match when
org-link-search-must-match-exact-headline is set to t.
---
 lisp/org.el |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index a80286f..f0ad595 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -9389,6 +9389,7 @@ in all files.  If AVOID-POS is given, ignore matches near that position."
 				     (regexp-quote s))
 			     nil t))
 	;; OK, found a match
+	(setq type 'dedicated)
 	(goto-char (match-beginning 0)))
        ((and (not org-link-search-inhibit-query)
 	     (eq org-link-search-must-match-exact-headline 'query-to-create)
-- 
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

             reply	other threads:[~2010-10-12 16:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-12 16:00 Jambunathan K [this message]
2010-10-24 18:37 ` [PATCH] Fix broken internal links on export David Maus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=81mxqj1jw3.fsf@gmail.com \
    --to=kjambunathan@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).