emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Daniel Clemente <n142857@gmail.com>
To: org-mode Mailinglist <emacs-orgmode@gnu.org>
Subject: org-publish fails to export the #anchor in other_org_file.html#anchor
Date: Wed, 13 Oct 2010 00:29:25 +0200	[thread overview]
Message-ID: <87d3rff3ju.wl%n142857@gmail.com> (raw)


Hi.

Before commit bbac53d7fe1cab14bc70e152092cf7a538a6a810, org-publish made this change to my HTML, which was wrong:

-Precisamente una idea loca que tengo es <a href="emacs.html#jgg8k741eue0">integrar la World Wide Web en org-mode</a>…
+Precisamente una idea loca que tengo es <a href="http:emacs.html#jgg8k741eue0">integrar la World Wide Web en org-mode</a>…


After that commit (and in exactly the same setup), it makes this change, which is also wrong:

-Precisamente una idea loca que tengo es <a href="emacs.html#jgg8k741eue0">integrar la World Wide Web en org-mode</a>…
+Precisamente una idea loca que tengo es <a href="emacs.html">integrar la World Wide Web en org-mode</a>…


I think org-html-make-link doesn't export anchors („fragments“) in links between org files.
The following patch corrects this for me; please review.

diff --git a/lisp/org-html.el b/lisp/org-html.el
index 3fd7b72..3e4a789 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -746,7 +746,8 @@ MAY-INLINE-P allows inlining it as an image."
 	    ((or
 		(not type)
 		(string= type "http")
-		(string= type "https"))
+		(string= type "https")
+		(string= type "file"))
 	       (if fragment
 		  (setq thefile (concat thefile "#" fragment))))
 

             reply	other threads:[~2010-10-12 22:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-12 22:29 Daniel Clemente [this message]
2010-10-24 18:29 ` org-publish fails to export the #anchor in other_org_file.html#anchor 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=87d3rff3ju.wl%n142857@gmail.com \
    --to=n142857@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).