From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: incorrect HTML rendering of info links with spaces Date: Wed, 08 Apr 2015 11:53:05 -0400 Message-ID: <87a8yiobvi.fsf@alphaville.usersys.redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45730) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfsIH-0007hF-LZ for emacs-orgmode@gnu.org; Wed, 08 Apr 2015 11:53:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YfsIC-0003y1-Il for emacs-orgmode@gnu.org; Wed, 08 Apr 2015 11:53:33 -0400 Received: from plane.gmane.org ([80.91.229.3]:46328) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfsIC-0003wp-B0 for emacs-orgmode@gnu.org; Wed, 08 Apr 2015 11:53:28 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YfsI6-00026t-NR for emacs-orgmode@gnu.org; Wed, 08 Apr 2015 17:53:22 +0200 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 08 Apr 2015 17:53:22 +0200 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 08 Apr 2015 17:53:22 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org emacs18@gmail.com (Richard Y. Kim) writes: > It seems like org-html-publish-to-html does not translate info links > properly in generated HTML files. The problem is that spaces in info > nodes should be converted to dashes, but instead spaces are left as is. > > For example org-mode link [[info:elisp#Hash Tables]] is converted as > > elisp#Hash Tables > > when in fact the correct URL that should be generated is > > elisp#Hash Tables > > where a dash is used in the URL as well as ".html" suffix. > > Why should it be "-" instead of " "? Simply because that is the > convention used by GNU makeinfo when translating texinfo files into HTML > output. For example > > http://www.gnu.org/software/emacs/manual/html_mono/elisp.html#Hash-Tables > > is the correct URL rather than this incorrect URL: > > http://www.gnu.org/software/emacs/manual/html_mono/elisp.html#Hash%20Tables > > So today if I hit C-c C-o on [[info:elisp#Hash Tables]] link, then it > correctly brings up "(elisp) Hash Tables" info node. However the > generated HTML link does not work. On the other hand > [[info:elisp#Hash-Tables]] with a dash rather than space generates valid > HTML link (ignoring missing ".html" suffix), but C-c C-o fails to work. > It would be very useful if the same org link such as [[info:elisp#Hash > Tables]] works for both C-c C-o as well as generate valid HTML link. > > This issue is important to me, because I would rather use org-mode than > texinfo to write documentation on emacs packages with many links > pointing to the official emacs and elisp manuals. Right now lack of > proper support for info links in org-mode is the *only* reason why I > currently use texinfo rather than org-mode. I believe there is provision for that in org-link-protocols: ... ("man" org-man-open org-man-export) ... ("info" org-info-open nil) The info entry has an org-info-open entry but the second entry is nil. You can replace that with org-info-export and write the org-info-export function to DTRT. You can use the org-man-export function as a model. Maybe you can submit a patch? Nick