emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-publish fails to export the #anchor in other_org_file.html#anchor
@ 2010-10-12 22:29 Daniel Clemente
  2010-10-24 18:29 ` David Maus
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Clemente @ 2010-10-12 22:29 UTC (permalink / raw)
  To: org-mode Mailinglist


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))))
 

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

* Re: org-publish fails to export the #anchor in other_org_file.html#anchor
  2010-10-12 22:29 org-publish fails to export the #anchor in other_org_file.html#anchor Daniel Clemente
@ 2010-10-24 18:29 ` David Maus
  0 siblings, 0 replies; 2+ messages in thread
From: David Maus @ 2010-10-24 18:29 UTC (permalink / raw)
  To: Daniel Clemente; +Cc: org-mode Mailinglist


[-- Attachment #1.1: Type: text/plain, Size: 393 bytes --]

At Wed, 13 Oct 2010 00:29:25 +0200,
Daniel Clemente wrote:
> 
> 
> 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.

You where right.  The patch has been accepted.

Best,
  -- David
-- 
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]

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

end of thread, other threads:[~2010-10-24 18:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-12 22:29 org-publish fails to export the #anchor in other_org_file.html#anchor Daniel Clemente
2010-10-24 18:29 ` David Maus

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).